From: Bruno Haible Date: Sat, 18 Jun 2011 21:06:53 +0000 (+0200) Subject: openat, fdopendir tests: Fix link errors. X-Git-Tag: v0.1~2239 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=d9a273b271b226547775c9b9798d7afd96ef5410;p=gnulib.git openat, fdopendir tests: Fix link errors. * modules/openat-tests (Depends-on): Add progname. * modules/fdopendir-tests (Depends-on): Likewise. * tests/test-fchownat.c: Include progname.h. (main): Call set_program_name. * tests/test-fstatat.c: Include progname.h. (main): Call set_program_name. * tests/test-mkdirat.c: Include progname.h. (main): Call set_program_name. * tests/test-openat.c: Include progname.h. (main): Call set_program_name. * tests/test-unlinkat.c: Include progname.h. (main): Call set_program_name. * tests/test-fdopendir.c: Include progname.h. (main): Call set_program_name. --- diff --git a/ChangeLog b/ChangeLog index d3f084882..ef9564b9d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,23 @@ 2011-06-18 Bruno Haible + openat, fdopendir tests: Fix link errors. + * modules/openat-tests (Depends-on): Add progname. + * modules/fdopendir-tests (Depends-on): Likewise. + * tests/test-fchownat.c: Include progname.h. + (main): Call set_program_name. + * tests/test-fstatat.c: Include progname.h. + (main): Call set_program_name. + * tests/test-mkdirat.c: Include progname.h. + (main): Call set_program_name. + * tests/test-openat.c: Include progname.h. + (main): Call set_program_name. + * tests/test-unlinkat.c: Include progname.h. + (main): Call set_program_name. + * tests/test-fdopendir.c: Include progname.h. + (main): Call set_program_name. + +2011-06-18 Bruno Haible + Doc update. * doc/posix-functions/pthread_attr_getstack.texi: Update info regarding HP-UX. diff --git a/modules/fdopendir-tests b/modules/fdopendir-tests index e788ff5fc..bee2df7df 100644 --- a/modules/fdopendir-tests +++ b/modules/fdopendir-tests @@ -5,6 +5,7 @@ tests/macros.h Depends-on: open +progname configure.ac: diff --git a/modules/openat-tests b/modules/openat-tests index 250a57459..8b0a2b9e8 100644 --- a/modules/openat-tests +++ b/modules/openat-tests @@ -19,6 +19,7 @@ Depends-on: ignore-value mgetgroups pathmax +progname usleep stat-time symlink diff --git a/tests/test-fchownat.c b/tests/test-fchownat.c index c09694c82..060013e1e 100644 --- a/tests/test-fchownat.c +++ b/tests/test-fchownat.c @@ -32,6 +32,7 @@ SIGNATURE_CHECK (fchownat, int, (int, char const *, uid_t, gid_t, int)); #include "mgetgroups.h" #include "openat.h" +#include "progname.h" #include "stat-time.h" #include "ignore-value.h" #include "macros.h" @@ -58,11 +59,13 @@ do_lchown (char const *name, uid_t user, gid_t group) } int -main (void) +main (int argc _GL_UNUSED, char *argv[]) { int result1; /* Skip because of no chown/symlink support. */ int result2; /* Skip because of no lchown support. */ + set_program_name (argv[0]); + /* Clean up any trash from prior testsuite runs. */ ignore_value (system ("rm -rf " BASE "*")); diff --git a/tests/test-fdopendir.c b/tests/test-fdopendir.c index 81e44a13b..13653fe79 100644 --- a/tests/test-fdopendir.c +++ b/tests/test-fdopendir.c @@ -27,14 +27,17 @@ SIGNATURE_CHECK (fdopendir, DIR *, (int)); #include #include +#include "progname.h" #include "macros.h" int -main (void) +main (int argc _GL_UNUSED, char *argv[]) { DIR *d; int fd; + set_program_name (argv[0]); + /* A non-directory cannot be turned into a directory stream. */ fd = open ("test-fdopendir.tmp", O_RDONLY | O_CREAT, 0600); ASSERT (0 <= fd); diff --git a/tests/test-fstatat.c b/tests/test-fstatat.c index 839dad6c3..dda0cd224 100644 --- a/tests/test-fstatat.c +++ b/tests/test-fstatat.c @@ -32,6 +32,7 @@ SIGNATURE_CHECK (fstatat, int, (int, char const *, struct stat *, int)); #include "openat.h" #include "pathmax.h" +#include "progname.h" #include "same-inode.h" #include "ignore-value.h" #include "macros.h" @@ -58,10 +59,12 @@ do_lstat (char const *name, struct stat *st) } int -main (void) +main (int argc _GL_UNUSED, char *argv[]) { int result; + set_program_name (argv[0]); + /* Remove any leftovers from a previous partial run. */ ignore_value (system ("rm -rf " BASE "*")); diff --git a/tests/test-mkdirat.c b/tests/test-mkdirat.c index 89dfafc3c..0eb5e2d49 100644 --- a/tests/test-mkdirat.c +++ b/tests/test-mkdirat.c @@ -30,6 +30,7 @@ SIGNATURE_CHECK (mkdirat, int, (int, char const *, mode_t)); #include #include +#include "progname.h" #include "ignore-value.h" #include "macros.h" @@ -47,10 +48,12 @@ do_mkdir (char const *name, mode_t mode) } int -main (void) +main (int argc _GL_UNUSED, char *argv[]) { int result; + set_program_name (argv[0]); + /* Clean up any trash from prior testsuite runs. */ ignore_value (system ("rm -rf " BASE "*")); diff --git a/tests/test-openat.c b/tests/test-openat.c index fd3463880..6e6ba5b9b 100644 --- a/tests/test-openat.c +++ b/tests/test-openat.c @@ -29,6 +29,7 @@ SIGNATURE_CHECK (openat, int, (int, char const *, int, ...)); #include #include +#include "progname.h" #include "macros.h" #define BASE "test-openat.t" @@ -58,10 +59,12 @@ do_open (char const *name, int flags, ...) } int -main (void) +main (int argc _GL_UNUSED, char *argv[]) { int result; + set_program_name (argv[0]); + /* Basic checks. */ result = test_open (do_open, false); dfd = open (".", O_RDONLY); diff --git a/tests/test-unlinkat.c b/tests/test-unlinkat.c index f9ed249db..30af671a3 100644 --- a/tests/test-unlinkat.c +++ b/tests/test-unlinkat.c @@ -30,6 +30,7 @@ SIGNATURE_CHECK (unlinkat, int, (int, char const *, int)); #include #include +#include "progname.h" #include "unlinkdir.h" #include "ignore-value.h" #include "macros.h" @@ -56,12 +57,14 @@ unlinker (char const *name) } int -main (void) +main (int argc _GL_UNUSED, char *argv[]) { /* FIXME: Add tests of fd other than ".". */ int result1; int result2; + set_program_name (argv[0]); + /* Remove any leftovers from a previous partial run. */ ignore_value (system ("rm -rf " BASE "*"));