Fei Jie
506a42f8c3
tests: add rmdir.test
...
* tests/rmdir.c: New file.
* tests/rmdir.test: New test.
* tests/.gitignore: Add rmdir.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add rmdir.test.
2016-04-25 10:24:12 +00:00
Fei Jie
7f05113624
tests: add setdomainname.test
...
* tests/setdomainname.c: New file.
* tests/setdomainname.test: New test.
* tests/.gitignore: Add setdomainname.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add setdomainname.test.
2016-04-25 10:24:12 +00:00
Fei Jie
cd61c9f3e4
tests: add sched_rr_get_interval.test
...
* tests/sched_rr_get_interval.c: New file.
* tests/sched_rr_get_interval.test: New test.
* tests/.gitignore: Add sched_rr_get_interval.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add sched_rr_get_interval.test.
2016-04-25 10:24:12 +00:00
b4a478dbfa
statfs: decode f_flags field of struct statfs
...
* xlat/statfs_flags.in: New file.
* statfs.c: Include "xlat/statfs_flags.h".
(printstatfs) [_STATFS_F_FLAGS]: Print statbuf.f_flags as flags.
(printstatfs64) [_STATFS_F_FLAGS]: Likewise.
(printcompat_statfs64): Likewise.
* tests/statfs.expected: Update.
2016-04-25 01:58:25 +00:00
Zev Weiss
b587a5a1be
statfs: don't quote f_type macro names
...
* statfs.c (sprintfstype): Don't add double-quotes to fs magic macros.
* tests/statfs.expected: Remove double-quotes.
2016-04-25 01:54:05 +00:00
6c69ed7ac5
tests/shmxt.c: robustify against arch specific issues
...
Do not treat failed shmat(SHM_RND) as a test failure.
This change partially reverts commit
bea707377d2ee3e1950bfa43537ef928163a5fa6.
* tests/shmxt.c (main): Use SHM_RND in the second shmat call,
do not treat its potential error as a test failure.
2016-04-25 01:54:05 +00:00
3db07f11c8
Fix old_mmap output when mmap arguments are unfetchable
...
* mem.c (SYS_FUNC(old_mmap)): Use umove_or_printaddr instead of umoven
to fetch mmap arguments, return RVAL_DECODED when umove_or_printaddr
fails.
* tests/old_mmap.c (main): Check it.
2016-04-23 00:07:14 +00:00
3797d10e82
tests: extend test coverage of mmap syscall
...
Check decoding of "old mmap" edition of mmap syscall
on those architectures that define it.
* tests/old_mmap.c: New file.
* tests/old_mmap.test: New test.
* tests/.gitignore: Add old_mmap.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add old_mmap.test.
2016-04-22 23:28:23 +00:00
0e6cb1740a
tests: extend test coverage of mincore syscall
...
* tests/mincore.c (print_mincore): New function.
(test_mincore): Use it. Check mincore with invalid vec address.
Check mincore with length argument not a multiple of the page size.
(main): Check with DEFAULT_STRLEN pages.
2016-04-22 14:14:39 +00:00
a9540e72c7
tests: check decoding of clock_adjtime syscall
...
* tests/clock_adjtime.c: New file.
* tests/clock_adjtime.test: New test.
* tests/.gitignore: Add clock_adjtime.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add clock_adjtime.test.
2016-04-22 01:13:27 +00:00
fa5e5d9854
tests: do not include <assert.h> unnecessarily
...
Automatically change tests/*.c files using the following script:
for f in tests/*.c; do
grep -q '\<assert(' "$f" ||
sed -i '/# *include *<assert\.h>/d' "$f"
done
2016-04-21 22:05:57 +00:00
96a9ff5746
tests: do not include <errno.h> unnecessarily
...
Automatically change tests/*.c files using the following script:
for f in tests/*.c; do
grep -Fv errno.h "$f" |
grep -Ewq '(si_)?errno|SOCK_FILTER_DENY_SYSCALL' ||
sed -i '/# *include *<errno\.h>/d' "$f"
done
2016-04-21 22:05:57 +00:00
e5297aeb13
tests/xetpriority.c: print syscall() result using %ld format
2016-04-21 22:05:57 +00:00
8141093cd0
tests/xetpgid.c: print syscall() result using %ld format
2016-04-21 22:05:57 +00:00
556179345b
tests/xchownx.c: use errno2name
2016-04-21 22:05:57 +00:00
92288b2ba3
tests/userfaultfd.c: stop using assert
2016-04-21 22:05:56 +00:00
5d8c235110
tests/unlinkat.c: print syscall() result using %ld format
2016-04-21 22:05:56 +00:00
0df647673a
tests/umount.c: use errno2name
2016-04-21 22:05:56 +00:00
ae4ba89702
tests/truncate64.c: cleanup
...
* tests/truncate64.c (main): Use errno2name, stop using assert.
2016-04-21 22:05:56 +00:00
2eec1ce820
tests/truncate.c: cleanup
...
* tests/truncate.c (main): Use errno2name, stop using assert.
2016-04-21 22:05:56 +00:00
7456b6420b
tests/tee.c: stop using assert
2016-04-21 22:05:56 +00:00
86a090120a
tests/syslog.c: use errno2name
2016-04-21 22:05:56 +00:00
82dd238b84
tests/sync_file_range2.c: stop using assert
2016-04-21 22:05:56 +00:00
3694b0c5bd
tests/sync_file_range.c: stop using assert
2016-04-21 22:05:56 +00:00
5bc585ecc8
tests/symlinkat.c: cleanup
2016-04-21 22:05:56 +00:00
f75e034c84
tests/swap.c: cleanup
...
* tests/swap.c (error_msg): Remove.
(main): Use errno2name.
2016-04-21 22:05:56 +00:00
f5748b006f
tests/splice.c: stop using assert
2016-04-21 22:05:56 +00:00
0b52ac3134
tests/setugid.c: cleanup
2016-04-21 22:05:56 +00:00
60b9187a7c
tests/sethostname.c: use errno2name
2016-04-21 22:05:56 +00:00
b255f6e186
tests/setgroups.c: use errno2name
...
* tests/setgroups.c (errno2str): Remove.
(main): Use errno2name.
2016-04-21 22:05:56 +00:00
4483f628ab
tests/seccomp-strict.c: cleanup
...
* tests/seccomp-strict.c (main): Use errno2name, stop using assert.
2016-04-21 22:05:56 +00:00
14fa74f9aa
tests/seccomp-filter.c: cleanup
...
* tests/seccomp-filter.c (main): Use errno2name, stop using assert.
2016-04-21 22:05:56 +00:00
06c2828ee1
tests/sched_xetscheduler.c: print syscall() result using %ld format
2016-04-21 22:05:56 +00:00
61042d491b
tests/sched_xetparam.c: print syscall() result using %ld format
2016-04-21 22:05:56 +00:00
3f470d83de
tests/renameat.c: print syscall() result using %ld format
2016-04-21 22:05:56 +00:00
f224909546
tests/rename.c: print syscall() result using %ld format
2016-04-21 22:05:56 +00:00
92e3cca998
tests/readv.c: cleanup
2016-04-21 22:05:56 +00:00
304689e4ec
tests/pwritev.c: use errno2name
2016-04-21 22:05:56 +00:00
cf1cfe13be
tests/preadv-pwritev.c: cleanup
2016-04-21 22:05:56 +00:00
abde241e68
tests/prctl-seccomp-strict.c: cleanup
...
* tests/prctl-seccomp-strict.c (main): Use errno2name,
stop using assert.
2016-04-21 22:05:55 +00:00
037ab86e9a
tests/openat.c: use errno2name
2016-04-21 22:05:55 +00:00
1e2f5f7733
tests/open.c: use errno2name
2016-04-21 22:05:55 +00:00
84aeea7e29
tests/mlockall.c: cleanup
2016-04-21 22:05:55 +00:00
c0b1d6f37c
tests/mlock2.c: stop using assert
2016-04-21 22:05:55 +00:00
d0652a40eb
tests/mknod.c: print syscall() result using %ld format
2016-04-21 22:05:55 +00:00
a175bfe445
tests/mkdirat.c: print syscall() result using %ld format
2016-04-21 22:05:55 +00:00
1b511d0fea
tests/lseek.c: cleanup
...
* tests/lseek.c (main): Use errno2name, stop using assert.
2016-04-21 22:05:55 +00:00
cd157776bd
tests/llseek.c: cleanup
...
* tests/llseek.c (main): Use errno2name, stop using assert.
2016-04-21 22:05:55 +00:00
5c62af0753
tests/linkat.c: print syscall() result using %ld format
2016-04-21 22:05:55 +00:00
33e0df7074
tests/iopl.c: use errno2name
2016-04-21 22:05:55 +00:00