1. 01 Jan, 2014 1 commit
  2. 01 Jan, 2013 1 commit
  3. 01 Jan, 2012 1 commit
  4. 01 Jan, 2011 1 commit
  5. 24 Dec, 2010 1 commit
    • Paul Eggert's avatar
      tests: port test-fdutimensat.c to Solaris 8 · 6147723c
      Paul Eggert authored
      * tests/test-fdutimensat.c (do_fdutimens): Don't assume
      fdutimensat works with a nonnegative fd and AT_SYMLINK_NOFOLLOW.
      On Solaris 8, it fails with errno == ENOSYS, because there is no
      futimens (so it can't use the fd), and there is no lutimens (so it
      can't implement AT_SYMLINK_NOFOLLOW on symlinks).
      6147723c
  6. 17 Sep, 2010 2 commits
    • Eric Blake's avatar
      fdutimens, fdutimensat: update signature, again · 89b0db35
      Eric Blake authored
      In general, merging:
      
      f<act>(fd,args) and <act>at(dir,name,args)
      
      should produce:
      
      fd<act>at(fd,dir,name,args)
      
      * lib/utimens.h (gl_futimens): Delete, and move signature...
      (fdutimens): ...here.
      (fdutimensat): Rearrange signature.
      (lutimensat): Rename variable for clarity.
      * lib/fdutimensat.c (fdutimensat): Update signature.
      * lib/utimens.c (fdutimens): Likewise.
      (gl_futimens): Delete.
      (utimens, lutimens): Update callers.
      * lib/futimens.c (futimens): Likewise.
      * tests/test-fdutimensat.c: Likewise.
      * tests/test-utimens.c: Likewise.
      * tests/test-futimens.h: Update comment.
      * NEWS: Mention this.
      Suggested by Paul Eggert.
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      89b0db35
    • Eric Blake's avatar
      fdutimensat: drop atflag validation · 18aae5b7
      Eric Blake authored
      * lib/fdutimensat.c (fdutimensat): Allow AT_SYMLINK_NOFOLLOW even
      with valid fd, to close a race scenario where futimens is
      unsupported and FILE was replaced by a symlink.
      * tests/test-fdutimensat.c (do_fdutimens, main): Adjust test
      accordingly.
      Suggested by Paul Eggert.
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      18aae5b7
  7. 16 Sep, 2010 1 commit
  8. 01 Feb, 2010 1 commit
    • Eric Blake's avatar
      tests: silence warning about system return · 3220d5c6
      Eric Blake authored
      Silence a compiler warning for platforms that mark system()
      with attribute warn_unused_result.
      
      * tests/test-areadlink-with-size.c (main): Ignore system result.
      * tests/test-areadlink.c (main): Likewise.
      * tests/test-areadlinkat-with-size.c (main): Likewise.
      * tests/test-areadlinkat.c (main): Likewise.
      * tests/test-canonicalize-lgpl.c (main): Likewise.
      * tests/test-canonicalize.c (main): Likewise.
      * tests/test-chown.c (main): Likewise.
      * tests/test-fchownat.c (main): Likewise.
      * tests/test-fdutimensat.c (main): Likewise.
      * tests/test-fstatat.c (main): Likewise.
      * tests/test-futimens.c (main): Likewise.
      * tests/test-lchown.c (main): Likewise.
      * tests/test-link.c (main): Likewise.
      * tests/test-linkat.c (main): Likewise.
      * tests/test-lstat.c (main): Likewise.
      * tests/test-mkdir.c (main): Likewise.
      * tests/test-mkdirat.c (main): Likewise.
      * tests/test-mkfifo.c (main): Likewise.
      * tests/test-mkfifoat.c (main): Likewise.
      * tests/test-mknod.c (main): Likewise.
      * tests/test-readlink.c (main): Likewise.
      * tests/test-remove.c (main): Likewise.
      * tests/test-rename.c (main): Likewise.
      * tests/test-renameat.c (main): Likewise.
      * tests/test-rmdir.c (main): Likewise.
      * tests/test-symlink.c (main): Likewise.
      * tests/test-symlinkat.c (main): Likewise.
      * tests/test-unlink.c (main): Likewise.
      * tests/test-unlinkat.c (main): Likewise.
      * tests/test-utimens.c (main): Likewise.
      * tests/test-utimensat.c (main): Likewise.
      * modules/areadlink-tests (Depends-on): Add ignore-value.
      * modules/areadlink-with-size-tests (Depends-on): Likewise.
      * modules/areadlinkat-tests (Depends-on): Likewise.
      * modules/areadlinkat-with-size-tests (Depends-on): Likewise.
      * modules/canonicalize-lgpl-tests (Depends-on): Likewise.
      * modules/canonicalize-tests (Depends-on): Likewise.
      * modules/chown-tests (Depends-on): Likewise.
      * modules/fdutimensat-tests (Depends-on): Likewise.
      * modules/futimens-tests (Depends-on): Likewise.
      * modules/lchown-tests (Depends-on): Likewise.
      * modules/link-tests (Depends-on): Likewise.
      * modules/linkat-tests (Depends-on): Likewise.
      * modules/lstat-tests (Depends-on): Likewise.
      * modules/mkdir-tests (Depends-on): Likewise.
      * modules/mkfifo-tests (Depends-on): Likewise.
      * modules/mkfifoat-tests (Depends-on): Likewise.
      * modules/mknod-tests (Depends-on): Likewise.
      * modules/openat-tests (Depends-on): Likewise.
      * modules/readlink-tests (Depends-on): Likewise.
      * modules/remove-tests (Depends-on): Likewise.
      * modules/rename-tests (Depends-on): Likewise.
      * modules/renameat-tests (Depends-on): Likewise.
      * modules/rmdir-tests (Depends-on): Likewise.
      * modules/symlink-tests (Depends-on): Likewise.
      * modules/symlinkat-tests (Depends-on): Likewise.
      * modules/unlink-tests (Depends-on): Likewise.
      * modules/utimens-tests (Depends-on): Likewise.
      * modules/utimensat-tests (Depends-on): Likewise.
      Signed-off-by: default avatarEric Blake <ebb9@byu.net>
      3220d5c6
  9. 01 Jan, 2010 1 commit
  10. 29 Dec, 2009 1 commit
    • Eric Blake's avatar
      tests: don't require debug system() to pass · 9c40f344
      Eric Blake authored
      When running a cross-compilation to mingw on a Linux host,
      but without a valid mingw rm executable, the debug-only
      system() call would fail.  This is not fatal to the test,
      since the call is merely a debugging aid if a prior call to
      the test encountered a failure and left garbage; in general,
      the tests should pass and the system() call have nothing to
      clean in the first place.  Also, the system() call only
      needs to happen once at startup, not once per iteration
      into the tests performed by .h files.
      
      * tests/test-lstat.h (test_lstat_func): Move debug cleanup...
      * tests/test-rmdir.h (test_rmdir_func): Likewise.
      * tests/test-unlink.h (test_unlink_func): Likewise.
      * tests/test-fstatat.c (main): ...into callers.
      * tests/test-lstat.c (main): Likewise.
      * tests/test-rmdir.c (main): Likewise.
      * tests/test-unlink.c (main): Likewise.
      * tests/test-unlinkat.c (main): Likewise.
      * tests/test-areadlink-with-size.c (main): Don't require a
      debug-only system call to pass, aiding cross-testing to mingw.
      * tests/test-areadlink.c (main): Likewise.
      * tests/test-areadlinkat-with-size.c (main): Likewise.
      * tests/test-areadlinkat.c (main): Likewise.
      * tests/test-canonicalize-lgpl.c (main): Likewise.
      * tests/test-canonicalize.c (main): Likewise.
      * tests/test-chown.c (main): Likewise.
      * tests/test-fchownat.c (main): Likewise.
      * tests/test-lchown.c (main): Likewise.
      * tests/test-fdutimensat.c (main): Likewise.
      * tests/test-futimens.c (main): Likewise.
      * tests/test-link.c (main): Likewise.
      * tests/test-linkat.c (main): Likewise.
      * tests/test-mkdir.c (main): Likewise.
      * tests/test-mkdirat.c (main): Likewise.
      * tests/test-mkfifo.c (main): Likewise.
      * tests/test-mkfifoat.c (main): Likewise.
      * tests/test-mknod.c (main): Likewise.
      * tests/test-readlink.c (main): Likewise.
      * tests/test-remove.c (main): Likewise.
      * tests/test-rename.c (main): Likewise.
      * tests/test-renameat.c (main): Likewise.
      * tests/test-symlink.c (main): Likewise.
      * tests/test-symlinkat.c (main): Likewise.
      * tests/test-utimens.c (main): Likewise.
      * tests/test-utimensat.c (main): Likewise.
      Signed-off-by: default avatarEric Blake <ebb9@byu.net>
      9c40f344
  11. 24 Dec, 2009 1 commit
  12. 23 Oct, 2009 1 commit
    • Eric Blake's avatar
      tests: avoid several compiler warnings · 82381b9e
      Eric Blake authored
      * tests/test-getcwd.c (main): Avoid buffer underflow.
      * tests/test-getdate.c (main): String literals are not safe with
      putenv, so use setenv.  Declare unused argument.
      * modules/getdate-tests (Depends-on): Add setenv.
      * tests/test-argv-iter.c (main): Declare unused argument.  Avoid
      problems with string literals in char *.
      * tests/test-hash.c (main): Avoid shadowing declaration.
      (insert_new): Treat string literals as char const *.
      * tests/test-getopt.h (test_getopt): Likewise.
      (getopt_loop): Alter types to minimize casting elsewhere.
      * tests/test-getopt_long.h (test_getopt_long, getopt_long_loop)
      (test_getopt_long_posix): Likewise.
      (do_getopt_long): Add wrapper to minimize casting.
      * tests/test-atexit.c (clear_temp_file): Use void.
      * tests/test-areadlink-with-size.c (main): Declare unused
      arguments.
      * tests/test-areadlink.c (main): Likewise.
      * tests/test-areadlinkat-with-size.c (main): Likewise.
      * tests/test-areadlinkat.c (main): Likewise.
      * tests/test-canonicalize-lgpl.c (main): Likewise.
      * tests/test-canonicalize.c (main): Likewise.
      * tests/test-dirent-safer.c (main): Likewise.
      * tests/test-dirname.c (main): Likewise.
      * tests/test-dup2.c (main): Likewise.
      * tests/test-fchdir.c (main): Likewise.
      * tests/test-fcntl-h.c (main): Likewise.
      * tests/test-fcntl-safer.c (main): Likewise.
      * tests/test-fdopendir.c (main): Likewise.
      * tests/test-fdutimensat.c (main): Likewise.
      * tests/test-fflush.c (main): Likewise.
      * tests/test-filenamecat.c (main): Likewise.
      * tests/test-filevercmp.c (main): Likewise.
      * tests/test-fopen-safer.c (main): Likewise.
      * tests/test-fopen.c (main): Likewise.
      * tests/test-fpending.c (main): Likewise.
      * tests/test-fpurge.c (main): Likewise.
      * tests/test-freading.c (main): Likewise.
      * tests/test-fstatat.c (main): Likewise.
      * tests/test-fsync.c (main): Likewise.
      * tests/test-futimens.c (main): Likewise.
      * tests/test-getndelim2.c (main): Likewise.
      * tests/test-gettimeofday.c (main): Likewise.
      * tests/test-getopt.c (main): Likewise.
      * tests/test-i-ring.c (main): Likewise.
      * tests/test-inttypes.c (main): Likewise.
      * tests/test-link.c (main): Likewise.
      * tests/test-lstat.c (main): Likewise.
      * tests/test-math.c (main): Likewise.
      * tests/test-md5.c (main): Likewise.
      * tests/test-memchr2.c (main): Likewise.
      * tests/test-memrchr.c (main): Likewise.
      * tests/test-mkdir.c (main): Likewise.
      * tests/test-mkdirat.c (main): Likewise.
      * tests/test-mkfifoat.c (main): Likewise.
      * tests/test-open.c (main): Likewise.
      * tests/test-openat-safer.c (main): Likewise.
      * tests/test-openat.c (main): Likewise.
      * tests/test-quotearg.c (main): Likewise.
      * tests/test-rawmemchr.c (main): Likewise.
      * tests/test-readlink.c (main): Likewise.
      * tests/test-remove.c (main): Likewise.
      * tests/test-rename.c (main): Likewise.
      * tests/test-renameat.c (main): Likewise.
      * tests/test-rmdir.c (main): Likewise.
      * tests/test-sha1.c (main): Likewise.
      * tests/test-signal.c (main): Likewise.
      * tests/test-sigaction.c (main): Likewise.
      * tests/test-stat.c (main): Likewise.
      * tests/test-stat-time.c (main): Likewise.
      * tests/test-stddef.c (main): Likewise.
      * tests/test-stdint.c (main): Likewise.
      * tests/test-stdio.c (main): Likewise.
      * tests/test-stdlib.c (main): Likewise.
      * tests/test-strchrnul.c (main): Likewise.
      * tests/test-strerror.c (main): Likewise.
      * tests/test-string.c (main): Likewise.
      * tests/test-strtod.c (main): Likewise.
      * tests/test-strverscmp.c (main): Likewise.
      * tests/test-symlink.c (main): Likewise.
      * tests/test-symlinkat.c (main): Likewise.
      * tests/test-sys_stat.c (main): Likewise.
      * tests/test-sys_time.c (main): Likewise.
      * tests/test-time.c (main): Likewise.
      * tests/test-unistd.c (main): Likewise.
      * tests/test-unlink.c (main): Likewise.
      * tests/test-unlinkat.c (main): Likewise.
      * tests/test-utimens.c (main): Likewise.
      * tests/test-utimensat.c (main): Likewise.
      * tests/test-version-etc.c (main): Likewise.
      * tests/test-wchar.c (main): Likewise.
      * tests/test-wctype.c (main): Likewise.
      * tests/test-xprintf-posix.c (main): Likewise.
      * tests/test-posixtm.c (main): Likewise.
      (STREQ): Delete unused macro.
      * tests/test-linkat.c (main): Declare unused arguments.  Avoid
      shadowed variables.
      * tests/test-memchr.c (main): Likewise.
      Signed-off-by: default avatarEric Blake <ebb9@byu.net>
      82381b9e
  13. 21 Oct, 2009 1 commit
    • Eric Blake's avatar
      fdutimensat: new module · 06b8c126
      Eric Blake authored
      Needed for coreutils copy.c to be rewritten to use fts.
      
      * modules/fdutimensat: New file.
      * lib/fdutimensat.c (fdutimensat): Likewise.
      * lib/utimens.h (fdutimensat, lutimensat): Declare new functions.
      * MODULES.html.sh (File system functions): Mention module.
      * modules/fdutimensat-tests: New test.
      * tests/test-fdutimensat.c: Likewise.
      Signed-off-by: default avatarEric Blake <ebb9@byu.net>
      06b8c126
  14. 16 Oct, 2009 1 commit
    • Eric Blake's avatar
      utimensat: new module · 791cc509
      Eric Blake authored
      Provide utimensat where it is missing, and rpl_utimensat to work
      around ENOSYS and EINVAL bugs in older Linux kernels.
      
      * modules/utimensat: New file.
      * lib/utimensat.c (utimensat): Likewise.
      * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Likewise.
      * lib/utimens.c (utimensat): Avoid recursion into rpl_utimensat,
      so we can work around Linux bugs.
      * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Add witnesses.
      * modules/sys_stat (Makefile.am): Substitute them.
      * lib/sys_stat.in.h (utimensat): Declare it.
      * MODULES.html.sh (systems lacking POSIX:2008): Mention module.
      * doc/posix-functions/utimensat.texi (utimensat): Likewise.
      * modules/utimensat-tests: New test.
      * tests/test-utimensat.c: Likewise.
      Signed-off-by: default avatarEric Blake <ebb9@byu.net>
      791cc509
  15. 07 Oct, 2009 1 commit
    • Eric Blake's avatar
      mkdir, mkdirat: add tests · da8f2a56
      Eric Blake authored
      This test exposes failures on cygwin 1.5 and in our mkdirat emulation.
      
      * modules/mkdir-tests: New test.
      * tests/test-mkdir.h: New file.
      * tests/test-mkdir.c: Likewise.
      * tests/test-mkdirat.c: Likewise.
      * modules/openat-tests (Files): Add new files.
      (Makefile.am): Run new test.
      Signed-off-by: default avatarEric Blake <ebb9@byu.net>
      da8f2a56
  16. 24 Sep, 2009 1 commit
    • Eric Blake's avatar
      linkat: new module · c4194dcc
      Eric Blake authored
      * modules/linkat: New file.
      * lib/at-func2.c (at_func2): Likewise.
      * lib/linkat.c (linkat): Likewise.
      * m4/linkat.m4 (gl_FUNC_LINKAT): Likewise.
      * lib/openat-priv.h (at_func2): Add declaration.
      * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Add witnesses.
      * modules/unistd (Makefile.am): Substitute them.
      * lib/unistd.in.h (linkat): Declare it.
      * MODULES.html.sh (systems lacking POSIX:2008): Mention module.
      * doc/posix-functions/linkat.texi (linkat): Likewise.
      * doc/posix-functions/link.texi (link): Tweak wording.
      * tests/test-link.c (main): Move guts...
      * tests/test-link.h (test_link): ...into new file.
      * modules/linkat-tests: New test.
      * tests/test-linkat.c: Likewise.
      * modules/link-tests (Files): Ship new file.
      (Depends-on): Add stdbool.
      Signed-off-by: default avatarEric Blake <ebb9@byu.net>
      c4194dcc
  17. 10 Sep, 2009 2 commits
  18. 20 Jan, 2009 3 commits
  19. 16 Nov, 2008 1 commit
  20. 02 Oct, 2008 1 commit
    • Richard W.M. Jones's avatar
      fsync: new module · 9d7e96c8
      Richard W.M. Jones authored
      * lib/fsync.c: New file.
      * m4/fsync.m4: New file.
      * modules/fsync: New file.
      * modules/fsync-tests: New file.
      * tests/test-fsync.c: New file.
      * modules/unistd: Substitute GNULIB_FSYNC and HAVE_FSYNC.
      * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Define and AC_SUBST
      both GNULIB_FSYNC and HAVE_FSYNC.
      * lib/unistd.in.h (@GNULIB_FSYNC@): Add a block for fsync.
      * MODULES.html.sh (posix_functions): Add fsync.
      * doc/posix-functions/fsync.texi: Update.
      9d7e96c8