This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [RFC] Trying to fix testsuite/gdb.arch/i386-sse.exp pattern problem



> -----Original Message-----
> From: 'Daniel Jacobowitz' [mailto:drow@false.org]
> Sent: Thursday, November 08, 2007 2:43 PM
> To: Pierre Muller
> Cc: 'Andreas Schwab'; gdb-patches@sourceware.org
> Subject: Re: [RFC] Trying to fix testsuite/gdb.arch/i386-sse.exp
> pattern problem
> 
> On Thu, Nov 08, 2007 at 02:30:50PM +0100, Pierre Muller wrote:
> > "[\r\n]*(.* = 1{1,}2{1,}.*)[\r\n]+\(gdb\) $"? no^M
> >
> > So even that simple test fails :(
> 
> How about:
> 
> echo 'send_user "[regexp {= 1{1,}2{1,}.*} {2 = 1122233}]\n"' | expect
It also works, 
> Are you sure it's the same "expect" the Makefile is running?

Putting the send_user above inside
test.exp also gives a pattern matching...
I am lost.

Using gdb_test_multiple, I can see that the 
start and end added to the pattern of gdb_test 
is not the cause of the problem:

gdb_test_multiple  "print 1122233\n"  \
        "Check int constant with gdb_test_multiple"  \
        {  \
        -re ".*1*2*.*"  {  \
          pass "pattern found"  \
          } \
        -re ".*"  {  \
          fail "pattern not found"  \
          } \
        }

gdb_test_multiple  "print 1122233\n"  \
        "Check int constant with curly braces using gdb_test_multiple"  \
        {  \
        -re ".*1{1,}2{1,}.*"  {  \
          pass "pattern found"  \
          } \
        -re ".*"  {  \
          fail "pattern not found"  \
          } \
        }

Gives a PASS for the first and a FAIL for the second.

Pierre



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]