From 4e9e5f62f6a6d5488f0697cb38c8c7847a25ebf8 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 4 Feb 2012 18:20:11 +0100 Subject: [PATCH] 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. --- ChangeLog | 5 +++++ modules/spawn-pipe-tests | 1 + tests/test-spawn-pipe-main.c | 3 +++ 3 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2449e0093..8f0854396 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2012-02-04 Bruno Haible + 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. diff --git a/modules/spawn-pipe-tests b/modules/spawn-pipe-tests index f7831d5e4..e17eece53 100644 --- a/modules/spawn-pipe-tests +++ b/modules/spawn-pipe-tests @@ -6,6 +6,7 @@ tests/macros.h Depends-on: close +progname configure.ac: diff --git a/tests/test-spawn-pipe-main.c b/tests/test-spawn-pipe-main.c index 0fa145abf..8f8204ffe 100644 --- a/tests/test-spawn-pipe-main.c +++ b/tests/test-spawn-pipe-main.c @@ -19,6 +19,7 @@ #include "spawn-pipe.h" #include "wait-process.h" +#include "progname.h" #include #include @@ -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]); -- 2.11.0