spawn-pipe tests: Fix a NULL program name in a diagnostic.
authorBruno Haible <bruno@clisp.org>
Sat, 4 Feb 2012 17:20:11 +0000 (18:20 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 4 Feb 2012 17:20:43 +0000 (18:20 +0100)
* tests/test-spawn-pipe-main.c: Include progname.h.
(main): Invoke set_program_name.
* modules/spawn-pipe-tests (Depends-on): Add progname.

ChangeLog
modules/spawn-pipe-tests
tests/test-spawn-pipe-main.c

index 2449e00..8f08543 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2012-02-04  Bruno Haible  <bruno@clisp.org>
 
+       spawn-pipe tests: Fix a NULL program name in a diagnostic.
+       * tests/test-spawn-pipe-main.c: Include progname.h.
+       (main): Invoke set_program_name.
+       * modules/spawn-pipe-tests (Depends-on): Add progname.
+
        nonblocking-socket tests: Fix a NULL program name in a diagnostic.
        * tests/test-nonblocking-socket-main.c: Include progname.h.
        (main): Invoke set_program_name.
index f7831d5..e17eece 100644 (file)
@@ -6,6 +6,7 @@ tests/macros.h
 
 Depends-on:
 close
+progname
 
 configure.ac:
 
index 0fa145a..8f8204f 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "spawn-pipe.h"
 #include "wait-process.h"
+#include "progname.h"
 
 #include <stdbool.h>
 #include <stdio.h>
@@ -80,6 +81,8 @@ main (int argc, char *argv[])
   int test;
   int fd;
 
+  set_program_name (argv[0]);
+
   if (argc != 3)
     {
       fprintf (stderr, "%s: need 2 arguments\n", argv[0]);