This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Add system(NULL) to fileio
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 10 Jun 2006 12:51:40 +0100
- Subject: Re: Add system(NULL) to fileio
- References: <4489D824.40605@codesourcery.com> <u3bedqx5h.fsf@gnu.org>
Eli Zaretskii wrote:
>> *** gdb/testsuite/gdb.base/fileio.c 5 Jun 2006 15:36:02 -0000 1.8.12.1
>> --- gdb/testsuite/gdb.base/fileio.c 9 Jun 2006 15:12:57 -0000
>> *************** test_system ()
>> *** 385,390 ****
>> --- 385,394 ----
>> ret = system ("wrtzlpfrmpft");
>> printf ("system 2: ret = %d %s\n", ret, WEXITSTATUS (ret) == 127 ? "OK" : "");
>> stop ();
>> + /* Test for shell */
>> + ret = system (NULL);
>> + printf ("system 3: ret = %d %s\n", ret, ret != 0 ? "OK" : "");
>> + stop ();
>
> Isn't it better to test for shell availability _before_ we send it
> commands, not after?
Sure. I just didn't want to disturb the testcase more. I can reorder it :)
Can you look at my 'Remove some spurious test fails' because, amongst other
things it makes it tractable to go alter the fileio testcase.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk