[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: |
Bruno Haible |
Subject: |
Re: two more new warning/errors in coreutils/gnulib tests |
Date: |
Sat, 9 Jul 2011 02:05:06 +0200 |
User-agent: |
KMail/1.9.9 |
Eric Blake wrote:
> 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.
OK, I've reverted your change and added an ASSERT:
2011-07-08 Bruno Haible <address@hidden>
sigprocmask tests: A better way to avoid a compiler warning.
* tests/test-sigprocmask.c: Don't include "ignore-value.h".
(main): Complain if system() returns non-zero.
* modules/sigprocmask-tests (Depends-on): Remove ignore-value.
--- modules/sigprocmask-tests.orig Sat Jul 9 01:57:14 2011
+++ modules/sigprocmask-tests Sat Jul 9 01:56:06 2011
@@ -4,7 +4,6 @@
tests/macros.h
Depends-on:
-ignore-value
sleep
configure.ac:
--- tests/test-sigprocmask.c.orig Sat Jul 9 01:57:14 2011
+++ tests/test-sigprocmask.c Sat Jul 9 01:56:29 2011
@@ -28,7 +28,6 @@
#include <stdlib.h>
#include <unistd.h>
-#include "ignore-value.h"
#include "macros.h"
#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__)
@@ -62,7 +61,7 @@
/* Request a SIGINT signal from outside. */
sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
- ignore_value (system (command));
+ ASSERT (system (command) == 0);
/* Wait. */
sleep (2);
2011-07-08 Bruno Haible <address@hidden>
pthread_sigmask tests: Avoid a compiler warning.
* tests/test-pthread_sigmask1.c (main): Complain if system() returns
non-zero.
--- tests/test-pthread_sigmask1.c.orig Sat Jul 9 01:57:14 2011
+++ tests/test-pthread_sigmask1.c Sat Jul 9 01:56:46 2011
@@ -60,7 +60,7 @@
/* Request a SIGINT signal from outside. */
sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
- system (command);
+ ASSERT (system (command) == 0);
/* Wait. */
sleep (2);
--
In memoriam Jean Moulin <http://en.wikipedia.org/wiki/Jean_Moulin>