Re: MI testsuite to use PTY for inferior

Bob Rossi
2005-08-03T18:22:17Z

On Wed, Aug 03, 2005 at 09:19:00AM -0400, Daniel Jacobowitz wrote:
> On Tue, Aug 02, 2005 at 10:06:53PM -0400, Bob Rossi wrote:
> > On Sat, Jul 30, 2005 at 09:21:11PM -0400, Daniel Jacobowitz wrote:
> > > On Sat, Jul 30, 2005 at 07:03:09PM -0400, Bob Rossi wrote:
> > > > However, since that's pretty ugly, I'll take your suggestion and always
> > > > create and assign inferior_pty a value. Then I'll check it for the value
> > > > of "true" before executing any code.
> > >
> > > I recommend doing something different. Make the argument a flag, i.e.
> > > "mi_gdb_start use-tty". Or "no-tty" depending on what you want the
> > > default to be.
> >
> > Here is an updated patch with all the suggestions made so far, except
> > for the ChangeLog suggestion Nick made. Nick, thanks for noticing the
> > problems with the original patch!
> >
> > If preferred, I could add the separate-inferior-tty argument to
> > mi_gdb_start only in the tests that need that functionality to pass,
> > instead of for all the mi-* tests. This would reduce the patch size
> > significantly.
>
> How about mi-basics.exp (for the set tty tests) and mi-console.exp
> only? The other files mostly don't care, except for mi-syn-frame.exp,
> and somewhere around here I have a patch that deletes the use of
> inferior output from that test - it's just not relevant.

Hi Daniel,

I decided to keep mi-basics.exp simply because it would be complicated
for someone to turn on the separate-inferior-pty option, and know how to
re-write the tty tests. I kept the mi-console.exp test for obvious
reasons. I also kept the mi-syn-frame.exp tests for now. I don't care if
the results get deleted in the future, I just need to make sure that the
inferior I/O is separated from GDB/MI's I/O so that I can do a syntax
check on GDB/MI's I/O only.

The last known issue is to discuss if it matters that mi_gdb_test will
give 1 PASS if there is no inferior data, 2 PASS's if there is inferior
data and it matches, or 1 PASS and 1 FAIL if there is inferior data and
it doesn't match. (This assumes that the GDB data matches). Is this OK?
I think it is.

Thanks,
Bob Rossi