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
aa7b60de3e
Update EPOLL* constants
...
* xlat/epollevents.in: Add EPOLLWAKEUP and EPOLLEXCLUSIVE.
2016-03-14 21:53:19 +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
5d6292c167
hppa: wire up copy_file_range syscall
...
* linux/hppa/syscallent.h [346]: Add copy_file_range entry.
2016-02-21 01:53:31 +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
Nahim El Atmani
c811fa6115
Reduce memory usage while managing tcbs allocation.
...
* strace.c (init): Remove initial memory allocation for tcbtab.
(expand_tcbtab): Do initial memory allocation when tcbtabsize == 0.
Signed-off-by: Nahim El Atmani <nahim+dev@naam.me>
Reviewed-By: Gabriel Laskar <gabriel@lse.epita.fr>
Reported-by: haris iqbal <haris.phnx@gmail.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2016-03-05 17:02:05 +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
0cb245a76c
mips: wire up copy_file_range syscall
...
* linux/mips/syscallent-n32.h [6324]: Add copy_file_range entry.
* linux/mips/syscallent-n64.h [5320]: Likewise.
* linux/mips/syscallent-o32.h [4360]: Likewise.
2016-02-20 00:37:01 +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
8ef9809b63
Print unfetchable address in poll and ppoll decoders
...
* poll.c (decode_poll_entering): Replace umove call with
umove_or_printaddr.
(decode_poll_exiting): Print unfetchable address when umove call fails.
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
1ab6e25585
Replace printargs_lu and printargs_ld with printargs_u and printargs_d
...
* defs.h (printargs_lu): Rename to printargs_u.
(printargs_ld): Rename to printargs_d.
* syscall.c (printargs_lu): Rename to printargs_u. Replace %lu with %u.
(printargs_ld): Rename to printargs_d. Replace %ld with %d.
* linux/dummy.h (sys_getpgrp): Change to printargs.
(sys_alarm): Change to printargs_u.
(sys_getpgid, sys_getsid, sys_nice, sys_setpgid, sys_setpgrp,
sys_timer_delete, sys_timer_getoverrun): Change to printargs_d.
2016-02-14 22:30:27 +00:00
835127d469
Change printargs_lu and printargs_ld to return RVAL_DECODED
...
* syscall.c (printargs_lu, printargs_ld): Return RVAL_DECODED.
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
38437688ec
Update fs *_MAGIC constants
...
* xlat/fsmagic.in: Add CGROUP2_SUPER_MAGIC and OVERLAYFS_SUPER_MAGIC.
2016-02-14 00:36:38 +00:00
b9c8e66f46
Update IPV6_* constants
...
* xlat/sockipv6options.in: Add IPV6_HDRINCL.
2016-02-14 00:36:38 +00:00
c257fbe24d
Update SO_* constants
...
* xlat/sockoptions.in: Add SO_ATTACH_REUSEPORT_CBPF
and SO_ATTACH_REUSEPORT_EBPF.
2016-02-14 00:36:38 +00:00
12d5e7c8c3
Update MADV_* constants
...
* xlat/madvise_cmds.in: Add MAD_FREE.
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
4ab20405bc
Fix numbers of syscall arguments in syscall tables
...
This semi-automatic change brings syscall tables in sync with kernel's
include/linux/syscalls.h file.
* linux/aarch64/syscallent.h (recv): Fix nargs.
* linux/alpha/syscallent.h (sigaltstack, init_module,
sched_getscheduler, settimeofday): Likewise.
* linux/arm/syscallent.h (signal, pciconfig_iobase, msgrcv, msgctl,
shmat, shmdt, shmctl, semtimedop, get_mempolicy, set_mempolicy,
timerfd_create): Likewise.
* linux/bfin/syscallent.h (signal, delete_module): Likewise.
* linux/hppa/syscallent.h (init_module, munlockall, sched_getscheduler,
io_cancel, set_tid_address, listxattr, llistxattr, flistxattr,
removexattr, lremovexattr, fremovexattr): Likewise.
* linux/i386/syscallent.h (signal, mmap): Likewise.
* linux/ia64/syscallent.h (init_module, readv, writev,
sched_getscheduler): Likewise.
* linux/m68k/syscallent.h (signal, request_key): Likewise.
* linux/microblaze/syscallent.h (signal, clone, fstatfs64, vmsplice):
Likewise.
* linux/mips/syscallent-n32.h (getpgid, statfs, fstatfs, init_module,
delete_module): Likewise.
* linux/mips/syscallent-n64.h (getpgid, statfs, fstatfs, init_module,
delete_module): Likewise.
* linux/mips/syscallent-o32.h (signal, statfs, fstatfs, ioperm,
fstatfs64): Likewise.
* linux/powerpc/syscallent.h (signal, spu_run, spu_create): Likewise.
* linux/powerpc64/syscallent.h (signal, pread64, pwrite64, readahead,
fadvise64, lookup_dcookie, spu_run, spu_create, sync_file_range2,
fallocate, preadv, pwritev, fanotify_mark): Likewise.
* linux/s390/syscallent.h (signal, mmap, lookup_dcookie, ipc): Likewise.
* linux/s390x/syscallent.h (signal, ipc): Likewise.
* linux/sh/syscallent.h (signal, ipc, munlockall, fstatfs64, vmsplice):
Likewise.
* linux/sh64/syscallent.h (signal, ipc, msgrcv, msgctl, shmat, shmdt,
shmctl, fstatfs64, vmsplice): Likewise.
* linux/sparc/syscallent.h (ptrace, dup, signal, ipc): Likewise.
* linux/sparc64/syscallent.h (ptrace, dup, signal, pread64, pwrite64,
readahead, lookup_dcookie, fadvise64, fadvise64_64, ipc,
sync_file_range, fallocate, preadv, pwritev, fanotify_mark): Likewise.
* linux/x32/syscallent.h (64:recvmsg): Likewise.
* linux/xtensa/syscallent.h (mremap, futex, reboot, init_module,
delete_module, request_key, getcpu, ioprio_set, ioprio_get, utimensat,
futimesat, fchmodat, faccessat): Likewise.
* NEWS: Mention this fix.
2016-02-13 00:57:00 +00:00
f3948fe494
s390: decode fadvise64 and fadvise64_64
...
* linux/s390/syscallent.h (fadvise64): Set sys_func.
(fadvise64_64): Set nargs and sys_func.
2016-02-13 00:57:00 +00:00
61066ea8e7
mips n64: use the most optimal parser for fadvise64 syscall
...
* linux/mips/syscallent-n64.h (fadvise64): Replace SEN(fadvise64_64)
with SEN(fadvise64).
2016-02-13 00:57:00 +00:00