[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: two more new warning/errors in coreutils/gnulib tests
From: |
Eric Blake |
Subject: |
Re: two more new warning/errors in coreutils/gnulib tests |
Date: |
Fri, 08 Jul 2011 17:08:49 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.10 |
On 07/08/2011 04:54 PM, Bruno Haible wrote:
> Hi Eric,
>
>> - system (command);
>> + ignore_value (system (command));
>
> Can you please remind me: Why not
>
> ASSERT (system (command) == 0); ?
On mingw, using system("rm") does not always pass, and we had a series
of complaints about using that idiom to guarantee a clean start, but
where the failure to find rm could be ignored if we had a clean start
(that is, the system() call was an aid for debugging a dirty start,
rather than than essential to the test):
http://lists.gnu.org/archive/html/bug-gnulib/2009-12/msg00351.html
>
> On Unix platforms, if system() returns nonzero, the user running the test
> better ought to know it, no?
I was merely copying the pattern from other test files that use
system(), without researching why those tests were ignoring the output
of system. But now that you've made me look, I agree that you are
probably right that this particular use of system() is essential to the
test, and unlike the mingw system("rm") case, this one should assert
that the subprocess succeeded.
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature