[RFC] Improve testsuite for poor expect behavior

Pierre Muller muller@ics.u-strasbg.fr
Wed Jun 17 21:00:00 GMT 2009


Whoops, I forgot that I also added
djgpp target to the list of targets
using set_unbuffered_mode in gdb.exp
Otherwise tests like gdb.base/fileio.exp do fail all over the place.

Pierre

> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Pierre Muller
> Envoyé : Wednesday, June 17, 2009 10:17 PM
> À : 'Eli Zaretskii'; 'Daniel Jacobowitz'
> Cc : brobecker@adacore.com; gdb-patches@sourceware.org
> Objet : RE: [RFC] Improve testsuite for poor expect behavior
> 
>   My way to use cygwin expect for DJGPP
> is quite ugly, but it gives some results.
> 
>   The basic idea is to consider that djgpp is a remote target and to
> overload several expect procedures to cope with DJGPP specific
> features.
> 
>   I added a .dejagnu directory in my cygwin home, with an empty
> site.exp file and a boards directory.
>   This directory stores several files,
> but only one concerns DJGPP.
>   I simply called it djgpp.exp
> and I run the testsuite
> in
>   djbuild/gdb/testsuite
> (with a DJGPP compiled gdb.exe at djgpp/gdb level).
> I an sereral testsuite subsets using
> make check RUNTESTFLAGS="--target=djgpp --host_board=djgpp
> gdb.*/wa*.exp"
> Which means that the same file ($HOME/.dejagnu/boards/djgpp.exp) is
> used both as host_board and target...
> as I said it is really ugly, but I didn't have time to sort things out,
> and I am not sure I will have the willingness to do it...
> 
>   I attached the djpp.exp file.
> 
>   The key functions are
> djgpp_spawn and djgpp_exec
> djgpp_exec uses a response file
> for long commandlines, to overcome the
> 80 chars limitations for Dos command lines.
>   In its present form, it prints out lots of information, send_user can
> probably be changed to verbose if someone just wants to use it.
> 
>   Eli, tell me if you get a chance to try it out.
> 
> Pierre
> 
> 
> > -----Message d'origine-----
> > De : Eli Zaretskii [mailto:eliz@gnu.org] Envoyé : Wednesday, June 17,
> > 2009 7:17 PM À : 'Daniel Jacobowitz'
> > Cc : muller@ics.u-strasbg.fr; brobecker@adacore.com; gdb-
> > patches@sourceware.org Objet : Re: [RFC] Improve testsuite for poor
> > expect behavior
> >
> > > Date: Wed, 17 Jun 2009 09:36:26 -0400
> > > From: 'Daniel Jacobowitz' <drow@false.org>
> > > Cc: 'Joel Brobecker' <brobecker@adacore.com>, gdb-
> > patches@sourceware.org
> > >
> > > I have not tried this on DJGPP at all.
> >
> > You cannot try this with DJGPP, because there are no such APIs in
> > DJGPP (with the exception of `setmode', which does exist).  Also,
> > there are no pipes in DJGPP.
> >
> > I cannot judge what would be needed for DJGPP, since Pierre did not
> > yet explain how does he run DJGPP with the test suite, nor show any
> > code that achieves that.  All I can say is that DJGPP has the
> > `setmode' function that can be used to switch a standard handle into
> > binary mode, and that `isatty' is available to detect whether a
> handle
> > is connected to a terminal device.  Note that the DJGPP build of GDB
> > generally does not always use file I/O functions to write to the
> > terminal; it uses direct screen I/O for some ops.  Thus, binary mode
> > file I/O not necessarily will solve the problem that bothers Pierre,
> > although I do not yet understand fully whether it is relevant to
> DJGPP
> > as it is to MinGW.



More information about the Gdb-patches mailing list