diff options
-rw-r--r-- | test/misc/sem.c | 4 | ||||
-rw-r--r-- | test/string/stratcliff.c | 2 | ||||
-rw-r--r-- | test/test-skeleton.c | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/test/misc/sem.c b/test/misc/sem.c index 029386d73..62a59b1e9 100644 --- a/test/misc/sem.c +++ b/test/misc/sem.c @@ -1,4 +1,6 @@ #include <stdio.h> +#include <string.h> +#include <errno.h> #include <sys/types.h> #include <sys/ipc.h> #include <sys/sem.h> @@ -18,7 +20,7 @@ int main(void) printf("semget(IPC_CREAT) = %d\n", k); if (k < 0) { - fprintf(stderr, "semget failed: %m\n"); + fprintf(stderr, "semget failed: %s\n", strerror(errno)); return 1; } diff --git a/test/string/stratcliff.c b/test/string/stratcliff.c index 6377c6ed7..41e774681 100644 --- a/test/string/stratcliff.c +++ b/test/string/stratcliff.c @@ -52,7 +52,7 @@ main (int argc, char *argv[]) puts ("No test, mmap not available."); else { - printf ("mmap failed: %m"); + printf ("mmap failed: %s", strerror(errno)); result = 1; } } diff --git a/test/test-skeleton.c b/test/test-skeleton.c index 0547d9a2a..1b6ae1263 100644 --- a/test/test-skeleton.c +++ b/test/test-skeleton.c @@ -117,7 +117,7 @@ create_temp_file (const char *base, char **filename) fd = mkstemp (fname); if (fd == -1) { - printf ("cannot open temporary file '%s': %m\n", fname); + printf ("cannot open temporary file '%s': %s\n", fname, strerror(errno)); free (fname); return -1; } @@ -335,7 +335,7 @@ main (int argc, char *argv[]) termpid = TEMP_FAILURE_RETRY (waitpid (pid, &status, 0)); if (termpid == -1) { - printf ("Waiting for test program failed: %m\n"); + printf ("Waiting for test program failed: %s\n", strerror(errno)); exit (1); } if (termpid != pid) |