Add system(NULL) to fileio

Nathan Sidwell nathan@codesourcery.com
Sat Jun 10 11:52:00 GMT 2006


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



More information about the Gdb-patches mailing list