From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2227 invoked by alias); 7 Nov 2007 14:37:57 -0000 Received: (qmail 2212 invoked by uid 22791); 7 Nov 2007 14:37:56 -0000 X-Spam-Check-By: sourceware.org Received: from ics.u-strasbg.fr (HELO ics.u-strasbg.fr) (130.79.112.250) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 07 Nov 2007 14:37:50 +0000 Received: from ICSMULLER (laocoon.u-strasbg.fr [130.79.112.72]) by ics.u-strasbg.fr (Postfix) with ESMTP id 922FC18701A for ; Wed, 7 Nov 2007 15:42:04 +0100 (CET) From: "Pierre Muller" To: Subject: [RFC] Trying to fix testsuite/gdb.arch/i386-sse.exp pattern problem Date: Wed, 07 Nov 2007 14:37:00 -0000 Message-ID: <000001c8214b$c2b4ed00$481ec700$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Content-Language: en-us Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-11/txt/msg00127.txt.bz2 On Cygwin, the i386-sse test always gives me 8 failures on the int8 array values. Are these failure also visible on i386 linux machines? I suppose so, but couldn't test it. It took me a long time to understand the complicated regular expression used, but in the end, I suspect that this regexpr is not adequate. The current test is: gdb_test "print \$xmm$r.v16_int8" \ ".. = \\{(-?\[0-9\]+, ){15}-?\[0-9\]+\\}.*" \ "check int8 contents of %xmm$r" But I suspect that the {15} refers to the expanded pattern, which would mean that it would match a {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} while the patterns are different (some elements are non-zero). I could not check this directly as gdb return {0 } if you set all 4 v4_float elements to zero. I tried to check v8_int16 instead, but still got no luck... Using -v 5 times, I found out that gdb_test added a group start '(' character before the pattern and a group end ')' after the pattern, but even adding closing and opening groups still would not make the test pass... gdb_test "set var \$xmm0.v4_float\[0\] = 0" "" "set %xmm0" gdb_test "set var \$xmm0.v4_float\[1\] = 0" "" "set %xmm0" gdb_test "set var \$xmm0.v4_float\[2\] = 0" "" "set %xmm0" gdb_test "set var \$xmm0.v4_float\[3\] = 0" "" "set %xmm0" gdb_test "print \$xmm0.v8_int16" \ ".* =) \\{(-?\[0-9\]+, ){7}(-?\[0-9\]+\\}.*" \ "check zeroed int8 contents of %xmm0" Still fails, even though the result is {0, 0, 0, 0, 0, 0, 0, 0}. Even this simple test fails: gdb_test "print {0, 0, 0, 0}" ".* =) \\{(0, ){3}(0\\}.*" "test array" I am really wondering if this pattern repetition is working at all... Installed tcl is version 8.4 I could correct the test, by putting explicitly the 16 patterns, which results in an horribly lengthy pattern, but I was unable to break it into pieces to have shorter source lines. Any ideas on ways to split the pattern string sent to gdb_test over multiple lines are most welcomed. Pierre Muller ChangeLog entry: 2007-11-07 Pierre Muller * gdb.arch/i386-see.exp: Correct pattern to check v16_int8 array of SSE registers. Index: i386-sse.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.arch/i386-sse.exp,v retrieving revision 1.8 diff -u -p -r1.8 i386-sse.exp --- i386-sse.exp 5 Sep 2007 00:51:49 -0000 1.8 +++ i386-sse.exp 7 Nov 2007 13:48:37 -0000 @@ -84,7 +84,7 @@ foreach r {0 1 2 3 4 5 6 7} { ".. = \\{$r, $r.25, $r.5, $r.75\\}.*" \ "check float contents of %xmm$r" gdb_test "print \$xmm$r.v16_int8" \ - ".. = \\{(-?\[0-9\]+, ){15}-?\[0-9\]+\\}.*" \ + ".. = \\{-?\[0-9\]+, -?\[0-9\]+, -?\[0-9\]+, -?\[0-9\]+, -?\[0-9\]+, -?\[0-9\]+, -?\[0-9\]+, -?\[0-9\]+, -?\[0-9\]+,-?\[0-9\]+, -?\[0-9\]+, -?\[0-9\]+, -?\[0-9\]+, -?\[0-9\]+, -?\[0-9\]+, -?\[0-9\]+\\}.*" \ "check int8 contents of %xmm$r" }