summaryrefslogtreecommitdiff
path: root/tests/test-fchmodat.c
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
|
* fchmod-tests, fchmodat tests, lchmod tests: Add more tests.Bruno Haible2021-01-091-0/+33
| | | | | | | | * tests/test-fchmod.c: Include <fcntl.h>. (BASE): New macro. (main): Add more tests. * tests/test-fchmodat.c (main): Add more tests. * tests/test-lchmod.c (main): Likewise.
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* fchmodat: Strengthen tests.Bruno Haible2020-02-081-3/+11
| | | | | | * tests/test-fchmodat.c (BASE): New macro. (main): Use it, to avoid conflicts with other unit tests. Verify that fchmodat changed the file permission bits.
* fchmodat: AT_SYMLINK_NOFOLLOW fix for non-symlinksPaul Eggert2020-02-071-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix lchmod, and fchmodat with AT_SYMLINK_NOFOLLOW, so that they act like chmod on non-symlinks. * NEWS: * doc/glibc-functions/lchmod.texi (lchmod): * doc/posix-functions/fchmodat.texi (fchmodat): Mention this. * lib/fchmodat.c: Define __need_system_sys_stat_h before including config.h, and undef it after including sys/stat.h the first time. Include fcntl.h, stdio.h, unistd.h, intprops.h, and include sys/stat.h a second time after defining orig_fchmodat. (orig_fchmodat) [HAVE_FCHMODAT]: New function. (fchmodat) [HAVE_FCHMODAT]: Work around the AT_SYMLINK_NOFOLLOW bug. * lib/lchmod.c: New file. * lib/sys_stat.in.h (fchmodat, lchmod): Support replacing these functions. * m4/fchmodat.m4 (gl_FUNC_FCHMODAT): If fchmodat exists, test that AT_SYMLINK_NOFOLLOW works on non-symlinks. * m4/lchmod.m4 (gl_FUNC_LCHMOD): Check for lstat. Test that lchmod works on non-symlinks. * m4/sys_stat_h.m4 (gl_SYS_STAT_H_DEFAULTS): Default REPLACE_FCHMODAT and REPLACE_LCHMOD to 0. * modules/fchmodat (Depends-on): Add fstatat, intprops, lchmod, unistd. (Depends-on, configure.ac): Check REPLACE_FCHMODAT too. * modules/lchmod (Files): Add lib/lchmod.c. (Depends-on): Add errno, fcntl-h, fchmodat, intprops, lstat, unistd. (configure.ac): Compile lchmod.c if needed. (lib_SOURCES): Add lchmod.c. * modules/sys_stat (sys/stat.h): Substitute REPLACE_FCHMODAT and REPLACE_LCHMOD. * tests/test-fchmodat.c: Include fcntl.h, sys/stat.h. (main): Test fchmodat with AT_SYMLINK_NOFOLLOW on non-symlinks.
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* all: prefer https: URLsPaul Eggert2017-09-131-1/+1
|
* 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>
* Fix typo in previous change, by including <unistd.h>.Paul Eggert2013-01-221-0/+1
|
* 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".
* openat tests: EBADF tests.Bruno Haible2011-09-201-0/+44
* tests/test-fchownat.c (main): Add tests for EBADF. * tests/test-fstatat.c (main): Likewise. * tests/test-mkdirat.c (main): Likewise. * tests/test-openat.c (main): Likewise. * tests/test-unlinkat.c (main): Likewise. * tests/test-fchmodat.c: New file. * modules/openat-tests (Files): Add tests/test-fchmodat.c. (Makefile.am): Also run 'test-fchmodat'.