81ea4bf063
tests: add one more case to pselect6.test
...
* tests/pselect6.c (main): Check how timeout is printed
on exiting syscall.
2015-09-19 04:04:49 +03:00
5d98310e00
tests: robustify pselect6 test
...
* tests/pselect6.c: Do not include <assert.h> and <string.h>.
Include <sys/syscall.h>.
[!__NR_pselect6]: Skip the test.
(main): Skip the test instead of assertions.
Add some padding to the timespec structure.
2015-09-19 04:04:49 +03:00
6c528f5502
tests: add another case to pselect6 test
...
* tests/pselect6.c: Include <sys/time.h>.
(handler): New function.
(main): Install an interval timer.
Use it to check how ERESTARTNOHAND is printed.
2015-09-19 04:04:49 +03:00
f57edf4d37
Fix decoding of gettimeofday and settimeofday
...
* time.c (print_timezone): new function.
(sys_gettimeofday, sys_settimeofday): Use it instead of print_timeval
to print struct timezone.
[ALPHA] (sys_osf_gettimeofday, sys_osf_settimeofday): Use it
instead of print_timeval32 to print struct timezone.
* tests/xettimeofday.c: New file.
* tests/xettimeofday.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add xettimeofday.
(TESTS): Add xettimeofday.
* tests/.gitignore: Add xettimeofday.
2015-09-19 04:04:49 +03:00
c648b4a832
Fix decoding of clock_nanosleep
...
* time.c (sys_clock_nanosleep): Use is_erestart,
temporarily_clear_syserror, and restore_cleared_syserror.
* tests/clock_nanosleep.c: New file.
* tests/clock_nanosleep.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add clock_nanosleep.
(TESTS): Add clock_nanosleep.test.
* tests/.gitignore: Add clock_nanosleep.
2015-09-19 04:04:49 +03:00
593602ce5a
tests: add nanosleep.test
...
* tests/nanosleep.c: New file.
* tests/nanosleep.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add nanosleep.
(TESTS): Add nanosleep.test.
* tests/.gitignore: Add nanosleep.
2015-09-19 04:04:48 +03:00
640623c41e
tests: rewrite restart_syscall in C
...
* tests/restart_syscall.c: New file.
* tests/restart_syscall.expected: Remove.
* tests/restart_syscall_unknown.expected: Remove.
* tests/restart_syscall.test: Update to use restart_syscall.
* tests/Makefile.am (check_PROGRAMS): Add restart_syscall.
(EXTRA_DIST): Remove restart_syscall.expected
and restart_syscall_unknown.expected.
* tests/.gitignore: Add restart_syscall.
2015-09-19 04:04:48 +03:00
9d4c892ceb
tests: add clock_xettime.test
...
* tests/clock_xettime.c: New file.
* tests/clock_xettime.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add clock_xettime.
(TESTS): Add clock_xettime.test.
* tests/.gitignore: Add clock_xettime.
2015-09-19 04:04:48 +03:00
12431f76be
tests: add xetitimer.test
...
* tests/xetitimer.c: New file.
* tests/xetitimer.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add xetitimer.
(TESTS): Add xetitimer.test.
* tests/.gitignore: Add xetitimer.
2015-09-19 04:04:27 +03:00
79cafcd337
tests: add timerfd_xettime.test
...
* tests/timerfd_xettime.c: New file.
* tests/timerfd_xettime.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add timerfd_xettime.
(TESTS): Add timerfd_xettime.test.
* tests/.gitignore: Add timerfd_xettime.
2015-09-17 23:23:41 +00:00
1314098cde
tests: add timer_xettime.test
...
* tests/timer_xettime.c: New file.
* tests/timer_xettime.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add timer_xettime.
(TESTS): Add timer_xettime.test.
* tests/.gitignore: Add timer_xettime.
2015-09-17 23:22:43 +00:00
0dbb7acc35
Add struct timex.tai support
...
* configure.ac (AC_CHECK_MEMBERS): Add struct timex.tai.
* print_timex.c (print_timex) [HAVE_STRUCT_TIMEX_TAI]: Print tai field.
* tests/adjtimex.c (main) [HAVE_STRUCT_TIMEX_TAI]: Likewise.
2015-09-17 13:26:22 +00:00
dad1eef568
Convert parser of struct timex to new mpers infrastructure
...
* defs.h (adjtimex_modes, adjtimex_status): New xlat prototypes.
* print_timex.c (struct_timex): New typedef. Mpersify it.
[IN_MPERS]: Do not include "xlat/adjtimex_modes.h"
and "xlat/adjtimex_status.h".
[SUPPORTED_PERSONALITIES > 1]: Remove.
(tprint_timeval): Remove.
(tprint_timex): Rename to print_timex. Mpersify it.
* time.c (do_adjtimex): Rename tprint_timex to print_timex.
* tests/adjtimex.c: New file.
* tests/adjtimex.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add adjtimex.
(TESTS): Add adjtimex.test.
* tests/.gitignore: Add adjtimex.
2015-09-17 13:25:53 +00:00
b8f0c9286a
Enhance parser of struct sigevent
...
* print_sigevent.c (print_sigevent): Always print names
of struct_sigevent fields along with their values.
Print signal name of sigev_signo for those sigev_notify values
that require valid signal numbers.
* tests/timer_create.c: New file.
* tests/timer_create.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add timer_create.
(TESTS): Add timer_create.test.
* tests/.gitignore: Add timer_create.
2015-09-17 13:22:57 +00:00
77a1b6bc41
tests: add pselect6.test
...
* tests/pselect6.c: New file.
* tests/pselect6.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add pselect6.
(TESTS): Add pselect6.test.
* tests/.gitignore: Add pselect6.
2015-09-15 02:14:38 +00:00
Elvira Khabirova
9d77b562d3
tests: add times-fail.test
...
* tests/times-fail.c: New file.
* tests/times-fail.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add times-fail.
(TESTS): Add times-fail.test.
* tests/.gitignore: Add times-fail.
2015-08-28 08:46:24 +00:00
Eugene Syromyatnikov
7a036055af
tests: add times.test
...
* tests/times.c: New file.
* tests/times.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add times.
(TESTS): Add times.test.
(times_LDADD): Define.
* tests/.gitignore: Add times.
2015-08-28 08:46:24 +00:00
Elvira Khabirova
22d997e538
tests: add sysinfo.test
...
* tests/sysinfo.c: New file.
* tests/sysinfo.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add sysinfo.
(TESTS): Add sysinfo.test.
* tests/.gitignore: Add sysinfo.
2015-08-28 08:46:23 +00:00
Elvira Khabirova
d0a61871c8
Enhance msgctl syscall decoding
...
Make parser of msgctl syscall print struct msqid_ds.
* ipc_msgctl.c (msqid_ds_t): New typedef. Mpersify it.
(print_msqid_ds): New function. Use msqid_ds_t.
(sys_msgctl): Use print_msqid_ds.
* tests/ipc_msg.c: Update for struct msqid_ds support.
2015-08-28 08:46:23 +00:00
Elvira Khabirova
0a6af9b0a4
Enhance shmctl syscall decoding
...
Make parser of shmctl syscall print struct shmid_ds.
* ipc_shmctl.c (shmid_ds_t): New typedef. Mpersify it.
(print_shmid_ds): New function. Use shmid_ds_t.
(sys_shmctl): Use print_shmid_ds.
* tests/ipc_shm.c: Update for struct shmid_ds support.
2015-08-28 08:46:23 +00:00
Elvira Khabirova
b7699b55dd
tests: add ipc_msgbuf.test
...
* tests/ipc_msgbuf.c: New file.
* tests/ipc_msgbuf.expected: Likewise.
* tests/ipc_msgbuf.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add ipc_msgbuf.
(TESTS): Add ipc_msgbuf.test.
(EXTRA_DIST): Add ipc_msgbuf.expected.
* tests/.gitignore: Add ipc_msgbuf.
2015-08-28 08:46:23 +00:00
Elvira Khabirova
422f793364
tests: add mq.test
...
* tests/mq.c: New file.
* tests/mq.expected: Likewise.
* tests/mq.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add mq.
(TESTS): Add mq.test.
(EXTRA_DIST): Add mq.expected.
(mq_LDADD): Add -lrt.
* tests/.gitignore: Add mq.
2015-08-28 08:46:23 +00:00
cde9ef7183
tests: add wait.test
...
* tests/wait.c: New file.
* tests/wait.expected: Likewise.
* tests/wait.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add wait.
(TESTS): Add wait.test.
(EXTRA_DIST): Add wait.expected.
* tests/.gitignore: Add wait.
2015-08-28 08:46:23 +00:00
Elvira Khabirova
3b7674c6df
tests: add rt_sigqueueinfo.test
...
* tests/rt_sigqueueinfo.c: New file.
* tests/rt_sigqueueinfo.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add rt_sigqueueinfo.
(TESTS): Add rt_sigqueueinfo.test.
* tests/.gitignore: Add rt_sigqueueinfo.
2015-08-28 08:46:23 +00:00
78e48eb430
tests: add utimensat.test
...
* tests/utimensat.c: New file.
* tests/utimensat.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add utimensat.
(TESTS): Add utimensat.test.
* configure.ac (AC_CHECK_FUNCS): Add utimensat.
* tests/.gitignore: Add utimensat.
2015-08-28 08:46:23 +00:00
c633188e82
tests: convert readlink.test and readlinkat.test from match_awk to match_diff
...
* tests/readlink.c (main): Print expected output.
* tests/readlinkat.c (main): Likewise.
* tests/readlink.test: Use match_diff instead of match_awk.
* tests/readlinkat.test: Likewise.
* tests/readlink.awk: Remove.
* tests/readlinkat.awk: Likewise.
* tests/Makefile.am (EXTRA_DIST): Remove readlink.awk and readlinkat.awk.
2015-08-28 08:43:57 +00:00
f008b01b69
tests: convert getrandom.test from match_awk to match_diff
...
* tests/getrandom.c (main): Print expected output.
* tests/getrandom.test: Use match_diff instead of match_awk.
* tests/getrandom.awk: Remove.
* tests/Makefile.am (EXTRA_DIST): Remove getrandom.awk.
2015-08-28 08:16:43 +00:00
4960b2f008
tests: convert select.test from match_awk to match_diff
...
* tests/select.c (main): Print expected output.
* tests/select.test: Use match_diff instead of match_awk.
* tests/select.awk: Remove.
* tests/Makefile.am (EXTRA_DIST): Remove select.awk.
2015-08-27 08:24:39 +00:00
f14a8e1665
tests: convert several tests from match_grep to match_diff
...
* tests/sendfile.test: Use match_diff instead of match_grep.
* tests/sendfile64.test: Likewise.
* tests/time.test: Likewise.
* tests/utime.test: Likewise.
* tests/xet_robust_list.test: Likewise.
* tests/sendfile.c (main): Update match patterns for match_diff.
* tests/sendfile64.c (main): Likewise.
* tests/time.c (main): Likewise.
* tests/utime.c (main): Likewise.
* tests/xet_robust_list.c (main): Likewise.
2015-08-27 00:09:46 +00:00
f6a36f0c9e
tests: fix match_diff usage
...
The first argument of match_diff should be the file with expected
output, the second argument - the file with actual output.
* tests/aio.test: Swap match_diff arguments.
* tests/restart_syscall.test: Likewise.
* tests/seccomp.test: Likewise.
* tests/umovestr2.test: Likewise.
2015-08-27 00:09:46 +00:00
cf3ecbdd5f
build: fix -I options
...
* configure.ac (AM_INIT_AUTOMAKE): Add nostdinc.
* Makefile.am (AM_CPPFLAGS): Append -I$(builddir) and -I$(srcdir).
* tests/Makefile.am (AM_CPPFLAGS): Likewise.
2015-08-27 00:09:45 +00:00
f56046e459
aio: rewrite from libaio.h to linux/aio_abi.h
...
* configure.ac (AC_CHECK_HEADERS): Remove libaio.h.
* aio.c: Assume that <linux/aio_abi.h> is available,
include it instead of <libaio.h>.
[!IOCB_RESFD]: Remove.
(enum iocb_sub): Remove SUB_POLL.
(tprint_lio_opcode): Update.
(print_common_flags): Use IOCB_FLAG_RESFD instead of IOCB_RESFD,
rename fields of struct iocb.
(iocb_is_valid, print_iocb_header, print_iocb): New functions.
(sys_io_submit): Use print_iocb.
(print_io_event): Fix struct io_event decoding.
(sys_io_cancel): Use print_iocb_header.
* strace.spec (BuildRequires): Remove libaio-devel.
* tests/aio.c (main): Test IOCB_CMD_PREADV, io_cancel,
and struct io_event decoding.
* tests/aio.test (syscalls): Add io_cancel.
2015-08-26 21:05:17 +00:00
13c2173393
Fix multiple personalities support in parser of io_submit syscall
...
Introduce a new helper function to fetch tracee's long integers
and use it to fix multiple personalities support in io_submit parser.
* defs.h (umove_long_or_printaddr): New prototype.
* util.c (umove_long_or_printaddr): New function.
* aio.c (sys_io_submit): Use it to fetch tracee's pointers.
* tests/aio.c: New file.
* tests/aio.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add aio.
(TESTS): Add aio.test.
* tests/.gitignore: Add aio.
2015-08-26 21:05:17 +00:00
857adac3a5
tests: fix build on systems that lack O_CLOEXEC definition
...
* tests/epoll_create1.c (main): Check that O_CLOEXEC is defined.
* tests/eventfd.c (main): Likewise.
* tests/signalfd.c (main): Likewise.
2015-08-26 21:05:17 +00:00
ff6b6f3f72
tests: fix build on systems that lack AT_FDCWD definition
...
* tests/readlinkat.c: Stop including <fcntl.h>.
(main): Replace AT_FDCWD with -100.
2015-08-26 20:23:31 +00:00
49182851eb
tests: add sendfile.test and sendfile64.test
...
* tests/sendfile.c: New file.
* tests/sendfile64.c: New file.
* tests/sendfile.test: New test.
* tests/sendfile64.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add sendfile and sendfile64.
(TESTS): Add sendfile.test and sendfile64.test.
* tests/.gitignore: Add sendfile and sendfile64.
2015-08-19 14:15:07 +00:00
41b9facc2a
tests: add a test for get_robust_list and set_robust_list decoding
...
* tests/xet_robust_list.c: New file.
* tests/xet_robust_list.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add xet_robust_list.
(TESTS): Add xet_robust_list.test.
* tests/.gitignore: Add xet_robust_list.
2015-08-18 20:28:54 +00:00
f9b455cfd2
Fix time syscall decoding for some personalities
...
* time.c (current_time_t_is_int32): Define.
(sys_time): Use it, printnum_int, and printnum_int64 instead
of printnum_long.
* tests/time.c: New file.
* tests/time.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add time.
(TESTS): Add time.test.
* tests/.gitignore: Add time.
2015-08-18 15:10:55 +00:00
Gleb Fotengauer-Malinovskiy
3af6aabe52
tests: add readlink.test and readlinkat.test
...
* tests/readlink.c: New file.
* tests/readlink.awk: Likewise.
* tests/readlinkat.c: Likewise.
* tests/readlinkat.awk: Likewise.
* tests/readlink.test: New test.
* tests/readlinkat.test: Likewise.
* tests/Makefile.am (check_PROGRAMS): Add readlink and readlinkat.
(TESTS): Add readlink.test and readlinkat.test.
(EXTRA_DIST): Add readlink.awk and readlinkat.awk.
* tests/.gitignore: Add readlink and readlinkat.
2015-08-15 02:21:22 +02:00
525eed33fa
Print nanoseconds along with seconds in stat family syscalls
...
* configure.ac (AC_CHECK_MEMBERS): Add stat.st_atim.tv_nsec,
stat.st_ctim.tv_nsec, stat.st_mtim.tv_nsec, stat.st_atime_nsec,
stat.st_atime_csec, and stat.st_mtime_nsec.
* file.c: Explicitly define HAVE_STRUCT_STAT_ST_ATIME_NSEC,
HAVE_STRUCT_STAT_ST_CTIME_NSEC and HAVE_STRUCT_STAT_ST_MTIME_NSEC
for locally defined types.
* printstat.h (DO_PRINTSTAT): Print st_atime_nsec, st_ctime_nsec,
and st_mtime_nsec members.
* tests/stat.c [_FILE_OFFSET_BITS == 64]: Use st_atime_nsec,
st_ctime_nsec, and st_mtime_nsec via st_atim.tv_nsec, st_ctim.tv_nsec,
and st_mtim.tv_nsec.
(main): Print st_atime_nsec, st_ctime_nsec, and st_mtime_nsec members.
This fixes Fedora bug #1251176 .
2015-08-09 09:19:55 +00:00
30ac0627f2
signalfd4: fix flags decoding
...
* configure.ac (AC_CHECK_FUNCS): Add eventfd.
(AC_CHECK_HEADERS): Add sys/signalfd.h.
* signalfd.c: Include <fcntl.h>.
[HAVE_SYS_SIGNALFD_H] Include <sys/signalfd.h>.
Include "xlat/sfd_flags.h".
(do_signalfd): Use sfd_flags for flags decoding.
* xlat/sfd_flags.in: New file.
* tests/signalfd.c: Likewise.
* tests/signalfd.expected: Likewise.
* tests/signalfd.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add signalfd.
(TESTS): Add signalfd.test.
(EXTRA_DIST): Add signalfd.expected.
* tests/.gitignore: Add signalfd.
2015-08-03 09:57:14 +00:00
3d463be47e
socket: mark return code with RVAL_FD flag
...
* net.c (sys_socket): Set RVAL_FD flag in the return code.
* tests/net-yy-accept.awk: Update socket and bind regexps.
* tests/unix-yy-accept.awk: Likewise.
* tests/net-yy-connect.awk: Update socket and connect regexps.
* tests/unix-yy-connect.awk: Likewise.
2015-08-03 09:09:26 +00:00
bf62c1b52d
epoll_create1: fix flags decoding
...
* xlat/epollflags.in: Remove EPOLL_NONBLOCK, provide fallback definition
for EPOLL_CLOEXEC.
* tests/epoll_create1.c: New file.
* tests/epoll_create1.expected: Likewise.
* tests/epoll_create1.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add epoll_create1.
(TESTS): Add epoll_create1.test.
(EXTRA_DIST): Add epoll_create1.expected.
* tests/.gitignore: Add epoll_create1.
2015-08-02 00:10:48 +00:00
c8cba990a2
eventfd2: fix flags decoding
...
* configure.ac (AC_CHECK_HEADERS): Add sys/eventfd.h.
* eventfd.c: Include <fcntl.h>.
[HAVE_SYS_EVENTFD_H] Include <sys/eventfd.h>.
Include "xlat/efd_flags.h".
(do_eventfd): Use efd_flags for flags decoding.
* xlat/efd_flags.in: New file.
* tests/eventfd.c: New file.
* tests/eventfd.expected: Likewise.
* tests/eventfd.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add eventfd.
(TESTS): Add eventfd.test.
(EXTRA_DIST): Add eventfd.expected.
* tests/.gitignore: Add eventfd.
2015-08-01 22:23:58 +00:00
0c0453a1cb
tests/ppoll: replace SIGABRT with SIGHUP
...
Use SIGHUP instead of SIGABRT, the number of the former
is more portable across architectures.
* tests/ppoll.c (test2): Replace SIGABRT with SIGHUP.
* tests/ppoll.expected: Update regexp.
* tests/ppoll-v.expected: Likewise.
2015-08-01 16:52:13 +00:00
d9fb450748
Cleanup poll/ppoll decoders
...
* poll.c (decode_poll): Split into print_pollfd, decode_poll_entering,
and decode_poll_exiting.
(sys_poll, sys_ppoll): Update callers.
* tests/ppoll.c: New file.
* tests/ppoll.expected: Likewise.
* tests/ppoll-v.expected: Likewise.
* tests/ppoll.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add ppoll.
(TESTS): Add ppoll.test.
(EXTRA_DIST): Add ppoll.expected and ppoll-v.expected.
* tests/.gitignore: Add ppoll.
2015-07-30 22:03:07 +00:00
ea7ef9365f
tests: add oldselect.test
...
* tests/oldselect.c: New file.
* tests/oldselect.expected: Likewise.
* tests/oldselect.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add oldselect.
(TESTS): Add oldselect.test.
(EXTRA_DIST): Add oldselect.expected.
* tests/.gitignore: Add oldselect.
2015-07-30 22:03:07 +00:00
4e3ded36ef
tests/bpf: fix build with incompatibly old linux/bpf.h and/or gcc
...
* configure.ac: Check how union bpf_attr.log_buf initialization works.
* tests/bpf.c: Check for HAVE_UNION_BPF_ATTR_LOG_BUF.
2015-07-29 22:53:07 +00:00
3456bcca67
Implement sched_getattr and sched_setattr syscalls decoding
...
* xlat/sched_flags.in: New file.
* sched.c: Include "xlat/sched_flags.h".
(print_sched_attr, sys_sched_setattr, sys_sched_getattr): New functions.
* linux/dummy.h (sys_sched_getattr, sys_sched_setattr): Remove.
* tests/sched_xetattr.c: New file.
* tests/sched_xetattr.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add sched_xetattr.
(TESTS): Add sched_xetattr.test.
* tests/.gitignore: Add sched_xetattr.
2015-07-29 09:18:26 +00:00
95b84ea641
Implement memfd_create syscall decoding
...
* memfd_create.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* linux/dummy.h (sys_memfd_create): Remove.
* pathtrace.c (pathtrace_match): Add SEN_memfd_create.
* xlat/memfd_create_flags.in: New file.
* tests/memfd_create.c: New file.
* tests/memfd_create.expected: Likewise.
* tests/memfd_create.test: New test.
* tests/Makefile.am: (check_PROGRAMS): Add memfd_create.
(TESTS): Add memfd_create.test.
(EXTRA_DIST): Add memfd_create.expected.
* tests/.gitignore: Add memfd_create.
2015-07-29 09:18:26 +00:00