Commit Graph

8 Commits

Author SHA1 Message Date
73fa3d6822 Update copyright headers 2018-12-24 23:46:43 +00:00
c6782f144a tests: change the license to GPL-2.0-or-later
strace test suite is now provided under the terms of the GNU General
Public License version 2 or later, see tests/COPYING for more details.
2018-12-10 00:00:00 +00:00
Eugene Syromyatnikov
9d095c7860 Add copyright headers 2017-05-22 17:33:51 +00:00
ca2bf7c9e9 tests: drop non-USE_ASM_STAT case support
With the switch of fstatat family tests to USE_ASM_STAT variant,
there are no non-USE_ASM_STAT users left.  Remove support of unused
non-USE_ASM_STAT case.

* configure.ac (AC_CHECK_MEMBERS): Remove struct stat.st_mtim.tv_nsec.
* tests/fstatat.c (USE_ASM_STAT): Remove.
* tests/fstatx.c: Likewise.
* tests/lstatx.c: Likewise.
* tests/xstatx.c: Assume USE_ASM_STAT.
[!USE_ASM_STAT]: Remove.
2017-01-13 20:07:09 +00:00
Eugene Syromyatnikov
3815851894 tests: prepare for additional tests of stat decoders
PRINT_SYSCALL_HEADER/PRINT_SYSCALL_FOOTER now contain open/close brace
pair in order to save errno.  PRINT_SYSCALL_FOOTER now uses sprintrc for
printing rc/errno.

* tests/xstatx.c: Include <errno.h>.
(main): Update PRINT_SYSCALL_FOOTER call convention.
* tests/fstatat.c (PRINT_SYSCALL_HEADER): Add errno saving.
(PRINT_SYSCALL_FOOTER): Restore errno.
* tests/fstatx.c: Likewise.
* tests/lstatx.c: Likewise.
2016-10-31 00:49:28 +03:00
7bbf8b54cd tests: fix TEST_SYSCALL_{NR,STR} and STRUCT_STAT_STR macros for musl
The contents of TEST_SYSCALL_NAME and STRUCT_STAT macros was subject
to macro expansion when used in definitions of TEST_SYSCALL_NR,
TEST_SYSCALL_STR, and STRUCT_STAT_STR macros.

As some libcs, e.g. musl libc, define lfs64 names as macros
(stat64 as stat, lstat64 as lstat, etc.), this might result to incorrect
expansion of TEST_SYSCALL_NR, TEST_SYSCALL_STR, and STRUCT_STAT_STR
macros.  To avoid this problem, define these macros directly and remove
TEST_SYSCALL_NAME macro.

* tests/_newselect.c (TEST_SYSCALL_NAME): Remove.
(TEST_SYSCALL_NR, TEST_SYSCALL_STR): New macros.
* tests/fcntl.c: Likewise.
* tests/fcntl64.c: Likewise.
* tests/fstat.c: Likewise.
* tests/fstatat64.c: Likewise.
* tests/lstat.c: Likewise.
* tests/newfstatat.c: Likewise.
* tests/select.c: Likewise.
* tests/stat.c: Likewise.
* tests/fstat64.c (TEST_SYSCALL_NAME): Remove.
(TEST_SYSCALL_NR, TEST_SYSCALL_STR, STRUCT_STAT_STR): New macros.
* tests/lstat64.c: Likewise.
* tests/stat64.c: Likewise.
* tests/fstatx.c (TEST_SYSCALL_NR, nrify, nrify_): Remove.
* tests/lstatx.c: Likewise.
* tests/struct_flock.c (TEST_SYSCALL_NR, TEST_SYSCALL_STR, nrify,
nrify_, stringify, stringify_): Remove.
* tests/xselect.c: Likewise.
* tests/xstatx.c: Check TEST_SYSCALL_STR instead of TEST_SYSCALL_NAME.
(STRUCT_STAT_STR, TEST_SYSCALL_STR, stringify, stringify_): Remove.
[!STRUCT_STAT] (STRUCT_STAT_STR): New macro.
2016-01-12 03:07:39 +00:00
38a34c9349 Add copyright headers to some files which lack them
Before this change, all files that exist since 20th century had
copyright headers, while most files that appeared later didn't.  This
change fixes the inconsistency by adding missing copyright headers.

It doesn't mean that copyright headers became maintained.  In my view,
git history provides much better information on this subject and is much
more accurate than copyright headers.
2015-12-17 17:56:48 +00:00
38e37686f2 tests: add lstat.test and lstat64.test
* tests/lstat.c: New file.
* tests/lstat64.c: Likewise.
* tests/lstatx.c: Likewise.
* tests/lstat.test: New test.
* tests/lstat64.test: Likewise.
* tests/Makefile.am (check_PROGRAMS): Add lstat and lstat64.
(lstat64_CFLAGS): Define.
(TESTS): Add lstat.test and lstat64.test.
(EXTRA_DIST): Add lstatx.c.
* tests/.gitignore: Add lstat and lstat64.
2015-12-05 00:03:02 +00:00