Hi Simon and community members,

>I like the idea of testing the actual shell's behavior to set our
>expectations for what GDB should output.  There are just two
>problems:

 >- Your check uses TCL's exec, which runs on the build machine.  That
>   wouldn't be right in a remote-host scenario.  I think we can restrict
>  your check to when running with a local host.  This assumes that you
>  are not doing remote-host testing with AIX.

I missed thinking about this. Thanks. Sending a v3 version of this patch which addresses this.

> - The shell and pipe commands don't necessary use the same shell.  The
>  shell command reads the SHELL env var, but the pipe command uses
>  popen, which is hardcoded to use /bin/sh.  I presume that if you run
>   your patch with bash as your shell, you'd see a failure for the pipe
>  test.
> Can you test this patch, which addresses those two problems?

Yes, when I ran with bash SHELL I got 2 failures. Thanks for pointing out. I have addressed the same in v3 version of this patch. 

All 3 shells ksh88, ksh93 and bash are tested and we have 125 passes.

Thanks again for pointing them out.

Have a nice day ahead.

Regards,
Aditya.