Commit Graph

576 Commits

Author SHA1 Message Date
2e8a7871ab tests: move definitions of $OUT and $ERR to init.sh
As virtually every test defines either one or both of OUT and ERR
variables and these definitions are exactly the same, move definitions
of these variables from individual tests to init.sh.

* tests/init.sh (OUT, ERR): New variables.
* tests/ipc.sh: Remove initialization of OUT variable.
* tests/statx.sh: Likewise.
* tests/*.test: Remove initialization of OUT and ERR variables.
2016-03-30 00:13:37 +00:00
a990e8c671 tests: simplify sendfile.test and sendfile64.test
Use the executable itself for input by default.

* tests/sendfile.c (main): Use av[0] instead of av[1] for input.
* tests/sendfile64.c (main): Likewise.
* tests/sendfile.test: Invoke run_prog without arguments.
* tests/sendfile64.test: Likewise.
2016-03-29 17:01:02 +00:00
1e7dfc38fd open.test, openat.test: lift /proc requirement
While -P option needs /proc to match descriptors, it does not use
/proc to match pathnames.  As these tests do not need descriptor
match, the /proc requirement can be safely lifted.

* tests/open.test: Lift /proc/self/fd/ requirement.
* tests/openat.test: Likewise.
2016-03-29 03:33:00 +00:00
JayRJoshi
d2029cc4a1 tests/uname.test: check abbreviated output, use print_quoted_string
* tests/uname.c (main): Use print_quoted_string to print
utsname members.  Add abbrev check.
* tests/uname.test: Add abbrev check.
2016-03-28 23:25:30 +00:00
90406df134 faccessat.test: robustify against libcs invoking faccessat syscall on their own
* tests/faccessat.c (TMP_FILE): Rename to sample, change its value
to "faccessat.sample".
* tests/faccessat.test: Rewrite using openat.test.
2016-03-28 00:16:17 +00:00
347a5d45ec openat.test: robustify against libcs invoking openat syscall on their own
* tests/openat.c (main): Rename fname to sample, change its value
to "openat.sample".
* tests/openat.test: Use -P option to filter out openat syscalls
made by libc and dynamic linker.
2016-03-28 00:16:02 +00:00
f09a474877 tests: add open.test
* tests/open.c: New file.
* tests/open.test: New test.
* tests/.gitignore: Add open.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add open.test.
2016-03-28 00:15:15 +00:00
9d91928320 Fix decoding of device numbers in mknod and mknodat syscalls
* mknod.c (decode_mknod): Treat device number argument as unsigned int.
* tests/mknod.c: Include <sys/sysmacros.h> or <sys/mkdev.h>
for definition of makedev macro.
(main): Add a check for a character special file.
2016-03-25 23:48:48 +00:00
Katerina Koukiou
6598026d6a tests: add openat.test
* tests/openat.c: New file.
* tests/openat.test: New test.
* tests/.gitignore: Add openat.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add openat.test.
2016-03-25 19:40:12 +00:00
Fei Jie
896479de76 tests: add renameat.test
* tests/renameat.c: New file.
* tests/renameat.test: New test.
* tests/.gitignore: Add renameat.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add renameat.test.
2016-03-25 09:47:16 +00:00
Fei Jie
e2975b61b3 tests: add faccessat.test
* tests/faccessat.c: New file.
* tests/faccessat.test: New test.
* tests/.gitignore: Add faccessat.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add faccessat.test.
2016-03-25 09:47:15 +00:00
Fei Jie
8346e63e43 tests: add creat.test
* tests/creat.c: New file.
* tests/creat.test: New test.
* tests/.gitignore: Add creat.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add creat.test.
2016-03-25 09:47:14 +00:00
Fei Jie
0ebe67b780 tests: add mknod.test
* tests/mknod.c: New file.
* tests/mknod.test: New test.
* tests/.gitignore: Add mknod.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add mknod.test.
2016-03-25 09:47:13 +00:00
Fei Jie
9a88371122 tests: add syslog.test
* tests/syslog.c: New file.
* tests/syslog.test: New test.
* tests/.gitignore: Add syslog.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add syslog.test.
2016-03-25 09:46:19 +00:00
JayRJoshi
c4e36dc14e tests/scm_rights-fd.test: fix pathname regex
Pathname containing >, }, or non-printable characters was resulting
in failing of the test.

* tests/scm_rights-fd.test: Fix pathname regex and simplify things.
2016-03-23 19:13:13 +00:00
e10ab4cdbc tests: add strace-r.test
* tests/strace-r.expected: New file.
* tests/strace-r.test: New test.
* tests/Makefile.am (MISC_TESTS): Add it.
(EXTRA_DIST): Add strace-r.expected.
2016-03-24 01:27:03 +00:00
534a39292a tests: add strace-ttt.test
* tests/strace-ttt.test: New test.
* tests/Makefile.am (MISC_TESTS): Add it.
2016-03-24 01:10:02 +00:00
e4d110df88 tests: add strace-tt.test
* tests/strace-tt.test: New test.
* tests/Makefile.am (MISC_TESTS): Add it.
2016-03-24 01:03:31 +00:00
ac2c43e8e9 tests: add strace-t.test
* tests/strace-t.test: New test.
* tests/Makefile.am (MISC_TESTS): Add it.
2016-03-24 00:59:32 +00:00
a08d03f08d tests: add strace-T.test
* tests/strace-T.expected: New file.
* tests/strace-T.test: New test.
* tests/Makefile.am (MISC_TESTS): Add it.
(EXTRA_DIST): Add strace-T.expected.
2016-03-24 00:31:23 +00:00
f7f7e601c3 tests: split out tests of specific decoders
Split TESTS into three groups: tests of specific decoders, libunwind
tests, and all other tests.

* tests/Makefile.am (TESTS): Move attach-f-p.test, attach-p-cmd.test,
bexecve.test, count-f.test, count.test, detach-running.test,
detach-sleeping.test, detach-stopped.test, dumpio.test,
filter-unavailable.test, fork-f.test, ksysent.test, opipe.test,
pc.test, qual_syscall.test, redirect.test, restart_syscall.test,
strace-f.test, and vfork-f.test to MISC_TESTS.
Move remaining tests except $(LIBUNWIND_TESTS) to DECODER_TESTS.
Add $(DECODER_TESTS) and $(MISC_TESTS).
2016-03-23 23:07:02 +00:00
JayRJoshi
39ab120626 tests: add getcwd.test
* tests/getcwd.c: New file.
* tests/getcwd.test: New test.
* tests/.gitignore: Add getcwd.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add getcwd.test.
2016-03-23 13:38:35 +00:00
JayRJoshi
17654da621 tests: add print_quoted_string function to libtests
* tests/tests.h (print_quoted_string): New prototype.
* tests/print_quoted_string.c: New file.
* tests/Makefile.am (libtests_a_SOURCES): Add it.
2016-03-23 13:34:15 +00:00
Fei Jie
032a9a4358 tests: add xetpriority.test
* resource.c (SYS_FUNC(getpriority), SYS_FUNC(setpriority)): Print
the second syscall argument using %d format.
* tests/xetpriority.c: New file.
* tests/xetpriority.test: New test.
* tests/.gitignore: Add xetpriority.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add xetpriority.test.
2016-03-17 09:30:45 +00:00
Fei Jie
b824f9872b tests: add flock.test
* tests/flock.c: New file.
* tests/flock.test: New test.
* tests/.gitignore: Add flock.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add flock.test.
2016-03-15 08:38:34 +00:00
Fei Jie
c3fb92c0ae tests: add sched_xetscheduler.test
* tests/sched_xetscheduler.c: New file.
* tests/sched_xetscheduler.test: New test.
* tests/.gitignore: Add sched_xetscheduler.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add sched_xetscheduler.test.
2016-03-15 08:38:17 +00:00
ab26390287 alpha: fix SOCK_DIAG_BY_FAMILY tests
This complements commit v4.9-368-g301c65c.

* tests/netlink_inet_diag.c (check_responses): Align "buf"
on sizeof(long) boundary.
* tests/netlink_unix_diag.c (check_responses): Likewise.
2016-03-15 02:54:38 +00:00
b389028e08 tests: add count-f.test
* tests/count-f.c: New file.
* tests/count-f.expected: Likewise.
* tests/count-f.test: New test.
* tests/.gitignore: Add count-f.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(count_f_LDADD): New variable.
(EXTRA_DIST): Add count-f.expected.
(TESTS): Add count-f.test.
2016-03-12 23:52:52 +00:00
Fei Jie
fb2230665c tests: filter strace output in uname test
* tests/uname.test: Use uniq to filter strace output.
2016-03-11 02:43:02 +00:00
Fei Jie
ea5c7b5515 tests: add sched_xetparam.test
* tests/sched_xetparam.c: New file.
* tests/sched_xetparam.test: New test.
* tests/.gitignore: Add sched_xetparam.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add sched_xetparam.test.
2016-03-10 09:12:24 +00:00
Fei Jie
1eed594f30 tests: add sched_get_priority_mxx.test
* tests/sched_get_priority_mxx.c: New file.
* tests/sched_get_priority_mxx.test: New test.
* tests/.gitignore: Add sched_get_priority_mxx.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add sched_get_priority_mxx.test.
2016-03-10 09:12:23 +00:00
Fei Jie
ab917ae5af tests: add dup.test, dup2.test, and dup3.test
* tests/dup.c: New file.
* tests/dup.test: New test.
* tests/dup2.c: New file.
* tests/dup2.test: New test.
* tests/dup3.c: New file.
* tests/dup3.test: New test.
* tests/.gitignore: Add dup, dup2, and dup3.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add dup.test, dup2.test, and dup3.test.
2016-03-10 02:41:31 +00:00
Fabien Siron
61ac8ee9b2 tests: add fchmod.test
* tests/fchmod.c: New file.
* tests/fchmod.test: New test.
* tests/.gitignore: Add fchmod.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add fchmod.test.
2016-03-10 10:29:32 +00:00
Fei Jie
275d135ec2 tests: add acct.test
* tests/acct.c: New file.
* tests/acct.test: New test.
* tests/.gitignore: Add acct.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add acct.test.
2016-03-09 06:07:06 +00:00
Anchit Jain
1b5d1cbf63 tests: add chmod.test
* tests/chmod.c: New file.
* tests/chmod.test: New test.
* tests/.gitignore: Add chmod.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add chmod.test.
2016-03-07 23:13:28 +00:00
Fei Jie
eee3476844 tests: add umask.test
* tests/umask.c: New file.
* tests/umask.test: New test.
* tests/.gitignore: Add umask.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add umask.test.
2016-03-01 08:55:37 +00:00
Fei Jie
a4128a75f5 tests: add rename.test
* tests/rename.c: New file.
* tests/rename.test: New test.
* tests/.gitignore: Add rename.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add rename.test.
2016-03-01 08:55:36 +00:00
Fei Jie
68a58a301f tests: add uname.test
* tests/uname.c: New file.
* tests/uname.test: New test.
* tests/.gitignore: Add uname.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add uname.test.
2016-03-01 08:55:35 +00:00
9649ac1c8b tests: add rt_sigsuspend.test
* tests/rt_sigsuspend.c: New file.
* tests/rt_sigsuspend.test: New test.
* tests/.gitignore: Add rt_sigsuspend.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add rt_sigsuspend.test.
2016-02-19 16:10:25 +00:00
11d623f10a Print pid_t arguments of rt_sigqueueinfo and rt_tgsigqueueinfo as int
* signal.c (SYS_FUNC(rt_sigqueueinfo)): Print first syscall argument
using %d format.
(SYS_FUNC(rt_tgsigqueueinfo)): Print first and second syscall arguments
using %d format.
* tests/rt_tgsigqueueinfo.c: New file.
* tests/rt_tgsigqueueinfo.test: New test.
* tests/.gitignore: Add rt_tgsigqueueinfo.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add rt_tgsigqueueinfo.test.
2016-02-19 05:48:48 +00:00
2743efccce getrusage.test: fix build on x32
* tests/getrusage.c: Include <stdint.h>
(main): Print members of struct timeval using %ju format.
2016-02-19 03:39:59 +00:00
274fd468e1 getrusage.test: check that getrusage parser does not access extra memory
Place struct rusage at the end of an allocated memory page followed by
an inaccessible page.

* tests/getrusage.c (main): Use tail_alloc.
2016-02-19 03:39:59 +00:00
Fei Jie
5204dbdbb1 tests: add getrusage.test
* tests/getrusage.c: New file.
* tests/getrusage.test: New test.
* tests/.gitignore: Add getrusage.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add getrusage.test.
2016-02-19 03:39:59 +00:00
49faae958a Print rt_sigtimedwait return value as a signal name
* signal.c (SYS_FUNC(rt_sigtimedwait)): Decode return value.
* tests/rt_sigtimedwait.c: New file.
* tests/rt_sigtimedwait.test: New test.
* tests/.gitignore: Add rt_sigtimedwait.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add rt_sigtimedwait.test.
2016-02-19 03:39:59 +00:00
f09b7c4984 tests: add rt_sigprocmask.test
* tests/rt_sigprocmask.c: New file.
* tests/rt_sigprocmask.test: New test.
* tests/.gitignore: Add rt_sigprocmask.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add rt_sigprocmask.test.
2016-02-19 01:44:33 +00:00
11656206ff Fix corner cases of rt_sigpending syscall decoder
* signal (print_sigset_addr_len_limit): New function, cloned from
print_sigset_addr_len with added minimal length argument.
Treat length less than minimal length or greater than NSIG/8 as invalid.
Do not align length to 4-byte boundary.  Align destination buffer
to 4-byte boundary and initialize it with zeroes so that subsequent
call to sprintsigmask_n will not access uninitialized data.
(print_sigset_addr_len): Turn into a wrapper around
print_sigset_addr_len_limit with current_wordsize
as a minimal length argument.
(SYS_FUNC(rt_sigpending)): Call print_sigset_addr_len_limit
instead of print_sigset_addr_len with 1 as a minimal length argument.
* tests/rt_sigpending.c: New file.
* tests/rt_sigpending.test: New test.
* tests/.gitignore: Add rt_sigpending.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add rt_sigpending.test.
2016-02-19 01:44:33 +00:00
10c61e3b22 Change unix_diag requests back to use full dump instead of exact match
Unfortunately, 64-bit linux kernel has a bug in matching inode numbers
greater than INT_MAX, so unix_diag exact match is not reliable.

This partially reverts commit 69bfc89770.

* socketutils.c (unix_send_query): Add NLM_F_DUMP to nlmsg_flags,
remove initialization of udiag_cookie.
* tests/netlink_unix_diag.c (send_query): Remove "inode" argument,
add NLM_F_DUMP to nlmsg_flags, remove initialization of udiag_ino
and udiag_cookie.
(check_responses): Remove "inode" argument and its use.
(main): Remove invocation of inode_of_sockfd and passing of listening
socket inode to send_query and check_responses.
2016-02-19 01:44:33 +00:00
Michael Shigorin
f20304b6ae tests: avoid using cpp -dD
-dD is less portable across some peculiar preprocessors.

tests/Makefile.am (ksysent.h): Use cpp -dM instead of cpp -dD.
2016-02-19 01:44:33 +00:00
446e5b1780 tests: add poll.test
* tests/poll.c: New file.
* tests/poll.test: New test.
* tests/.gitignore: Add poll.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add poll.test.
2016-02-16 01:35:36 +00:00
9f612ffc49 Fix abbreviated output of poll and ppoll decoders
* poll.c (decode_poll_entering, decode_poll_exiting): Fix corner cases
of abbreviated output.
* tests/ppoll-v.expected: Update.
* tests/ppoll.expected: Update.
* tests/ppoll.test: Update.
2016-02-16 01:35:36 +00:00
ddbede5d9c Print offsets in lseek and _llseek syscalls as signed integers
* lseek.c (SYS_FUNC(lseek)): Print offset using %lld format.
(SYS_FUNC(llseek)): Likewise.  Treat high and low components of offset
as unsigned long integers.
* tests/llseek.c (main): Check that negative offset is printed properly.
* tests/lseek.c (main): Likewise.
2016-02-16 01:35:36 +00:00
669f8cfb42 tests: add xetpgid.test
* tests/xetpgid.c: New file.
* tests/xetpgid.test: New test.
* tests/.gitignore: Add xetpgid.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add xetpgid.test.
2016-02-14 22:30:27 +00:00
7c05954cd8 tests: add alarm.test
* tests/alarm.c: New file.
* tests/alarm.test: New test.
* tests/.gitignore: Add alarm.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add alarm.test.
2016-02-14 22:30:27 +00:00
cff071a5ca redirect.test: fix the way how strace output is discarded
* tests/redirect.test: Disable tracing of syscalls, signals,
and exit status instead of redirecting strace output to /dev/null.
2016-02-14 00:59:42 +00:00
4774f8239b tests: extend coverage of struct iovec arrays
* tests/readv.c (main): Check decoding of empty, inaccessible,
and partially inaccessible iovec arrays.
* tests/readv.test: Update.
2016-02-14 00:36:38 +00:00
13870c5482 Implement dumping of vmsplice syscall
* syscall.c (dumpio): Add SEN_vmsplice.
* NEWS: Mention this.
* tests/vmsplice.c: New file.
* tests/vmsplice.test: New test.
* tests/.gitignore: Add vmsplice.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add vmsplice.test.
2016-02-14 00:36:38 +00:00
6c93254614 tests: add tee.test
* tests/tee.c: New file.
* tests/tee.test: New test.
* tests/.gitignore: Add tee.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add tee.test.
2016-02-14 00:36:38 +00:00
16a52b4b87 Fix printing of negative offsets in splice syscall
* io.c (SYS_FUNC(splice)): Use PRId64 instead of PRIu64 for printing
offsets.
* tests/splice.c: New file.
* tests/splice.test: New test.
* tests/.gitignore: Add splice.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add splice.test.
2016-02-14 00:36:38 +00:00
c1f99f569a Implement copy_file_range syscall decoding
* copy_file_range.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* linux/32/syscallent.h (copy_file_range): New entry.
* linux/64/syscallent.h: Likewise.
* linux/arm/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* pathtrace.c (pathtrace_match): Add SEN_copy_file_range.
* NEWS: Mention new syscall parser.
* tests/copy_file_range.c: New file.
* tests/copy_file_range.test: New test.
* tests/.gitignore: Add copy_file_range.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add copy_file_range.test.
2016-02-14 00:36:38 +00:00
84be84db7b tests: robustify execve and execveat tests
* tests/execve.c (main): Use one page gap between two mapped regions
for an address that is more likely to be not yet mapped.
* tests/execveat.c (main): Likewise.
2016-02-13 01:32:48 +00:00
b5faea4c73 tests: simplify execve test
* tests/execve.c (main): Simplify the test assuming that execve syscall
never returns ENOSYS.
2016-02-13 01:32:48 +00:00
0aae167293 tests: check decoding of madvise, mlockall, mremap, and msync syscalls
* tests/mmap.c (main): Change output format from regexp to verbatim.
Add tests for madvise, mlockall, mremap, and msync syscalls.
* tests/mmap.test: Convert from match_grep to match_diff.
Add madvise, mlockall, mremap, and msync syscalls to syscall filter.
2016-02-12 02:35:54 +00:00
6204654329 tests: check that -f -p attaches to threads properly
Check that -f -p attaches and follows all threads of the given pid.

* tests/attach-f-p.c: New file.
* tests/attach-f-p.test: New test.
* tests/.gitignore: Add attach-f-p.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(attach_f_p_LDADD): New variable.
(TESTS): Add attach-f-p.test.
2016-02-09 05:08:00 +00:00
b1b692eb23 tests: extend coverage of struct itimerspec
* tests/timer_xettime.c (main): Check decoding of NULL struct itimerspec
pointer.
2016-02-08 18:28:36 +00:00
9ee77b9e65 tests: extend coverage of utimensat syscall
* tests/utimensat.c (main): Check decoding of NULL struct timespec
pointer.
2016-02-08 18:27:59 +00:00
c736b456ad tests: extend coverage of time syscall
* tests/time.c (main): Check decoding of NULL time_t pointer.
2016-02-08 18:27:17 +00:00
595fc10f11 tests: extend coverage of struct sigevent
* tests/timer_create.c (main): Check decoding of NULL struct sigevent
pointer.  Check decoding of invalid sigev_notify value.
2016-02-08 18:26:46 +00:00
23168c1e54 tests: extend coverage of execve and execveat syscalls
Check decoding of inaccessible or partially inaccessible arrays.

* tests/execve-v.c: New file.
* tests/execveat-v.c: Likewise.
* tests/execve-v.test: New test.
* tests/execveat-v.test: Likewise.
* tests/execve.c: Rewrite.
* tests/execveat.c: Likewise.
* tests/execve.test: Likewise.
* tests/execveat.test: Likewise.
* tests/execve.expected: Remove.
* tests/execve-v.expected: Likewise.
* tests/execveat.expected: Likewise.
* tests/execveat-v.expected: Likewise.
* tests/.gitignore: Add execve-v and execveat-v.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add execve-v.test and execveat-v.test.
(EXTRA_DIST): Remove execve.expected, execve-v.expected,
execveat.expected, and execveat-v.expected.
2016-02-08 18:25:33 +00:00
a59fcec4c9 tests: extend coverage of capget syscall
* tests/caps.c (main): Check decoding of inaccessible cap_user_header_t
and/or cap_user_data_t.
* tests/caps.awk: Update match patterns.
* tests/caps.test: Update.
2016-02-08 18:21:10 +00:00
48d97b6a83 tests: extend coverage of sched_getaffinity syscall
* tests/sched_xetaffinity.c (main): Check decoding of pointer
to inaccessible cpu_set_t.
2016-02-08 18:18:51 +00:00
f2e6f3d3c4 tests: extend coverage of utime syscall
* tests/utime.c (main): Check decoding of NULL struct utimbuf pointer.
Check decoding of struct utimbuf located at the end of page boundary.
* tests/utime.test: Update.
2016-02-08 18:18:05 +00:00
b5a7011d71 tests: extend coverage of sysinfo syscall
* tests/sysinfo.c (main): Check decoding of NULL struct sysinfo pointer.
Check decoding of struct sysinfo located at the end of page boundary.
* tests/sysinfo.test: Update.
2016-02-08 18:17:28 +00:00
7fce7c0332 tests: extend coverage of adjtimex syscall
* tests/adjtimex.c (main): Check decoding of NULL struct timex pointer.
Check decoding of struct timex located at the end of page boundary.
* tests/adjtimex.test: Update.
2016-02-08 18:16:27 +00:00
a88c72ef66 tests: check that strace does not retain stdin and stdout descriptors
* tests/redirect.test: New test.
* tests/Makefile.am (TESTS): Add it.
2016-02-08 17:51:18 +00:00
7469e252fa tests: add opipe.test
Check that -o |pipe_command works.  In particular, check that
strace waits for completion of piped command.

* tests/opipe.test: New test.
* tests/Makefile.am (TESTS): Add it.
2016-02-05 14:58:41 +00:00
d8a81dfa40 tests: extend readlink and readlinkat coverage
* tests/readlink.c (PREFIX, TARGET, LINKPATH): New macros.
(main): Allocate memory for string and buffer passed to the syscall
being tested using tail_alloc mechanism.  Create and cleanup test
symlink.  Test syscall error path output.  Print hexquoted strings
using hexquote_strndup.
* tests/readlinkat.c: Likewise.
* tests/readlink.test: Remove creation and cleanup of test symlinks.
2016-02-04 03:36:25 +00:00
7637b1d9e8 tests: add hexquote_strndup function to libtests
* tests/tests.h (hexquote_strndup): New prototype.
* tests/hexquote_strndup.c: New file.
* tests/Makefile.am (libtests_a_SOURCES): Add it.
2016-02-04 03:36:25 +00:00
f2eb27c73e readlinkat.test: use readlink.test
* tests/readlink.test (syscall): Initialize from $0.
* tests/readlinkat.test: Source readlink.test.
2016-02-04 03:36:25 +00:00
751fcb8f8a tests: replace net-fd.test with net-y-unix.test
Unlike the former test that was based on match_grep,
the new one uses match_diff and does more rigorous testing.

* tests/net-y-unix.c: New file.
* tests/net-y-unix.test: New test.
* tests/net-fd.test: Remove.
* tests/net-fd.expected: Remove.
* tests/.gitignore: Add net-y-unix.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Replace net-fd.test with net-y-unix.test.
(net-fd.log): Remove.
(EXTRA_DIST): Remove net-fd.expected.
2016-02-03 16:09:34 +00:00
3c17d1b5e1 Implement caching of print_sockaddr_by_inode
As -yy parser, compared to -y, needs to do at least 5 extra syscalls
(getxattr, socket, sendmsg, recvmsg, close) to print socket details,
caching results of netlink conversations between strace and kernel
noticeably reduces amount of system time spent by strace.

The caching is safe since sockets do not change their addresses after
successful bind or connect syscall.

* defs.h (string_quote, print_sockaddr_by_inode_cached): New prototypes.
* socketutils.c (cache_entry): New type.
(CACHE_SIZE, CACHE_MASK): New macros.
(cache): New static array.
(cache_and_print_inode_details): New static function.
(print_sockaddr_by_inode_cached): New function.
(inet_parse_response, unix_parse_response): Use
cache_and_print_inode_details.
* util.c (printfd): Use string_quote and print_sockaddr_by_inode_cached.
(string_quote): Remove static qualifier.
* NEWS: Mention this improvement.
* tests/unix-yy.c (main): Update.
2016-02-03 12:43:22 +00:00
69bfc89770 Change unix_diag requests to use exact match instead of full dump
* socketutils.c (unix_send_query): Remove NLM_F_DUMP from nlmsg_flags,
initialize udiag_cookie.
* tests/netlink_unix_diag.c (send_query): Remove "family" and "proto"
arguments, add "inode" argument, remove NLM_F_DUMP from nlmsg_flags,
initialize udiag_ino and udiag_cookie.
(check_responses): Add "inode" argument, check inode match.
(main): Pass listening socket inode to send_query and check_responses.
2016-02-03 12:43:22 +00:00
3c86e0ea5d Robustify netlink response parsers
* socketutils.c (inet_parse_response, unix_parse_response): Change
return type from bool to int, return -1 on all parse errors except
inode mismatch.
(receive_responses): Stop on the first nlmsg_type that is not
SOCK_DIAG_BY_FAMILY, also stop when the parser returns -1.
* tests/netlink_inet_diag.c (check_responses): Stop on short messages,
on first nlmsg_type that is not SOCK_DIAG_BY_FAMILY, print more verbose
diagnostics for NLMSG_ERROR.
* tests/netlink_unix_diag.c (check_responses): Likewise.
2016-02-03 12:43:17 +00:00
9d15ec7b57 tests: replace net-yy.test with net-yy-inet.test
Unlike the former test that was based on match_awk,
the new one uses match_diff and does more rigorous testing.

* tests/net-yy-inet.c: New file.
* tests/net-yy-inet.test: New test.
* tests/net-yy.test: Remove.
* tests/net-yy-accept.awk: Remove.
* tests/net-yy-connect.awk: Remove.
* tests/inet-accept-connect-send-recv.c: Remove.
* tests/.gitignore: Replace inet-accept-connect-send-recv
with net-yy-inet.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Replace net-yy.test with net-yy-inet.test.
(EXTRA_DIST): Remove net-yy-accept.awk and net-yy-connect.awk.
2016-02-03 12:42:01 +00:00
6124cd9932 tests: replace unix-yy.test with net-yy-unix.test
Unlike the former test that was based on match_awk,
the new one uses match_diff and does more rigorous testing.

* tests/net-yy-unix.c: New file.
* tests/net-yy-unix.test: New test.
* tests/unix-yy.test: Remove.
* tests/unix-yy-accept.awk: Remove.
* tests/unix-yy-connect.awk: Remove.
* tests/.gitignore: Add net-yy-unix.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Replace unix-yy.test with net-yy-unix.test.
(EXTRA_DIST): Remove unix-yy-accept.awk and unix-yy-connect.awk.
2016-02-03 12:39:06 +00:00
e364920b67 tests: add inode_of_sockfd function to libtests
* tests/tests.h (inode_of_sockfd): New prototype.
* tests/inode_of_sockfd.c: New file.
* tests/Makefile.am (libtests_a_SOURCES): Add it.
2016-02-02 00:24:48 +00:00
dfea1da0e6 Fixed decoding of mincore syscall's last argument
* mem.c (SYS_FUNC(mincore)): Print only those bytes of the vector
that were written by the kernel.
* NEWS: Mention this fix.
* tests/mincore.c: New file.
* tests/mincore.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add mincore.
(TESTS): Add mincore.test.
* tests/.gitignore: Add mincore.
2016-01-29 02:39:40 +00:00
fa8c286d50 Implement simultaneous use of -p option and tracing of a command
* strace.c (init): Allow -p option along with a command.
(startup_child): In -D mode, record the parent of the tracer process
as strace_child.
(startup_attach): Save trace_tracer_pid before -D mode fork.
When tracing a command in -f mode, do not check for the command's
threads as it has no threads at this moment.
Never attach to the tracer process.
In -D mode, never attach to the parent of the tracer process,
terminate that process only once at the end of startup_attach,
and reset strace_child.
* strace.1: Document that -p option can be used along with tracing
of a command.
* NEWS: Mention it.
* tests/attach-p-cmd-cmd.c: New file.
* tests/attach-p-cmd-p.c: Likewise.
* tests/attach-p-cmd.test: New test.
* tests/.gitignore: Add attach-p-cmd-cmd and attach-p-cmd-p.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Add attach-p-cmd.test.

This fixes Debian bug #549942.
2016-01-22 19:37:11 +00:00
a8eb52f952 tests: use local nanosleep based sleep utility replacement
* tests/sleep.c: New file.
* tests/.gitignore: Add sleep.
* tests/Makefile.am (check_PROGRAMS): Likewise.
* tests/count.test: Use it instead of system sleep utility.
2016-01-21 23:52:39 +00:00
3d54c92691 tests: add error_msg_and_fail function to libtests
* tests/tests.h (error_msg_and_fail): New prototype.
* tests/error_msg.c (error_msg_and_fail): New function.
2016-01-21 23:46:43 +00:00
d44707d889 Fix dumping of recvmmsg syscall in case of short read
* net.c (dumpiov_in_mmsghdr): Call dumpiov_upto instead of dumpiov,
pass data size limit to dumpiov_upto.
* NEWS: Mention this fix.
* tests/mmsg.c (main): Update.
2016-01-20 17:36:41 +00:00
93c9d1cdbd Fix dumping of recvmsg syscall in case of short read
* defs.h (dumpiov_in_msghdr): Add unsigned long argument.
* net.c (dumpiov_in_msghdr): Add data_size argument.  Call dumpiov_upto
instead of dumpiov, pass data_size to dumpiov_upto.
* syscall.c (dumpio): Pass data size limit to dumpiov_in_msghdr.
* NEWS: Mention this fix.
* tests/recvmsg.c: New file.
* tests/recvmsg.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add recvmsg.
(TESTS): Add recvmsg.test.
* tests/.gitignore: Add recvmsg.
2016-01-20 17:35:27 +00:00
05a0af6d60 Fix decoding and dumping of readv syscall in case of short read
* defs.h (dumpiov_upto): New prototype.
(dumpiov): Change to a wrapper around dumpiov_upto.
* util.c (dumpiov): Rename to dumpiov_upto, add and check data_size
argument.
* io.c (SYS_FUNC(readv)): Call tprint_iov_upto instead
of tprint_iov and specify syscall return value as a data size limit.
* syscall.c (dumpio): In case of SEN_readv, call dumpiov_upto instead
of dumpiov and specify syscall return value as a data size limit.
* NEWS: Mention this fix.
* tests/readv.c: New file.
* tests/readv.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add readv.
(TESTS): Add readv.test.
* tests/.gitignore: Add readv.
2016-01-20 15:31:26 +00:00
a5417308e4 tests/tests.h: add ARRAY_SIZE and LENGTH_OF macros
* tests/tests.h (ARRAY_SIZE, LENGTH_OF): New macros.
* tests/aio.c (ARRAY_SIZE): Remove.
* tests/mmsg.c (LENGTH_OF): Remove.
2016-01-20 15:24:45 +00:00
590b240444 tests: add hexdump_strdup function to libtests
* tests/tests.h (hexdump_strdup): New prototype.
* tests/hexdump_strdup.c: New file.
* tests/Makefile.am (libtests_a_SOURCES): Add it.
2016-01-20 15:24:41 +00:00
536a0353dd tests: add tprintf function to libtests
* tests/tests.h (tprintf): New prototype.
* tests/tprintf.c: New file.
* tests/Makefile.am (libtests_a_SOURCES): Add it.
* tests/mmsg.c: Use tprintf.
2016-01-20 15:17:28 +00:00
972018f2ea llseek.test: robustify against libcs invoking _llseek syscall on their own
* tests/llseek.test: Filter out _llseek calls made with non-negative
descriptor arguments.
2016-01-15 00:10:00 +00:00
8e37cffaa8 lseek.test: robustify against libcs invoking lseek syscall on their own
* tests/lseek.test: Filter out lseek calls made with non-negative
descriptor arguments.
2016-01-15 00:09:48 +00:00
19d10f8965 mmsg.test: fix regression introduced by commit v4.11-138-g6e815ce
This fixes the test on platforms where both __NR_sendmmsg and
HAVE_SENDMMSG are defined but the former is not implemented by the
kernel and the second is implemented as an indirect syscall.

* tests/mmsg.c (LENGTH_OF): New macro.
(send_mmsg, recv_mmsg): Print expected output in case of ENOSYS.
(main): Redirect stdout to a new descriptor.  Use LENGTH_OF.
Print expected output.
* tests/mmsg.test: Update.
* tests/mmsg.expected: Remove.
* tests/Makefile.am (EXTRA_DIST): Remove mmsg.expected.
2016-01-14 00:06:20 +00:00
68f7a66dc9 aio.test: check memory access by aio decoders
* tests/aio.c (main): Place all objects passed to io_* syscalls
at the end of memory pages followed by inaccessible pages.
2016-01-13 22:06:18 +00:00
3fdcdd47c6 scm_rights-fd.test: rewrite without fork
* tests/scm_rights.c (main): Rewrite without fork.
Place all objects passed to sendmsg and recvmsg at the end
of memory pages followed by inaccessible pages.
* tests/scm_rights-fd.test: Update.
2016-01-12 16:06:58 +00:00
55f3c8901d tests: fix clang "duplicate 'const' declaration specifier" warnings
* tests/ksysent.c (pstr_t): Remove second const specifier.
* tests/mmsg.c (main): Remove second const specifier from one[], two[],
and three[].
2016-01-12 05:06:10 +00:00
b6edea5ce7 tests/times.c: fix clang compilation warning
* tests/times.c (main): Initialize dummy variable.
2016-01-12 05:06:10 +00:00
eb4649a0dc tests/mmsg.c: fix build on rhel6/ppc
There are weird platforms that define __NR_sendmmsg but at the same time
do not define __NR_recvmmsg.  Add a workaround for them.

* configure.ac (AC_CHECK_FUNCS): Add recvmmsg.
* tests/mmsg.c: Check for __NR_recvmmsg || HAVE_RECVMMSG.
2016-01-12 05:06:10 +00:00
e714b87064 Fix struct sigevent decoding for musl
Do not rely on "struct sigevent.__pad" being located at the same address
as "struct sigevent.sigev_notify_thread_id", it's not the case with musl
libc.  Do not rely on struct sigevent definition at all to access
sigev_notify_thread_id.

* configure.ac (AC_CHECK_MEMBERS): Remove struct sigevent._sigev_un._pad
and struct sigevent.__pad.
* sigevent.h: New file.
* Makefile.am (strace_SOURCES): Add it.
* print_sigevent.c: Include it.
* print_sigevent.c (struct_sigevent): Remove.
(print_sigevent): Update all struct_sigevent users.
* tests/timer_create.c: Include "sigevent.h".
(main): Use struct_sigevent instead of struct sigevent,
all struct sigevent clients changed.
2016-01-12 03:07:39 +00: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
2165a359fd tests/struct_flock.c: fix musl libc compilation warnings
The size of off_t is not something one can rely upon.  For example,
musl libc unconditionally defines it as an int64_t type on x86.
A cast to the target type helps to avoid these libc differences.

* configure.ac: Call AC_C_TYPEOF.
* tests/struct_flock.c (TYPEOF_FLOCK_OFF_T): New macro.
(test_flock_einval): Use it instead of off_t.
2016-01-12 03:07:38 +00:00
4776e3366f tests/inet-cmsg.c: fix musl libc compilation warnings
The types that are used to define msg_namelen member of struct msghdr
and cmsg_len member of struct cmsghdr differ between libcs.
For example, glibc defines them as size_t, while musl libc - as type
socklen_t.  Print these fields using %lu format to avoid issues caused
by libc differences.

* tests/inet-cmsg.c (main): Cast mh.msg_controllen and c->cmsg_len
to unsigned long and print them using %lu format.
2016-01-12 00:00:47 +00:00
c36270a28e aio.test: include <fcntl.h> instead of <sys/fcntl.h>
* tests/aio.c: Include <fcntl.h> instead of <sys/fcntl.h>.
2016-01-11 02:20:04 +00:00
35eb03fdf7 mmsg.test: check memory access by sendmmsg and recvmmsg decoders
* tests/tests.h (tail_memdup): New prototype.
* tests/tail_alloc.c (tail_memdup): New function.
* tests/mmsg.c (main): Place all objects passed to sendmmsg and recvmmsg
at the end of memory pages followed by inaccessible pages.
2016-01-11 01:05:34 +00:00
3a184fe9cc mmsg.test: check decoding of flags passed to sendmmsg and recvmmsg
* tests/mmsg.c (main): Pass MSG_DONTROUTE|MSG_NOSIGNAL to sendmmsg.
Pass MSG_DONTWAIT to recvmmsg.
* tests/mmsg.expected: Update.
2016-01-11 01:05:34 +00:00
6e815ce640 mmsg.test: prefer direct sendmmsg/recvmmsg syscalls to libc wrappers
* tests/mmsg.c: Include <sys/syscall.h>.
Check for __NR_sendmmsg as an alternative to HAVE_SENDMMSG.
[!HAVE_STRUCT_MMSGHDR] (struct mmsghdr): Define.
(send_mmsg, recv_mmsg): New functions.
(main): Use them instead of sendmmsg and recvmmsg.

Reported-by: Szabolcs Nagy <nsz@port70.net>
2016-01-11 01:03:19 +00:00
8df07e1039 sigreturn.test: use RT_5 signal number instead of RT_2
Make the test compatible with musl libc that uses RT_2 internally.

* tests/sigreturn.c (main): Replace RT_2 with RT_5.
* tests/sigreturn.test: Likewise.

Reported-by: Szabolcs Nagy <nsz@port70.net>
2016-01-10 22:48:51 +00:00
8249eeb5d4 tests: do not use settimeofday wrapper provided by libc
Workaround limitations of settimeofday wrapper provided by musl libc.

* tests/xettimeofday.c (main): Call settimeofday using syscall().

Reported-by: Szabolcs Nagy <nsz@port70.net>
2016-01-09 13:06:31 +00:00
19ff2b2ee7 ioctl.test: robustify against libcs invoking ioctl syscall on their own
* tests/ioctl.test: Filter out from the log ioctl calls with standard
descriptor arguments.

Reported-by: Szabolcs Nagy <nsz@port70.net>
2016-01-09 01:44:19 +00:00
2720a61832 alpha: enhance decoding of getxpid, getxuid, and getxgid syscalls
Print the second return value of getxpid, getxuid, and getxgid syscalls
that return a pair of values using the same mechanism as pipe syscall.

* alpha.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* linux/alpha/syscallent.h [20]: Change SEN(getpid) to SEN(getxpid).
[24]: Change SEN(getuid) to SEN(getxuid).
[47]: Change SEN(getgid) to SEN(getxgid).
* NEWS: Mention this enhancement.
* tests/uid.awk: Update for getxgid output change.
* tests/uid.test: Cleanup.
* tests/getxxid.c: New file.
* tests/getxxid.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add getxxid.
(TESTS): Add getxxid.test.
* tests/.gitignore: Add getxxid.
2016-01-09 00:09:04 +00:00
6833d61090 tests: change text marker in fork-f and vfork-f tests
Use chdir syscalls instead of pwrite64 syscalls as a method of inserting
text markers into strace output because the former are more portable.

* tests/fork-f.c (logit): Rename to logit_. Use chdir instead of pwrite.
(logit): New macro wrapper around logit_.
(main): Update expected output.
* tests/vfork-f.c: Likewise.
* tests/fork-f.test: Update.
2016-01-08 02:45:05 +00:00
1eabdb3c99 tests/vfork-f.c: support platforms without vfork
On some platforms, e.g. hppa glibc, vfork() is implemented using fork
syscall, so the test cannot rely on the parent process remaining blocked
until the child process either terminates or calls execve.

* tests/vfork-f.c (main): Explicitly block the parent until the child
either terminates or calls execve.
2016-01-07 02:11:58 +00:00
6bf08e3e4a Fix and enhance decoding of sched_[gs]etaffinity syscalls
Print cpu_set_t as a set of integers, similar to the way
fd_set is printed as a set of descriptors.

* affinity.c: Include <sched.h>.
(get_cpuset_size): New function.
(print_affinitylist): Rewrite using get_cpuset_size and next_set_bit.
(sched_getaffinity, sched_setaffinity): Print first two args as ints.
* NEWS: Mention this enhancement.
* tests/sched_xetaffinity.c: New file.
* tests/sched_xetaffinity.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add sched_xetaffinity.
(TESTS): Add sched_xetaffinity.test.
* tests/.gitignore: Add sched_xetaffinity.

Reported-by: Joe Korty <joe.korty@ccur.com>
2016-01-07 02:11:55 +00:00
6267e4b0e3 tests: convert epoll_create1.test from match_grep to match_diff
* tests/epoll_create1.c (main): Print expected output.
* tests/epoll_create1.test: Use match_diff instead of match_grep.
* tests/epoll_create1.expected: Remove.
* tests/Makefile.am (EXTRA_DIST): Remove epoll_create1.expected.
2016-01-06 16:08:07 +00:00
6e65922a32 tests/struct_flock.c: use libtests
* tests/struct_flock.c (create_sample): Return void,
all callers changed.  Use perror_msg_and_fail.
* tests/fcntl.c: Use SKIP_MAIN_UNDEFINED.
* tests/fcntl64.c: Likewise.
2016-01-06 16:06:35 +00:00
c83746acf7 tests/file_handle.c: use libtests
* tests/file_handle.c: Use SKIP_MAIN_UNDEFINED.
(main): Use assert and perror_msg_and_skip.
2016-01-06 16:01:46 +00:00
6feccf199e tests/uid32.c: use libtests
* tests/uid32.c: Use SKIP_MAIN_UNDEFINED.
2016-01-06 15:58:14 +00:00
67c998b7d4 tests/uid16.c: use libtests
* tests/uid16.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip.
2016-01-06 15:57:45 +00:00
eb81ecf033 tests/uid.c: use libtests
* tests/uid.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip.
2016-01-06 15:57:17 +00:00
ea56b5ba3f tests/netlink_unix_diag.c: use libtests
* tests/netlink_unix_diag.c (send_query, check_responses, main):
Use perror_msg_and_skip.
2016-01-06 15:55:12 +00:00
285c3f453a tests/netlink_inet_diag.c: use libtests
* tests/netlink_inet_diag.c (send_query, check_responses, main):
Use perror_msg_and_skip.
2016-01-06 15:53:45 +00:00
82d1fd14f1 tests/readdir.c: use libtests
* tests/readdir.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip.
2016-01-06 12:03:57 +00:00
2e00fe9155 tests/getdents64.c: use libtests
* tests/getdents64.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip.
2016-01-06 12:03:37 +00:00
74769e99cd tests/getdents.c: use libtests
* tests/getdents.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip.
2016-01-06 12:02:55 +00:00
29e5bde776 tests/ipc_shm.c: use libtests
* tests/ipc_shm.c (cleanup): New function.
(main): Use it and perror_msg_and_skip.
2016-01-06 11:59:58 +00:00
efb134041e tests/ipc_sem.c: use libtests
* tests/ipc_sem.c (cleanup): New function.
(main): Use it and perror_msg_and_skip.
2016-01-06 11:59:29 +00:00
3ba7feca53 tests/ipc_msg.c: use libtests
* tests/ipc_msg.c (cleanup): New function.
(main): Use it and perror_msg_and_skip.
2016-01-06 11:59:06 +00:00
4e4958e0f9 tests/ipc_msgbuf.c: use libtests
* tests/ipc_msgbuf.c (cleanup): New function.
(main): Use it and perror_msg_and_skip.
2016-01-06 11:55:13 +00:00
bbbb97fb30 tests/mq.c: use libtests
* tests/mq.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip.
2016-01-06 11:52:43 +00:00
00777042c4 tests/utimensat.c: use libtests
* tests/utimensat.c: Use SKIP_MAIN_UNDEFINED.
(main): Use assert and perror_msg_and_skip.
2016-01-06 11:49:27 +00:00
647e7953ce tests/ppoll.c: use libtests
* tests/ppoll.c (main): Use assert, perror_msg_and_skip,
and perror_msg_and_fail.
2016-01-06 11:44:32 +00:00
4e66672923 tests/mmsg.c: use libtests
* tests/mmsg.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip.
2016-01-06 11:43:08 +00:00
2c59f1e482 tests/ip_mreq.c: use libtests
* tests/ip_mreq.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip.
2016-01-06 11:42:10 +00:00
cf40111be1 tests/ioctl.c: use libtests
* tests/ioctl.c: Use SKIP_MAIN_UNDEFINED.
(main): Use %m printf format specifier.
2016-01-06 11:40:00 +00:00
b736a05c56 tests/pipe.c: use libtests
* tests/pipe.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_fail and perror_msg_and_skip.
2016-01-06 11:38:05 +00:00
a380ba0f9b tests/getrandom.c: use libtests
* tests/getrandom.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip.
2016-01-06 11:36:54 +00:00
0b75320910 tests/signalfd.c: use libtests
* tests/signalfd.c: Use SKIP_MAIN_UNDEFINED.
(main): Use perror_msg_and_skip.
2016-01-06 11:35:23 +00:00
7fce908de0 tests/pc.c: use libtests
* tests/pc.c (main): Use assert, get_page_size, perror_msg_and_fail,
and perror_msg_and_skip.
2016-01-06 11:33:13 +00:00
73aa88a619 tests/uio.c: use libtests
* tests/uio.c: Use SKIP_MAIN_UNDEFINED.
2016-01-06 11:31:48 +00:00
b2ae749ab1 tests/bpf.c: use libtests
* tests/bpf.c: Use SKIP_MAIN_UNDEFINED.
(main) Use perror_msg_and_skip.
2016-01-06 11:29:16 +00:00
9ad4409a64 tests/aio.c: use libtests
* tests/aio.c: Use SKIP_MAIN_UNDEFINED.
(main) Use perror_msg_and_skip.
2016-01-06 11:27:15 +00:00
05a27ea2f6 tests/sched_xetattr.c: use libtests
* tests/sched_xetattr.c: Use SKIP_MAIN_UNDEFINED.
(main) Use perror_msg_and_skip.
2016-01-06 11:25:47 +00:00
2d161f5bad tests/wait.c: use libtests
* tests/wait.c (main): Use perror_msg_and_fail.
2016-01-06 11:25:00 +00:00
f90f69fa32 tests/vfork-f.c: use libtests
* tests/vfork-f.c (main): Use assert and perror_msg_and_fail.
2016-01-06 11:24:44 +00:00
237fbcd966 tests/fork-f.c: use libtests
* tests/fork-f.c (main): Use assert and perror_msg_and_fail.
2016-01-06 11:24:29 +00:00