Mercurial > hg > octave-lyh > gnulib-hg
changeset 16353:8b572983af73
nonblocking-pipe tests: Fix a NULL program name in a diagnostic.
* tests/test-nonblocking-pipe-main.c: Include progname.h.
(main): Invoke set_program_name.
* modules/nonblocking-pipe-tests (Depends-on): Add progname.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sat, 04 Feb 2012 18:18:37 +0100 |
parents | c6d7d4c82b13 |
children | 88ce25e2dffc |
files | ChangeLog modules/nonblocking-pipe-tests tests/test-nonblocking-pipe-main.c |
diffstat | 3 files changed, 16 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-02-04 Bruno Haible <bruno@clisp.org> + + nonblocking-pipe tests: Fix a NULL program name in a diagnostic. + * tests/test-nonblocking-pipe-main.c: Include progname.h. + (main): Invoke set_program_name. + * modules/nonblocking-pipe-tests (Depends-on): Add progname. + 2012-02-04 Eric Blake <eblake@redhat.com> canonicalize-lgpl: fix // handling
--- a/modules/nonblocking-pipe-tests +++ b/modules/nonblocking-pipe-tests @@ -13,6 +13,7 @@ unistd nonblocking wait-process +progname pipe-posix dup2 environ
--- a/tests/test-nonblocking-pipe-main.c +++ b/tests/test-nonblocking-pipe-main.c @@ -32,6 +32,7 @@ #include "nonblocking.h" #include "wait-process.h" +#include "progname.h" #include "macros.h" #include "test-nonblocking-pipe.h" @@ -41,12 +42,17 @@ int main (int argc, char *argv[]) { - const char *child_path = argv[1]; - int test = atoi (argv[2]); + const char *child_path; + int test; int fd[2]; int child; int exitcode; + set_program_name (argv[0]); + + child_path = argv[1]; + test = atoi (argv[2]); + /* Create a pipe. */ ASSERT (pipe (fd) >= 0);