]>
granicus.if.org Git - strace/log
Dmitry V. Levin [Tue, 5 Apr 2016 23:30:05 +0000 (23:30 +0000)]
Add default values for SYNC_FILE_RANGE_* constants
* xlat/sync_file_range_flags.in: Add default values.
Elliott Hughes [Tue, 5 Apr 2016 19:10:16 +0000 (12:10 -0700)]
Fix sync_file_range2 output
Before:
sync_file_range2(3SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE|
SYNC_FILE_RANGE_WAIT_AFTER|0xfffffff8, 0, 0, )
After:
sync_file_range2(3, SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE|
SYNC_FILE_RANGE_WAIT_AFTER|0xfffffff8, 0, 0)
* sync_file_range.c (SYS_FUNC(sync_file_range2)): Output the ", "
in the right place.
Dmitry V. Levin [Mon, 4 Apr 2016 01:35:28 +0000 (01:35 +0000)]
Replace PF_* constants with AF_*
AF_* constants appear to be more standardized, and in practice there's
always a one to one relationship between AF_* and PF_*, so let's
use AF_* instead of PF_*.
* xlat/domains.in: Remove.
* net.c: Do not define PF_UNSPEC. Stop including "xlat/domains.h".
Replace PF_* with AF_*. Replace domains with addrfams.
* tests/inet-cmsg.c: Replace PF_INET with AF_INET.
* tests/net-yy-inet.c: Likewise.
* tests/netlink_inet_diag.c: Likewise.
* tests/net-accept-connect.c: Replace PF_LOCAL with AF_LOCAL.
* tests/net-y-unix.c: Likewise.
* tests/net-yy-unix.c: Likewise.
* tests/netlink_unix_diag.c: Likewise.
* tests/net.expected: Replace PF_ with AF_.
Dmitry V. Levin [Sun, 3 Apr 2016 16:37:43 +0000 (16:37 +0000)]
tests: add read-write.test
* tests/read-write.c: New file.
* tests/read-write.test: New test.
* tests/.gitignore: Add read-write.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add read-write.test.
Dmitry V. Levin [Sat, 2 Apr 2016 18:27:44 +0000 (18:27 +0000)]
tests/pread64-pwrite64.test: extend dumpio coverage
* tests/pread64-pwrite64.c (dump_str, print_hex, test_dump):
New functions.
(main): Use them to test dumping of various data.
* tests/pread64-pwrite64.test: Update.
Dmitry V. Levin [Sat, 2 Apr 2016 18:24:36 +0000 (18:24 +0000)]
tests: add hexdump_memdup function to libtests
* tests/hexdump_strdup.c (hexdump_memdup): New function.
(hexdump_strdup): Use it.
* tests/tests.h (hexdump_memdup): New prototype.
Dmitry V. Levin [Sat, 2 Apr 2016 14:07:02 +0000 (14:07 +0000)]
tests: add fchownat.test
* tests/fchownat.c: New file.
* tests/fchownat.test: New test.
* tests/.gitignore: Add fchownat.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add fchownat.test.
Dmitry V. Levin [Sat, 2 Apr 2016 13:13:16 +0000 (13:13 +0000)]
tests: add fchmodat.test
* tests/fchmodat.c: New file.
* tests/fchmodat.test: New test.
* tests/.gitignore: Add fchmodat.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add fchmodat.test.
Dmitry V. Levin [Sat, 2 Apr 2016 01:08:24 +0000 (01:08 +0000)]
Fix printing of negative offsets in pread64 and pwrite64 syscalls
* io.c (SYS_FUNC(pread), SYS_FUNC(pwrite)): Print offset
using %lld format string.
* tests/pread64-pwrite64.c: New file.
* tests/pread64-pwrite64.test: New test.
* tests/.gitignore: Add pread64-pwrite64.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(pread64_pwrite64_CPPFLAGS): New variable.
(DECODER_TESTS): Add pread64-pwrite64.
Dmitry V. Levin [Sat, 2 Apr 2016 01:05:25 +0000 (01:05 +0000)]
tests/hexdump_strdup.c: add support for longer strings
* tests/hexdump_strdup.c (hexdump_strdup): Output extra space character
before hexdumping of the 9th symbol.
Dmitry V. Levin [Sat, 2 Apr 2016 01:04:57 +0000 (01:04 +0000)]
tests/preadv-pwritev.c: fix typo in error diagnostics
* tests/preadv-pwritev.c (main): Fix typo in error message.
Fei Jie [Thu, 31 Mar 2016 08:06:52 +0000 (16:06 +0800)]
tests: add chroot.test
* tests/chroot.c: New file.
* tests/chroot.test: New test.
* tests/.gitignore: Add chroot.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add chroot.test.
Fei Jie [Thu, 31 Mar 2016 08:06:51 +0000 (16:06 +0800)]
tests: add fdatasync.test
* tests/fdatasync.c: New file.
* tests/fdatasync.test: New test.
* tests/.gitignore: Add fdatasync.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add fdatasync.test.
Fei Jie [Thu, 31 Mar 2016 08:06:50 +0000 (16:06 +0800)]
tests: add fsync.test
* tests/fsync.c: New file.
* tests/fsync.test: New test.
* tests/.gitignore: Add fsync.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add fsync.test.
Fei Jie [Thu, 31 Mar 2016 08:06:49 +0000 (16:06 +0800)]
tests: add sethostname.test
* tests/sethostname.c: New file.
* tests/sethostname.test: New test.
* tests/.gitignore: Add sethostname.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add sethostname.test.
Dmitry V. Levin [Fri, 1 Apr 2016 15:31:23 +0000 (15:31 +0000)]
Consistently handle unsigned arguments of mmap* and remap_file_pages
Explicitly declare first 4 arguments of mmap* and all remap_file_pages
arguments as unsigned to avoid potential sign extension issues.
* mem.c (print_mmap, SYS_FUNC(remap_file_pages)): Assign syscall
arguments to local variables of appropriate types.
Dmitry V. Levin [Fri, 1 Apr 2016 01:03:20 +0000 (01:03 +0000)]
Consistently handle 2nd and 3rd arguments of [gs]etsockopt as unsigned
The second (level) and third (optname) arguments of getsockopt and
setsockopt syscalls are enums, so treat them consistently as enums:
use "unsigned int" type to avoid potential sign extension issues.
* net.c (print_sockopt_fd_level_name, print_getsockopt,
print_setsockopt): Change type of "level" and "name" arguments
from "int" to "unsigned int".
Dmitry V. Levin [Fri, 1 Apr 2016 00:52:01 +0000 (00:52 +0000)]
Add sentinel attribute to printxvals
* gcc_compat.h (ATTRIBUTE_SENTINEL): New macro.
* defs.h (printxvals): Add ATTRIBUTE_SENTINEL.
Dmitry V. Levin [Fri, 1 Apr 2016 00:28:33 +0000 (00:28 +0000)]
Cleanup parser of ptrace syscall
* process.c (print_user_offset_addr): New function for printing offset
address in the tracee's USER area.
(SYS_FUNC(ptrace)): Assign syscall arguments to local variables with
appropriate types. Print pid argument as int. Use switch statement
in the code that handles address argument. Use print_user_offset_addr
to print address in PTRACE_PEEKUSER and PTRACE_POKEUSER requests.
Jeff Mahoney [Thu, 31 Mar 2016 04:34:17 +0000 (00:34 -0400)]
Define PRI__[uxs]64 macros to print __s64 and __u64 values
Rather than cast every __u64 or __s64 before printing,
define printing helpers for those types directly.
* defs.h (PRI__s64, PRI__u64, PRI__x64): New macros.
Dmitry V. Levin [Thu, 31 Mar 2016 00:01:58 +0000 (00:01 +0000)]
Implement dumping of preadv and pwritev syscalls
* syscall.c (dumpio): Add SEN_preadv and SEN_pwritev.
* NEWS: Mention this.
* tests/preadv-pwritev.c: New file.
* tests/preadv-pwritev.test: New test.
* tests/.gitignore: Add preadv-pwritev.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(preadv_pwritev_CPPFLAGS): New variable.
(DECODER_TESTS): Add preadv-pwritev.
Dmitry V. Levin [Wed, 30 Mar 2016 18:04:00 +0000 (18:04 +0000)]
Fix decoding of preadv syscall in case of short read
* io.c (SYS_FUNC(preadv)): Call tprint_iov_upto instead
of tprint_iov and specify syscall return value as a data size limit.
* NEWS: Mention it.
* tests/preadv.c (main): Add a test case for preadv short read.
Dmitry V. Levin [Wed, 30 Mar 2016 03:54:21 +0000 (03:54 +0000)]
Fix printing of negative offsets in preadv and pwritev syscalls
* io.c (print_llu_from_low_high_val): Rename to
print_lld_from_low_high_val, all callers changed.
Print value as a signed integer.
* tests/preadv.c: New file.
* tests/preadv.test: New test.
* tests/pwritev.c: New file.
* tests/pwritev.test: New test.
* tests/.gitignore: Add preadv and pwritev.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(preadv_CPPFLAGS, pwritev_CPPFLAGS): New variables.
(DECODER_TESTS): Add preadv.test and pwritev.test.
Dmitry V. Levin [Wed, 30 Mar 2016 02:22:58 +0000 (02:22 +0000)]
Fix printing of unreadable struct iovec
* io.c (tprint_iov_upto): If the first element of iovec array is
unreadable, print its address without array markup.
* tests/readv.c (main): Check it.
Dmitry V. Levin [Wed, 30 Mar 2016 00:16:24 +0000 (00:16 +0000)]
tests: factor out a part common to many simply organized test scripts
* tests/init.sh (run_strace_match_diff): New function.
* tests/acct.test: Rewrite using run_strace_match_diff.
* tests/aio.test: Likewise.
* tests/alarm.test: Likewise.
* tests/chmod.test: Likewise.
* tests/clock_nanosleep.test: Likewise.
* tests/clock_xettime.test: Likewise.
* tests/copy_file_range.test: Likewise.
* tests/creat.test: Likewise.
* tests/dup.test: Likewise.
* tests/dup2.test: Likewise.
* tests/dup3.test: Likewise.
* tests/epoll_create1.test: Likewise.
* tests/execveat-v.test: Likewise.
* tests/execveat.test: Likewise.
* tests/fchmod.test: Likewise.
* tests/fcntl.test: Likewise.
* tests/file_handle.test: Likewise.
* tests/flock.test: Likewise.
* tests/fork-f.test: Likewise.
* tests/ftruncate.test: Likewise.
* tests/ftruncate64.test: Likewise.
* tests/getcwd.test: Likewise.
* tests/getdents.test: Likewise.
* tests/getdents64.test: Likewise.
* tests/getrandom.test: Likewise.
* tests/getrusage.test: Likewise.
* tests/getxxid.test: Likewise.
* tests/inet-cmsg.test: Likewise.
* tests/init.sh: Likewise.
* tests/membarrier.test: Likewise.
* tests/mincore.test: Likewise.
* tests/mknod.test: Likewise.
* tests/mlock2.test: Likewise.
* tests/mmsg.test: Likewise.
* tests/nanosleep.test: Likewise.
* tests/open.test: Likewise.
* tests/openat.test: Likewise.
* tests/pselect6.test: Likewise.
* tests/readdir.test: Likewise.
* tests/readlink.test: Likewise.
* tests/readv.test: Likewise.
* tests/recvmsg.test: Likewise.
* tests/rename.test: Likewise.
* tests/renameat.test: Likewise.
* tests/rt_sigpending.test: Likewise.
* tests/rt_sigprocmask.test: Likewise.
* tests/rt_sigqueueinfo.test: Likewise.
* tests/rt_sigsuspend.test: Likewise.
* tests/rt_sigtimedwait.test: Likewise.
* tests/rt_tgsigqueueinfo.test: Likewise.
* tests/sched_get_priority_mxx.test: Likewise.
* tests/sched_xetaffinity.test: Likewise.
* tests/sched_xetparam.test: Likewise.
* tests/sched_xetscheduler.test: Likewise.
* tests/seccomp.test: Likewise.
* tests/select.test: Likewise.
* tests/sendfile.test: Likewise.
* tests/sendfile64.test: Likewise.
* tests/splice.test: Likewise.
* tests/statx.sh: Likewise.
* tests/sysinfo.test: Likewise.
* tests/syslog.test: Likewise.
* tests/tee.test: Likewise.
* tests/time.test: Likewise.
* tests/timer_create.test: Likewise.
* tests/timer_xettime.test: Likewise.
* tests/timerfd_xettime.test: Likewise.
* tests/times-fail.test: Likewise.
* tests/times.test: Likewise.
* tests/truncate.test: Likewise.
* tests/truncate64.test: Likewise.
* tests/umask.test: Likewise.
* tests/umount.test: Likewise.
* tests/umount2.test: Likewise.
* tests/userfaultfd.test: Likewise.
* tests/vmsplice.test: Likewise.
* tests/xet_robust_list.test: Likewise.
* tests/xetitimer.test: Likewise.
* tests/xetpgid.test: Likewise.
* tests/xetpriority.test: Likewise.
* tests/xettimeofday.test: Likewise.
Dmitry V. Levin [Wed, 30 Mar 2016 00:13:56 +0000 (00:13 +0000)]
tests: introduce $NAME
* tests/init.sh (NAME): New variable, defined to ${ME_%.test}.
(run_prog, match_awk, match_diff, match_grep): Replace ${ME_%.test}
with $NAME.
* tests/fcntl.test: Likewise.
* tests/fstat.test: Likewise.
* tests/mmap.test: Likewise.
* tests/net-y-unix.test: Likewise.
* tests/net-yy-inet.test: Likewise.
* tests/net-yy-unix.test: Likewise.
* tests/open.test: Likewise.
* tests/openat.test: Likewise.
* tests/poll.test: Likewise.
* tests/ppoll.test: Likewise.
* tests/readlink.test: Likewise.
* tests/select.test: Likewise.
* tests/statx.sh: Likewise.
* tests/uname.test: Likewise.
Dmitry V. Levin [Wed, 30 Mar 2016 00:13:37 +0000 (00:13 +0000)]
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.
Dmitry V. Levin [Tue, 29 Mar 2016 17:01:02 +0000 (17:01 +0000)]
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.
Dmitry V. Levin [Tue, 29 Mar 2016 03:33:00 +0000 (03:33 +0000)]
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.
Dmitry V. Levin [Tue, 29 Mar 2016 01:15:24 +0000 (01:15 +0000)]
quotactl: add decoding of Q_GETNEXTQUOTA and Q_XGETNEXTQUOTA
* quota.c (if_nextdqblk): New structure.
(decode_cmd_data): Handle Q_GETNEXTQUOTA and Q_XGETNEXTQUOTA.
Dmitry V. Levin [Tue, 29 Mar 2016 00:35:20 +0000 (00:35 +0000)]
Update Q_* constants
* xlat/quotacmds.in: Add Q_GETNEXTQUOTA and Q_XGETNEXTQUOTA introduced
by linux kernel commits v4.6-rc1~65^2~9^2~5 and v4.6-rc1~65^2~9^2~6.
Dmitry V. Levin [Tue, 29 Mar 2016 00:44:50 +0000 (00:44 +0000)]
Update CLONE_* constants
* xlat/clone_flags.in: Rename CLONE_STOPPED to CLONE_NEWCGROUP.
The former was removed by linux kernel commit v2.6.38-rc1~217.
The latter was introduced by linux kernel commit v4.6-rc1~67^2~8.
Dmitry V. Levin [Tue, 29 Mar 2016 00:28:11 +0000 (00:28 +0000)]
Update BPF_MAP_TYPE_* constants
* xlat/bpf_map_types.in: Add BPF_MAP_TYPE_PERCPU_HASH,
BPF_MAP_TYPE_PERCPU_ARRAY, and BPF_MAP_TYPE_STACK_TRACE introduced by
linux kernel commits v4.6-rc1~91^2~326^2~5, v4.6-rc1~91^2~326^2~4, and
v4.6-rc1~91^2~212^2~1, respectively.
Dmitry V. Levin [Tue, 29 Mar 2016 00:20:37 +0000 (00:20 +0000)]
Update SO_* constants
* xlat/sockoptions.in: Add SO_CNX_ADVICE introduced by linux kernel
commit v4.6-rc1~91^2~176.
Dmitry V. Levin [Tue, 29 Mar 2016 00:17:19 +0000 (00:17 +0000)]
Update SEGV_* constants
* xlat/sigsegv_codes.in: Add SEGV_PKUERR introduced by linux kernel
commit v4.6-rc1~68^2~23.
Dmitry V. Levin [Tue, 29 Mar 2016 00:01:07 +0000 (00:01 +0000)]
avr32: wire up copy_file_range syscall
* linux/avr32/syscallent.h [325]: Add copy_file_range entry.
JayRJoshi [Thu, 24 Mar 2016 07:09:32 +0000 (12:39 +0530)]
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.
Dmitry V. Levin [Mon, 28 Mar 2016 00:16:17 +0000 (00:16 +0000)]
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.
Dmitry V. Levin [Mon, 28 Mar 2016 00:16:02 +0000 (00:16 +0000)]
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.
Dmitry V. Levin [Mon, 28 Mar 2016 00:15:15 +0000 (00:15 +0000)]
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.
Dmitry V. Levin [Sun, 27 Mar 2016 00:03:27 +0000 (00:03 +0000)]
Update generic ioctl entries from linux 4.5
* linux/64/ioctls_inc.h: Update from linux v4.5 using ioctls_gen.sh.
* linux/32/ioctls_inc_align32.h: Likewise.
* linux/32/ioctls_inc_align64.h: Likewise.
* NEWS: Mention this.
Dmitry V. Levin [Sat, 26 Mar 2016 23:37:18 +0000 (23:37 +0000)]
maint: update for linux 4.5
* maint/ioctls_sym.sh: Update workarounds for drm/*_drm.h files.
Add workarounds for xen/gntdev.h and net/nfc/nci_core.h files.
Update path of saa6588.h and exynos-fimc.h files.
Dmitry V. Levin [Fri, 25 Mar 2016 23:48:48 +0000 (23:48 +0000)]
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.
Dmitry V. Levin [Fri, 25 Mar 2016 23:48:48 +0000 (23:48 +0000)]
sparc64: fix decoding of mknod and mknodat syscalls for sparc personality
Remove remnants of solaris personality support in mknod parser
that resulted to sparc personality being decoded as old solaris
personality. This complements commit
v4.10-45-gdf4dd8b and fixes
commit
v4.10-46-g588a90f .
* mknod.c (decode_mknod) [SPARC || SPARC64]: Remove.
Katerina Koukiou [Fri, 25 Mar 2016 19:40:12 +0000 (21:40 +0200)]
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.
Fei Jie [Fri, 25 Mar 2016 09:47:16 +0000 (17:47 +0800)]
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.
Fei Jie [Fri, 25 Mar 2016 09:47:15 +0000 (17:47 +0800)]
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.
Fei Jie [Fri, 25 Mar 2016 09:47:14 +0000 (17:47 +0800)]
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.
Fei Jie [Fri, 25 Mar 2016 09:47:13 +0000 (17:47 +0800)]
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.
Fei Jie [Fri, 25 Mar 2016 09:46:19 +0000 (17:46 +0800)]
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.
JayRJoshi [Wed, 23 Mar 2016 19:13:13 +0000 (00:43 +0530)]
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.
Dmitry V. Levin [Thu, 24 Mar 2016 01:27:03 +0000 (01:27 +0000)]
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.
Dmitry V. Levin [Thu, 24 Mar 2016 01:10:02 +0000 (01:10 +0000)]
tests: add strace-ttt.test
* tests/strace-ttt.test: New test.
* tests/Makefile.am (MISC_TESTS): Add it.
Dmitry V. Levin [Thu, 24 Mar 2016 01:03:31 +0000 (01:03 +0000)]
tests: add strace-tt.test
* tests/strace-tt.test: New test.
* tests/Makefile.am (MISC_TESTS): Add it.
Dmitry V. Levin [Thu, 24 Mar 2016 00:59:32 +0000 (00:59 +0000)]
tests: add strace-t.test
* tests/strace-t.test: New test.
* tests/Makefile.am (MISC_TESTS): Add it.
Dmitry V. Levin [Thu, 24 Mar 2016 00:31:23 +0000 (00:31 +0000)]
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.
Dmitry V. Levin [Wed, 23 Mar 2016 23:07:02 +0000 (23:07 +0000)]
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).
JayRJoshi [Wed, 23 Mar 2016 13:38:35 +0000 (19:08 +0530)]
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.
JayRJoshi [Wed, 23 Mar 2016 13:34:15 +0000 (19:04 +0530)]
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.
Fei Jie [Thu, 17 Mar 2016 09:30:45 +0000 (17:30 +0800)]
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.
Fei Jie [Tue, 15 Mar 2016 08:38:34 +0000 (16:38 +0800)]
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.
Fei Jie [Tue, 15 Mar 2016 08:38:17 +0000 (16:38 +0800)]
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.
Dmitry V. Levin [Wed, 24 Feb 2016 02:51:09 +0000 (02:51 +0000)]
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.
Dmitry V. Levin [Tue, 23 Feb 2016 19:27:25 +0000 (19:27 +0000)]
Update EPOLL* constants
* xlat/epollevents.in: Add EPOLLWAKEUP and EPOLLEXCLUSIVE.
Dmitry V. Levin [Mon, 22 Feb 2016 23:42:23 +0000 (23:42 +0000)]
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.
Dmitry V. Levin [Sun, 21 Feb 2016 01:53:31 +0000 (01:53 +0000)]
hppa: wire up copy_file_range syscall
* linux/hppa/syscallent.h [346]: Add copy_file_range entry.
Fei Jie [Fri, 11 Mar 2016 02:43:02 +0000 (10:43 +0800)]
tests: filter strace output in uname test
* tests/uname.test: Use uniq to filter strace output.
Fei Jie [Thu, 10 Mar 2016 09:12:24 +0000 (17:12 +0800)]
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.
Fei Jie [Thu, 10 Mar 2016 09:12:23 +0000 (17:12 +0800)]
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.
Fei Jie [Thu, 10 Mar 2016 02:41:31 +0000 (10:41 +0800)]
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.
Fabien Siron [Thu, 10 Mar 2016 10:29:32 +0000 (10:29 +0000)]
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.
Fei Jie [Wed, 9 Mar 2016 06:07:06 +0000 (14:07 +0800)]
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.
Anchit Jain [Mon, 7 Mar 2016 10:57:43 +0000 (16:27 +0530)]
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.
Nahim El Atmani [Sat, 5 Mar 2016 12:35:57 +0000 (13:35 +0100)]
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>
Fei Jie [Tue, 1 Mar 2016 08:55:37 +0000 (16:55 +0800)]
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.
Fei Jie [Tue, 1 Mar 2016 08:55:36 +0000 (16:55 +0800)]
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.
Fei Jie [Tue, 1 Mar 2016 08:55:35 +0000 (16:55 +0800)]
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.
Dmitry V. Levin [Sat, 20 Feb 2016 00:37:01 +0000 (00:37 +0000)]
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.
Dmitry V. Levin [Fri, 19 Feb 2016 16:07:43 +0000 (16:07 +0000)]
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.
Dmitry V. Levin [Wed, 17 Feb 2016 05:24:43 +0000 (05:24 +0000)]
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.
Dmitry V. Levin [Fri, 19 Feb 2016 03:33:49 +0000 (03:33 +0000)]
getrusage.test: fix build on x32
* tests/getrusage.c: Include <stdint.h>
(main): Print members of struct timeval using %ju format.
Dmitry V. Levin [Fri, 19 Feb 2016 02:08:13 +0000 (02:08 +0000)]
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.
Fei Jie [Fri, 19 Feb 2016 01:57:33 +0000 (09:57 +0800)]
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.
Dmitry V. Levin [Fri, 19 Feb 2016 03:27:09 +0000 (03:27 +0000)]
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.
Dmitry V. Levin [Thu, 18 Feb 2016 03:21:30 +0000 (03:21 +0000)]
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.
Dmitry V. Levin [Thu, 18 Feb 2016 00:08:30 +0000 (00:08 +0000)]
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.
Dmitry V. Levin [Fri, 19 Feb 2016 01:30:34 +0000 (01:30 +0000)]
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
69bfc89770152033d4aa0bc5673fc46e65d89838 .
* 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.
Michael Shigorin [Wed, 17 Feb 2016 15:55:28 +0000 (18:55 +0300)]
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.
Dmitry V. Levin [Tue, 16 Feb 2016 00:52:43 +0000 (00:52 +0000)]
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.
Dmitry V. Levin [Tue, 16 Feb 2016 00:44:16 +0000 (00:44 +0000)]
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.
Dmitry V. Levin [Tue, 16 Feb 2016 00:04:37 +0000 (00:04 +0000)]
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.
Dmitry V. Levin [Mon, 15 Feb 2016 18:30:02 +0000 (18:30 +0000)]
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.
Dmitry V. Levin [Sun, 14 Feb 2016 17:14:15 +0000 (17:14 +0000)]
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.
Dmitry V. Levin [Sun, 14 Feb 2016 16:56:58 +0000 (16:56 +0000)]
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.
Dmitry V. Levin [Sun, 14 Feb 2016 16:26:37 +0000 (16:26 +0000)]
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.
Dmitry V. Levin [Sun, 14 Feb 2016 15:53:05 +0000 (15:53 +0000)]
Change printargs_lu and printargs_ld to return RVAL_DECODED
* syscall.c (printargs_lu, printargs_ld): Return RVAL_DECODED.
Dmitry V. Levin [Sun, 14 Feb 2016 00:54:32 +0000 (00:54 +0000)]
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.
Dmitry V. Levin [Sun, 14 Feb 2016 00:04:20 +0000 (00:04 +0000)]
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.
Dmitry V. Levin [Sat, 13 Feb 2016 23:18:15 +0000 (23:18 +0000)]
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.
Dmitry V. Levin [Sat, 13 Feb 2016 22:42:52 +0000 (22:42 +0000)]
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.