From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Jacobowitz To: Joel Brobecker Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA/testsuite] Workaround timeout in default.exp Date: Thu, 20 May 2004 02:27:00 -0000 Message-id: <20040520022747.GA451@nevyn.them.org> References: <20040518210147.GQ10684@gnat.com> <20040518214255.GC4036@nevyn.them.org> <20040520014811.GR10684@gnat.com> X-SW-Source: 2004-05/msg00590.html On Wed, May 19, 2004 at 06:48:11PM -0700, Joel Brobecker wrote: > > > 2004-05-18 J. Brobecker > > > > > > * gdb.base/default.exp: Rewrite a couple of tests to work-around > > > a problem that causes this test and all the following tests to > > > timeout. > > > > > > Tested on AIX 5.1 and x86-linux. Would that be OK to apply? > > > > Rather than adding a FIXME, let me try to explain what is going on. > > OK. > > > The first part is a guess. For some reason, the pattern "\(gdb\) $" > > never matches on GNU/Linux but does on AIX and Solaris. I presume this > > is because of some difference in the pseudo-TTY layer or in the > > standard I/O library, which causes characters to be send in smaller > > batches. So at some point on those systems, the buffer ends with the > > prompt. > > There may be a crack in your theory, because there something it doesn't > explain. When I use the simple send_gdb/gdb_expect sequence, then I get > the whole output, ie the differences you are mentioning do not come into > play. I verified this by using expect_out. > > I tried your suggestion, without much luck so far. Here is what I have > tried: If you're trying to debug expect matching, I recommend "exp_internal 1" before the block (and maybe "exp_internal 0" after). That will let you see exactly what's going on, and why my crackpot theory is wrong :) -- Daniel Jacobowitz