From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18987 invoked by alias); 7 May 2002 22:47:05 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 18940 invoked from network); 7 May 2002 22:47:04 -0000 Received: from unknown (HELO desire.geoffk.org) (12.235.56.190) by sources.redhat.com with SMTP; 7 May 2002 22:47:04 -0000 Received: (from geoffk@localhost) by desire.geoffk.org (8.11.6/8.11.6) id g47MkxT15139; Tue, 7 May 2002 15:46:59 -0700 Date: Tue, 07 May 2002 15:47:00 -0000 From: Geoff Keating Message-Id: <200205072246.g47MkxT15139@desire.geoffk.org> To: drow@mvista.com CC: mark@codesourcery.com, gdb@sources.redhat.com, gcc-regression@gcc.gnu.org, Michael Elizabeth Chastain In-reply-to: <20020507201308.GA28662@nevyn.them.org> (message from Daniel Jacobowitz on Tue, 7 May 2002 16:13:08 -0400) Subject: Re: Regression tester confusion Reply-to: Geoff Keating References: <92880000.1020796022@gandalf.codesourcery.com> <200205071944.g47Ji5V14853@desire.geoffk.org> <20020507201308.GA28662@nevyn.them.org> X-SW-Source: 2002-05/txt/msg00067.txt.bz2 > Date: Tue, 7 May 2002 16:13:08 -0400 > From: Daniel Jacobowitz ... > 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