This is the mail archive of the gdb@sources.redhat.com 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: Regression tester confusion


> Date: Tue, 7 May 2002 16:13:08 -0400
> From: Daniel Jacobowitz <drow@mvista.com>
...
> This usually means that the previous DejaGNU command did not explicitly
> consume enough input... Although in this case, it looks as if there are
> an invalid extra \r\n between the 'data's.
> 
> The comment two tests up in interrupt.exp sounds as if there's a known
> timing problem here.  Did "call function when asleep" fail, causing the
> extra newline to get sent?

No---this was the first and only failure for interrupt.exp.  This is a
cross to mips-elf, running on the sim, so I think the comment doesn't apply.

The log looks like (through 'cat -A', but may be word-wrapped, sorry):

a^M$
PASS: gdb.base/interrupt.exp: child process ate our char$
^M$
Program received signal SIGINT, Interrupt.^M$
0xa0020298 in main () at
/anubis/mummy/tbox/objs/share/gdb-testsuite/gdb.base/interrupt.c:17^M$
17^I      nbytes = read (0, &x, 1);^M$
(gdb) PASS: gdb.base/interrupt.exp: send_gdb control C$
p func1 ()^M$
$1 = 4^M$
(gdb) PASS: gdb.base/interrupt.exp: call function when asleep$
p func1 ()^M$
$2 = 4^M$
(gdb) PASS: gdb.base/interrupt.exp: call function a second time$
continue^M$
Continuing.^M$
PASS: gdb.base/interrupt.exp: continue$
data^M$
^M$
data^M$
FAIL: gdb.base/interrupt.exp: echo data (timeout)$
end of file^M$
^M$
Program exited normally.^M$
[Switching to process 0]^M$
Current language:  auto; currently asm^M$
(gdb) PASS: gdb.base/interrupt.exp: send end of file$

When the test passes (as it did on the very next run), the output
looks like:

PASS: gdb.base/interrupt.exp: child process ate our char$
^M$
Program received signal SIGINT, Interrupt.^M$
0xa0020298 in main () at
/anubis/mummy/tbox/objs/share/gdb-testsuite/gdb.base/in
terrupt.c:17^M$
17^I      nbytes = read (0, &x, 1);^M$
(gdb) PASS: gdb.base/interrupt.exp: send_gdb control C$
p func1 ()^M$
$1 = 4^M$
(gdb) PASS: gdb.base/interrupt.exp: call function when asleep$
p func1 ()^M$
$2 = 4^M$
(gdb) PASS: gdb.base/interrupt.exp: call function a second time$
continue^M$
Continuing.^M$
^M$
PASS: gdb.base/interrupt.exp: continue$
data^M$
PASS: gdb.base/interrupt.exp: echo data$
data^M$
end of file^M$

... and now I see.  The regexp is:

            -re "^(\r\n|)data\r\n(|data\r\n)$" { pass "echo data" }

But in the failing case, we are getting

data\r\n\r\ndata\r\n

which doesn't match for some reason.  

I think the variation is because one 'data\r\n' is the tty driver
echoing the test harness's input, and the program's output is
'\r\ndata\r\n' (the first \r\n is from earlier).  They are getting
interleaved depending on system load.

-- 
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>


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