summaryrefslogtreecommitdiff
path: root/tests/test-futimens.h
Commit message (Collapse)AuthorAgeFilesLines
* maint: run 'make update-copyright'Simon Josefsson2023-01-011-1/+1
|
* license: fix GPLv3 texts to use a comma instead of semicolon.Bernhard Voelker2022-01-051-1/+1
| | | | | | | | | See: https://www.gnu.org/licenses/gpl-3.0.html#howto Run: $ git grep -l 'Foundation; either version 3' \ | xargs sed -i '/Foundation; either version 3/ s/n; e/n, e/' * All files using GPLv3: Adjust via the above command.
* maint: run 'make update-copyright'Paul Eggert2022-01-011-1/+1
|
* utimens, utimensat, fdutimensat: Avoid test failures on AIX 7.2.Bruno Haible2021-01-061-1/+1
| | | | | | | * lib/utimecmp.c (utimecmpat): On AIX, declare equality when the two times differ by less than 0.01 seconds. * tests/test-futimens.h (test_futimens): Pass UTIMECMP_TRUNCATE_SOURCE flag.
* utimens: Avoid test failures on macOS 10.13.Bruno Haible2021-01-021-1/+1
| | | | | | | | | | | Reported by Martin Storsjö <martin@martin.st> in <https://lists.gnu.org/archive/html/bug-gnulib/2020-12/msg00003.html>. * tests/test-utimens-common.h (check_ctime): Define to -1 on macOS. * tests/test-utimens.h (test_utimens): Don't expect a ctime change when only the atime is requested to change. * tests/test-futimens.h (test_futimens): Likewise. * tests/test-lutimens.h (test_lutimens): Likewise.
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* timespec: fix resolution confusionPaul Eggert2018-09-101-1/+1
| | | | | | | | | | | In normal usage, clock resolution is given in seconds, but the code was mistakenly using inverse seconds and calling it “resolution”. Fix this, partly by renaming two identifiers. The old names will be kept for a bit, to ease transition. * lib/timespec.h (TIMESPEC_HZ, LOG10_TIMESPEC_HZ): New constants, replacing TIMESPEC_RESOLUTION and LOG10_TIMESPEC_RESOLUTION, which are now obsolescent. All uses changed.
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* all: prefer https: URLsPaul Eggert2017-09-131-1/+1
|
* futimens: don’t assume struct timespec layoutPaul Eggert2017-08-151-4/+20
| | | | | | | | | | | | | * m4/futimens.m4 (gl_FUNC_FUTIMENS): * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): * tests/test-fdutimensat.c (main): * tests/test-futimens.h (test_futimens): * tests/test-lutimens.h (test_lutimens): * tests/test-utimens.h (test_utimens): * tests/test-utimensat.c (main): Don’t assume that struct timespec is a two-member structure in tv_sec, tv_nsec order. Although this is true on all platforms we know about, POSIX does not guarantee it.
* version-etc: new yearPaul Eggert2017-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2016-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2014-12-311-1/+1
| | | | | | * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
* maint: update copyrightEric Blake2014-01-011-1/+1
| | | | | | I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
* tests: don't assume fd 99 is closedPaul Eggert2013-01-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * tests/test-accept.c, tests/test-accept4.c, tests/test-bind.c: * tests/test-close.c, tests/test-connect.c, tests/test-dprintf.c: * tests/test-dup.c, tests/test-dup2.c, tests/test-faccessat.c: * tests/test-fchdir.c, tests/test-fchmod.c, tests/test-fchmodat.c: * tests/test-fchown.c, tests/test-fchownat.c, tests/test-fclose.c: * tests/test-fdatasync.c, tests/test-fdopen.c, tests/test-fdopendir.c: * tests/test-fflush.c, tests/test-fgetc.c, tests/test-fputc.c: * tests/test-fread.c, tests/test-freopen.c, tests/test-fseeko4.c: * tests/test-fstat.c, tests/test-fstatat.c, tests/test-fsync.c: * tests/test-ftello4.c, tests/test-ftruncate.c, tests/test-futimens.h: * tests/test-fwrite.c, tests/test-getpeername.c: * tests/test-getsockname.c, tests/test-getsockopt.c: * tests/test-grantpt.c, tests/test-ioctl.c, tests/test-isatty.c: * tests/test-linkat.c, tests/test-listen.c, tests/test-lseek.c: * tests/test-mkdirat.c, tests/test-mkfifoat.c, tests/test-openat.c: * tests/test-pread.c, tests/test-pwrite.c, tests/test-read.c: * tests/test-readlinkat.c, tests/test-recv.c, tests/test-recvfrom.c: * tests/test-renameat.c, tests/test-select.h, tests/test-send.c: * tests/test-sendto.c, tests/test-setsockopt.c, tests/test-shutdown.c: * tests/test-symlinkat.c, tests/test-ttyname_r.c: * tests/test-unlinkat.c, tests/test-unlockpt.c: * tests/test-utimensat.c, tests/test-vdprintf.c, tests/test-write.c: Close file descriptor 99, instead of assuming it's already closed.
* maint: update all copyright year number rangesEric Blake2013-01-011-1/+1
| | | | | | Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* tests: factor out st_ctime-comparison code (a dozen uses)Jim Meyering2011-11-171-12/+4
| | | | | | | * tests/test-utimens-common.h (ctime_compare): Define. * tests/test-futimens.h (test_futimens): Replace open-coded equivalent. * tests/test-lutimens.h (test_lutimens): Likewise. * tests/test-utimens.h (test_utimens): Likewise.
* test-futimens: avoid a warning from gcc -WshadowJim Meyering2011-09-241-4/+4
| | | | | * tests/test-futimens.h (test_futimens): Rename inner local, s/fd/fd0/ to avoid a shadowing warning.
* utimens, futimens, fdutimensat tests: EBADF tests.Bruno Haible2011-09-201-6/+15
| | | | * tests/test-futimens.h (test_futimens): Add more tests for EBADF.
* futimens: enhance testEric Blake2011-09-191-0/+8
| | | | | | | | | Test that previous futimens change doesn't regress. * tests/test-futimens.h (test_futimens): Also check for EBADF on closed non-negative fd. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update almost all copyright ranges to include 2011Jim Meyering2011-01-011-1/+1
| | | | Run the new "make update-copyright" rule.
* futimens: work around Solaris 11 bugEric Blake2010-10-111-0/+3
| | | | | | | | | | | | Revert "test-futimens: avoid unwarranted test failure on Solaris 5.11" This reverts commit 0afab138f4aedb7eaab70957c164aa0e5eb01fce. * m4/futimens.m4 (gl_FUNC_FUTIMENS): Detect the bug. * tests/test-futimens.h (test_futimens): Enhance, rather than weaken test. * doc/posix-functions/futimens.texi (futimens): Document the bug. Signed-off-by: Eric Blake <eblake@redhat.com>
* test-futimens: avoid unwarranted test failure on Solaris 5.11Jim Meyering2010-10-111-1/+1
| | | | | | * tests/test-futimens.h (test_futimens): When provoking EBADF, use an invalid file descriptor, so we don't provoke EFAULT from Solaris 5.11, because it tries to dereference the NULL name argument.
* fdutimens, fdutimensat: update signature, againEric Blake2010-09-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Eric Blake <eblake@redhat.com>
* update nearly all FSF copyright year lists to include 2010Jim Meyering2010-01-011-1/+1
| | | | | Use the same procedure as for 2009, outlined in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
* tests: fix license on several testsEric Blake2009-12-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The use of GPLv2+ was a relic of copy-and-paste, and not intentional. * tests/test-des.c: Update to GPLv3+. * tests/test-flock.c: Likewise. * tests/test-fsync.c: Likewise. * tests/test-futimens.h: Likewise. * tests/test-gc-arcfour.c: Likewise. * tests/test-gc-arctwo.c: Likewise. * tests/test-gc-des.c: Likewise. * tests/test-gc-hmac-md5.c: Likewise. * tests/test-gc-hmac-sha1.c: Likewise. * tests/test-gc-md2.c: Likewise. * tests/test-gc-md4.c: Likewise. * tests/test-gc-md5.c: Likewise. * tests/test-gc-pbkdf2-sha1.c: Likewise. * tests/test-gc-rijndael.c: Likewise. * tests/test-gc-sha1.c: Likewise. * tests/test-gc.c: Likewise. * tests/test-getcwd.c: Likewise. * tests/test-link.c: Likewise. * tests/test-link.h: Likewise. * tests/test-lutimens.h: Likewise. * tests/test-md2.c: Likewise. * tests/test-md4.c: Likewise. * tests/test-mkdir.h: Likewise. * tests/test-rename.c: Likewise. * tests/test-rename.h: Likewise. * tests/test-safe-alloc.c: Likewise. * tests/test-utimens-common.h: Likewise. * tests/test-utimens.h: Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
* utimens: check for ctime updateEric Blake2009-12-191-4/+31
| | | | | | | | | | | | | | futimens/utimensat on Linux fails to bump ctime if mtime is UTIME_OMIT and atime is specified. * tests/test-utimens-common.h (check_ctime): Define. * tests/test-utimens.h (test_utimens): Expose the Linux bug. * tests/test-futimens.h (test_futimens): Likewise. * tests/test-lutimens.h (test_lutimens): Likewise. * doc/posix-functions/futimens.texi (futimens): Document the bug. * doc/posix-functions/utimensat.texi (utimensat): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
* test-stat-time, test-utimens: improve portabilityEric Blake2009-10-161-35/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ext4 on an alpha system has a quantization of about 10 ms but a resolution of 1ns; utimecmp does not know about quantization, so tests were failing when comparing timestamps that fall within the same quantization window. Add strategic usleeps throughout to minimize this issue, whether or not we later improve utimecmp to account for quantization. Windows (and hence cygwin) is documented as having a default clock quantization of 15.25 milliseconds (although it can be reduced to 1 millisecond); file timestamps are quantized to this boundary even though more accurate timing can be obtained. However, this means that 15 milliseconds is too short for any test that wants to guarantee crossing a file timestamp boundary. Cygwin, however, still has bugs where clock_gettime can lag behind file timestamps, which is not fixed by this patch. Solaris 9 with NFS exposed the same problem for futimes that was previously fixed for utimes on Solaris 8, where futimens(f,NULL) uses a different time source than futimes(,{,UTIME_NOW}). * tests/test-stat-time.c (nap): Lengthen delay to 20ms, for ext4 on alpha, and for cygwin. * tests/test-utimens-common.h: New file. (nap): Factor delays into single function. * tests/test-lutimens.h (test_lutimens): Use new header. * tests/test-futimens.h (test_futimens): Likewise. * tests/test-utimens.h (test_utimens): Likewise. Also, force NFS timestamps to occur from same machine, as was done previously for test_utimens. * modules/utimens-tests (Files): Ship new file. * modules/futimens-tests (Files): Likewise. Reported in part by Jim Meyering. Signed-off-by: Eric Blake <ebb9@byu.net>
* utimens: add testEric Blake2009-10-101-0/+127
Exposes holes in our API, and several platform bugs. * modules/utimens-tests: New test. * tests/test-utimens.h: New file. * tests/test-futimens.h: Likewise. * tests/test-utimens.c: Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>