Shankara Pailoor
1448070a00
quotactl: add xlat styles support
...
* quota.c (print_qcmd): New function.
(SYS_FUNC(quotactl)): Use it to print the quotactl command.
* tests/quotactl.c (print_dqinfo, print_dqfmt): Handle XLAT_RAW
and XLAT_VERBOSE.
(QUOTA_STR, QUOTA_ID_STR, QUOTA_STR_INVALID): New macros.
(gen_quotacmd, gen_quotaid): New functions.
(main): Use them.
* tests/quotactl-Xabbrev.c: New file.
* tests/quotactl-Xraw.c: Likewise.
* tests/quotactl-Xverbose.c: Likewise.
* tests/gen_tests.in (quotactl-Xabbrev, quotactl-Xraw,
quotactl-Xverbose): New tests.
* tests/pure_executables.list: Add quotactl-Xabbrev, quotactl-Xraw,
and quotactl-Xverbose.
* tests/.gitignore: Likewise.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-12-24 10:19:24 +00:00
Shankara Pailoor
fa35f3e87d
tests: check that printsignal handles xlat styles properly
...
* tests/printsignal.c: New file.
* tests/Makefile.am (EXTRA_DIST): Add it.
* tests/printsignal-Xabbrev.c: New file.
* tests/printsignal-Xraw.c: Likewise.
* tests/printsignal-Xverbose.c: Likewise.
* tests/gen_tests.in (printsignal-Xabbrev, printsignal-Xraw,
printsignal-Xverbose): New tests.
* tests/pure_executables.list: Add printsignal-Xabbrev,
* printsignal-Xraw, and printsignal-Xverbose.
* tests/.gitignore: Likewise.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-12-17 19:19:23 +00:00
Masatake YAMATO
692dbd2c3d
net: enhance decoding of getsockopt(SO_ERROR)
...
* net.c (print_get_error): New function decoding error
number returned as option value for SO_ERROR option.
(print_getsockopt) <case SO_ERROR>: Call print_get_error.
* tests/so_error.c: New test.
* tests/gen_tests.in (so_error): Likewise.
* tests/pure_executables.list: Add so_error.
* tests/.gitignore: Likewise.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2018-12-17 19:19:23 +00:00
7273c6fb3c
Implement PTRACE_GET_SYSCALL_INFO decoder
...
* defs.h (audit_arch): New prototype.
* process.c: Include "ptrace_syscall_info.h".
(SYS_FUNC(ptrace)) <PTRACE_GET_SYSCALL_INFO>: Call
print_ptrace_syscall_info on exiting syscall.
* ptrace_syscall_info.h (print_ptrace_syscall_info): New prototype.
* ptrace_syscall_info.c: Include "print_fields.h" and
"xlat/ptrace_syscall_info_op.h".
(print_ptrace_syscall_info): New function.
* xlat/ptrace_syscall_info_op.in: New file.
* tests/ptrace_syscall_info.c: New file.
* tests/gen_tests.in (ptrace_syscall_info): New test.
* tests/pure_executables.list: Add ptrace_syscall_info.
* tests/.gitignore: Likewise.
2018-12-13 22:07:26 +00:00
Shankara Pailoor
bf195a8455
bpf: honor xlat styles when printing kernel version
...
* print_kernel_version.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* defs.h (print_kernel_version): New prototype.
* bpf.c (BEGIN_BPF_CMD_DECODER(BPF_PROG_LOAD)):
Use print_kernel_version.
* tests/kernel_version.c: New file.
* tests/kernel_version-Xabbrev.c: Likewise.
* tests/kernel_version-Xraw.c: Likewise.
* tests/kernel_version-Xverbose.c: Likewise.
* tests/gen_tests.in (kernel_version, kernel_version-Xabbrev,
kernel_version-Xraw, kernel_version-Xverbose): New tests.
* tests/pure_executables.list: Add kernel_version,
kernel_version-Xabbrev, kernel_version-Xraw, and kernel_version-Xverbose.
* tests/.gitignore: Likewise.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-12-10 23:45:11 +00:00
Shankara Pailoor
e1f15583e0
print_dev_t: add xlat styles support
...
* print_dev_t.c (print_dev_t): Respect xlat_verbosity.
* tests/btrfs.c (sprint_makedev): New function.
(btrfs_print_balance_args, btrfs_test_dev_info_ioctl,
btrfs_test_dev_replace_ioctl, btrfs_test_get_dev_stats_ioctl,
btrfs_test_scrub_ioctls): Use it to update expected output.
* tests/xstatx.c (print_st_mode, sprint_makedev): New functions.
(print_stat): Use them.
* tests/fstat-Xabbrev.c: New file.
* tests/fstat-Xraw.c: Likewise.
* tests/fstat-Xverbose.c: Likewise.
* tests/fstat64-Xabbrev.c: Likewise.
* tests/fstat64-Xraw.c: Likewise.
* tests/fstat64-Xverbose.c: Likewise.
* tests/gen_tests.in (fstat-Xabbrev, fstat-Xraw, fstat-Xverbose,
fstat64-Xabbrev, fstat64-Xraw, fstat64-Xverbose): New entries.
* tests/trace_fstat.in: Likewise.
* tests/trace_stat_like.in: Likewise.
* tests/pure_executables.list: Add fstat-Xabbrev, fstat-Xraw,
fstat-Xverbose, fstat64-Xabbrev, fstat64-Xraw, and fstat64-Xverbose.
* tests/.gitignore: Likewise.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-12-10 23:45:11 +00:00
a4fb2fbdde
tests: add remap_file_pages test variants with different xlat verbosity levels
...
* tests/remap_file_pages-Xabbrev.c: New file.
* tests/remap_file_pages-Xraw.c: Likewise.
* tests/remap_file_pages-Xverbose.c: Likewise.
* tests/remap_file_pages.c: Add handling of XLAT_RAW and XLAT_VERBOSE flags.
* tests/pure_executables.list: Add remap_file_pages-Xabbrev,
remap_file_pages-Xraw, and remap_file_pages-Xverbose.
* tests/.gitignore: Likewise.
* tests/gen_tests.in (remap_file_pages-Xabbrev, remap_file_pages-Xraw,
remap_file_pages-Xverbose): New tests.
2018-11-26 02:04:04 +00:00
956dc3ed36
tests: add memfd_create test variants with different xlat verbosity levels
...
* tests/memfd_create-Xabbrev.c: New file.
* tests/memfd_create-Xraw.c: Likewise.
* tests/memfd_create-Xverbose.c: Likewise.
* tests/memfd_create.c: Add handling of XLAT_RAW and XLAT_VERBOSE flags.
* tests/pure_executables.list: Add memfd_create-Xabbrev, memfd_create-Xraw,
and memfd_create-Xverbose.
* tests/.gitignore: Likewise.
* tests/gen_tests.in (memfd_create-Xabbrev, memfd_create-Xraw,
memfd_create-Xverbose): New tests.
2018-11-26 02:04:04 +00:00
Rasmus Villemoes
2649c8c8b6
Add support for /dev/[u]random ioctls
...
* random_ioctl.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* defs.h (DECL_IOCTL): Add random.
* ioctl.c (ioctl_decode): Add 'R' case.
* xlat/random_ioctl_cmds.in: New file.
* tests/ioctl_random.c: New file.
* tests/.gitignore: Add ioctl_random.
* tests/pure_executables.list: Likewise.
* tests/gen_tests.in (ioctl_random): New entry.
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2018-11-05 17:40:36 +00:00
Elvira Khabirova
7a7f6c6a7c
Implement decoding of NBD_* ioctl commands
...
* nbd_ioctl.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* defs.h (DECL_IOCTL): Add nbd.
* ioctl.c (ioctl_decode): Add 0xab (nbd) case.
* xlat/nbd_ioctl_cmds.in: Likewise.
* xlat/nbd_ioctl_flags.in: Likewise.
* tests/ioctl_nbd.c: Likewise.
* tests/.gitignore: Add ioctl_nbd.
* tests/pure_executables.list: Likewise.
* tests/gen_tests.in (ioctl_nbd): New entry.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-10-25 20:50:32 +00:00
Eugene Syromyatnikov
f561173367
tests: add utimensat test variants with different xlat verbosity levels
...
* tests/utimensat-Xabbrev.c: New file.
* tests/utimensat-Xraw.c: Likewise.
* tests/utimensat-Xverbose.c: Likewise.
* tests/utimensat.c: Add handling of XLAT_RAW and XLAT_VERBOSE flags.
* tests/pure_executables.list: Add utimensat-Xabbrev, utimensat-Xraw,
and utimensat-Xverbose.
* tests/.gitignore: Likewise.
* tests/gen_tests.in (utimensat-Xabbrev, utimensat-Xraw, utimensat-Xverbose): New
tests.
2018-09-02 17:44:26 +00:00
Zhibin Li
e286b9cbc0
tests: check decoding of successful evdev ioctl
...
* tests/ioctl_evdev-success.c: New file.
* tests/ioctl_evdev-success-v.c: Likewise.
* tests/ioctl_evdev-success.test: New test.
* tests/ioctl_evdev-success-v.test: Likewise.
* tests/.gitignore: Add ioctl_evdev-success and ioctl_evdev-success-v.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add the two tests mentioned above.
2018-08-19 10:26:18 +00:00
Zhibin Li
49f45ff291
tests: check decoding of getsockopt(PACKET_STATISTICS)
...
* tests/net-tpacket_stats.c: New file.
* tests/net-tpacket_stats-success.c: Likewise.
* tests/gen_tests.in (net-tpacket_stats): New test.
* tests/net-tpacket_stats-success.test: Likewise.
* tests/.gitignore: Add net-tpacket_stats and net-tpacket_stats-success.
* tests/Makefile.am (check_PROGRAMS): Add net-tpacket_stats-success.
(DECODER_TESTS): Add net-tpacket_stats-success.test.
* tests/pure_executables.list: Add net-tpacket_stats.
2018-08-01 14:57:16 +00:00
Zhibin Li
7ecd1096bf
tests: check decoding of setsockopt(PACKET_[R|T]X_RING)
...
* tests/net-tpacket_req.c: New file.
* tests/.gitignore: Add net-tpacket_req.
* tests/pure_executables.list: Likewise.
* tests/gen_tests.in (net-tpacket_req): New test.
2018-08-01 14:57:16 +00:00
Zhibin Li
8f9a7721d5
tests: check decoding of setsockopt(PACKET_[ADD|DROP]_MEMBERSHIP)
...
* tests/net-packet_mreq.c: New file.
* tests/.gitignore: Add net-packet_mreq.
* tests/pure_executables.list: Likewise.
* tests/gen_tests.in (net-packet_mreq): New test.
2018-08-01 14:57:16 +00:00
c5c5b53d7f
tests: bring lists back to the sorted order
...
* tests/.gitignore: Make the list sorted again.
* tests/pure_executables.list: Likewise.
* tests/Makefile.am (check_PROGRAMS, DECODER_TESTS, MISC_TESTS):
Likewise.
2018-07-20 16:18:17 +00:00
Zhibin Li
1b5b5b76b5
tests: check decoding of successful quotactl
...
* tests/quotactl-success.c: New file.
* tests/quotactl-success-v.c: Likewise.
* tests/quotactl-xfs-success.c: Likewise.
* tests/quotactl-xfs-success-v.c: Likewise.
* tests/quotactl-success.test: New test.
* tests/quotactl-success-v.test: Likewise.
* tests/quotactl-xfs-success.test: Likewise.
* tests/quotactl-xfs-success-v.test: Likewise.
* tests/.gitignore: Add quotactl-success, quotactl-success-v,
quotactl-xfs-success and quotactl-xfs-success-v.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add four new tests listed above.
* tests/quotactl.h: [INJECT_RETVAL] (check_quota): Use errstr instead of
sprintrc; check that returned value is equivalent to the injected one;
append "(INJECTED)" string to errstr.
* tests/quotactl.c: Changed condition rc != 0 to rc < 0 in callback
functions and value of opaque pointer addr_cb_arg in order to check
successful injection.
* tests/quotactl-xfs.c: Likewise.
2018-07-20 16:18:17 +00:00
Masatake YAMATO
8ca67afef8
tests: check decoding of vcpu auxstr
...
* tests/ioctl_kvm_run_common.c: Rename from ioctl_kvm_run.c.
(run_kvm): Parametrize printing of KVM_RUN ioctl with print_KVM_RUN
invocation.
(main): Invoke optional KVM_NO_CPUID_CALLBACK macro when the old kernel
behavior is detected.
* tests/Makefile.am (EXTRA_DIST): Add ioctl_kvm_run_common.c.
* tests/ioctl_kvm_run.c: New file, a wrapper around
ioctl_kvm_run_common.c.
* ioctl_kvm_run_auxstr_vcpu.c: Likewise.
* tests/gen_tests.in (ioctl_kvm_run_auxstr_vcpu): New test.
* tests/pure_executables.list: Add ioctl_kvm_run_auxstr_vcpu.
* tests/.gitignore: Likewise.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-07-07 10:29:02 +00:00
Pierre Marsais
ba9d45c374
tests: check verbose decoding of kvm ioctl
...
* tests/ioctl_kvm_run-v.c: New file.
* tests/ioctl_kvm_run.c: Include xlat.h and xlat/kvm_cpuid_flags.h.
(print_kvm_segment, print_kvm_sregs, print_kvm_regs): New functions.
(run_kvm): Use them.
(print_cpuid_ioctl) [VERBOSE]: Print verbose ioctl decoding.
* tests/gen_tests.in (ioctl_kvm_run-v): New entry.
* tests/pure_executables.list: Add ioctl_kvm_run-v.
* tests/.gitignore: Likewise.
Signed-off-by: Pierre Marsais <pierre.marsais@lse.epita.fr>
2018-07-07 10:29:02 +00:00
Eugene Syromyatnikov
2cc81216cb
tests: check decoding of io_pgetevents syscall
...
* configure.ac (AC_CHECK_TYPES): Check for struct __aio_sigset
in <linux/aio_abi.h>.
* tests/aio_pgetevents.c: New file.
* tests/.gitignore: Add aio_pgetevents.
* tests/pure_executables.list: Likewise.
* tests/gen_tests.in (aio_pgetevents): New test.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-06-13 16:18:38 +00:00
Eugene Syromyatnikov
d2aa5046e9
tests: check decoding of IFLA_LINKINFO netlink attribute
...
* tests/nlattr_ifla_linkinfo.c: New file.
* tests/pure_executables.list: Add nlattr_ifla_linkinfo.
* tests/.gitignore: Likewise.
* tests/gen_tests.in (nlattr_ifla_linkinfo): New test.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-06-11 14:02:06 +00:00
Eugene Syromyatnikov
4f652c1ec4
tests: check decoding of IFLA_AF_SPEC netlink attribute
...
* configure.ac (AC_CHECK_TYPES): Check for struct ifla_cacheinfo in
<linux/rtnetlink.h>
(AC_CHECK_DECLS): Check for IFLA_AF_SPEC in <linux/rtnetlink.h>.
* tests/nlattr_ifla_af_spec.c: New file.
* tests/pure_executables.list: Add nlattr_ifla_af_spec.
* tests/.gitignore: Likewise.
* tests/gen_tests.in (nlattr_ifla_af_spec): New test.
2018-06-06 15:10:37 +00:00
Eugene Syromyatnikov
93ef3d32ab
tests: check BPF_OBJ_GET_INFO_BY_FD decoding
...
* tests/bpf-obj_get_info_by_fd-prog-v.c: New file.
* tests/bpf-obj_get_info_by_fd-prog.c: Likewise.
* tests/bpf-obj_get_info_by_fd-v.c: Likewise.
* tests/bpf-obj_get_info_by_fd.c: Likewise.
* configure.ac (AC_CHECK_HEADERS): Check for struct bpf_insn,
struct bpf_map_info, and struct bpf_prog_info.
* tests/pure_executables.list: Add bpf-obj_get_info_by_fd,
bpf-obj_get_info_by_fd-v, bpf-obj_get_info_by_fd-prog, and
bpf-obj_get_info_by_fd-prog-v.
* tests/.gitignore: Likewise.
* tests/gen_tests.in (bpf-obj_get_info_by_fd,
bpf-obj_get_info_by_fd-v, bpf-obj_get_info_by_fd-prog,
bpf-obj_get_info_by_fd-prog-v): New tests.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-06-04 01:11:05 +00:00
Eugene Syromyatnikov
ee96027445
tests: add union bpf_attr.query.prog_ids field decoding checks
...
* tests/bpf-success-v.c: New file.
* tests/bpf-success.c: Likewise.
* tests/bpf-success-v.test: New test.
* tests/bpf-success.test: Likewise.
* tests/.gitignore: Add bpf-success and bpf-success-v.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add bpf-success.test and bpf-success-v.test.
* tests/bpf.c [INJECT_RETVAL] (sys_bpf): Check that retuned value
is equivalent to the injected one; append "(INJECTED)" string to errstr.
(prog_load_ids, prog_load_ids_ptr): New variables.
(init_BPF_PROG_QUERY_attr4, print_BPF_PROG_QUERY_attr4,
init_BPF_PROG_QUERY_attr5, print_BPF_PROG_QUERY_attr5): New functions.
(BPF_PROG_QUERY_checks): Drop "const" qualifier, add new checks.
2018-05-28 17:34:50 +00:00
Eugene Syromyatnikov
bd19a4d271
tests: check decoding of successful PERF_EVENT_IOC_{ID,QUERY_BPF} ioctls
...
As these have some argument output on the exit path.
* tests/ioctl_perf-success.c: New file.
* tests/ioctl_perf-success.test: New test.
* tests/Makefile.am (DECODER_TESTS): Add it.
(check_PROGRAMS): Add ioctl_perf-success.
* tests/.gitignore: Likewise.
* tests/ioctl_perf.c: Remove TODO.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-05-28 17:34:50 +00:00
Eugene Syromyatnikov
7adb5a2f9e
Implement PERF_EVENT_IOC_* decoding
...
* perf.c (fetch_perf_event_attr, print_perf_event_attr): Remove "static"
qualifier.
* defs.h (fetch_perf_event_attr, print_perf_event_attr): New
declarations.
* perf_event_struct.h (struct perf_event_query_bpf): New type
definition.
* perf_ioctl.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* xlat/perf_ioctl_cmds.in: New file.
* xlat/perf_ioctl_flags.in: Likewise.
* ioctl.c (ioctl_decode) <case '$'>: Call perf_ioctl.
* tests/gen_tests.in (ioctl_perf): New test.
* tests/ioctl_perf.c: New file.
* tests/pure_executables.list: ioctl_perf.
* tests/.gitignore: Likewise.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-05-28 17:34:50 +00:00
Eugene Syromyatnikov
be0d6a847b
prctl: add PR_GET_SPECULATION_CTRL/PR_SET_SPECULATION_CTRL decoding
...
* xlat/pr_spec_cmds.in: New fille.
* xlat/pr_spec_get_store_bypass_flags.in: Likewise.
* xlat/pr_spec_set_store_bypass_flags.in: Likewise.
* xlat/prctl_options.in (PR_GET_SPECULATION_CTRL,
PR_SET_SPECULATION_CTRL): New constants, introduced by Linux commit
v4.17-rc3-15-gb617cfc.
* prctl.c (SYS_FUNC(prctl)) <case PR_GET_SPECULATION_CTRL,
case PR_SET_SPECULATION_CTRL>: Implement decoding of new prctl options.
* tests/Makefile.am (check_PROGRAMS): Add prctl-spec-inject.
(DECODER_TESTS): Add prctl-spec-inject.test.
* tests/prctl-spec-inject.c: New file.
* tests/prctl-spec-inject.test: New test.
* tests/.gitignore: Add prctl-spec-inject.
2018-05-25 09:15:03 +00:00
Eugene Syromyatnikov
42c9ff9cfe
tests: add keyctl variants with different xlat verbosity levels
...
* tests/keyctl-Xabbrev.c: New file.
* tests/keyctl-Xraw.c: Likewise.
* tests/keyctl-Xverbose.c: Likewise.
* tests/keyctl.c (XARG_STR): New macro.
(do_keyctl): Print command in accordance with XLAT_RAW/XLAT_VERBOSE settings.
(main): Update expected output.
* tests/pure_executables.list: Add keyctl-Xabbrev, keyctl-Xraw,
and keyctl-Xverbose.
* tests/.gitignore: Likewise.
* tests/gen_tests.in (keyctl-Xabbrev, keyctl-Xraw, keyctl-Xverbose): New
tests.
2018-05-25 09:15:03 +00:00
Eugene Syromyatnikov
07a4f1954a
ioctl: implement INOTIFY_IOC_SETNEXTWD decoding
...
* inotify_ioctl.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* defs.h (DECL_IOCTL(inotify)): New declaration.
* ioctl.c (ioctl_decode) <case 'I'>: Call inotify_ioctl.
* tests/ioctl_inotify.c: New file.
* tests/.gitignore: Add ioctl_inotify.
* tests/pure_executables.list: Likewise.
* tests/gen_tests.in (ioctl_inotify): New test.
2018-05-25 09:15:03 +00:00
Eugene Syromyatnikov
b537ddc752
tests: add sock_filtrer-v variants with different xlat verbosity levels
...
* tests/sock_filter-v-Xabbrev.c: New file.
* tests/sock_filter-v-Xraw.c: Likewise.
* tests/sock_filter-v-Xverbose.c: Likewise.
* tests/sock_filter-v.c (PRINT_STMT_SYM, PRINT_STMT_SYM_,
PRINT_STMT_VAL, PRINT_STMT_VAL_, PRINT_JUMP_): Remove.
(HEX_FMT, XLAT_FMT, XLAT_ARGS, PRINT_STMT): New macros.
(PRINT_JUMP): Rewrite.
(print_filter): Rewrite using PRINT_STMT and new PRINT_JUMP.
(main): Print SOL_SOCKET, SO_ATTACH_FILTER, and SO_ATTACH_REUSEPORT_CBPF
using XLAT_FMT/XLAT_ARGS macros.
* tests/pure_executables.list: Add sock_filter-v-Xabbrev,
sock_filter-v-Xraw, and sock_filter-v-Xverbose.
* tests/.gitignore: Likewise.
* tests/gen_tests.in (sock_filter-v-Xabbrev, sock_filter-v-Xraw,
sock_filter-v-Xverbose): New tests.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-05-09 12:44:28 +00:00
Eugene Syromyatnikov
3435de54af
tests: add so_peercred variants with different xlat verbosity levels
...
* tests/so_peercred-Xabbrev.c: New file.
* tests/so_peercred-Xraw.c: Likewise.
* tests/so_peercred-Xverbose.c: Likewise.
* tests/pure_executables.list: Add so_peercred-Xabbrev,
so_peercred-Xraw, and so_peercred-Xverbose.
* tests/.gitignore: Likewise.
* tests/so_peercred.c: Add handling of XLAT_RAW and XLAT_VERBOSE flags.
* tests/gen_tests.in (so_peercred-Xabbrev, so_peercred-Xraw,
so_peercred-Xverbose): New tests.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-05-08 14:25:27 +00:00
Eugene Syromyatnikov
034b10936c
tests: add personality variants with different xlat verbosity levels
...
* tests/personality-Xabbrev.c: New file.
* tests/personality-Xraw.c: Likewise.
* tests/personality-Xverbose.c: Likewise.
* tests/pure_executables.list: Add personality-Xabbrev,
personality-Xraw, and personality-Xverbose.
* tests/.gitignore: Likewise.
* tests/personality.c: Add handling of XLAT_RAW and XLAT_VERBOSE flags.
* tests/personality.test: Add support for accepting test arguments.
* tests/gen_tests.in (personality-Xabbrev, personality-Xraw,
personality-Xverbose): New tests.
2018-05-08 13:42:45 +00:00
Eugene Syromyatnikov
5ece159986
tests: add fanotify_mark variants with different xlat verbosity levels
...
* tests/fanotify_mark-Xabbrev.c: New file.
* tests/fanotify_mark-Xraw.c: Likewise.
* tests/fanotify_mark-Xverbose.c: Likewise.
* tests/pure_executables.list: Add fanotify_mark-Xabbev,
fanotify_mark-Xraw, and fanotify_mark-Xverbose.
* tests/.gitignore: Likewise.
* tests/fanotify_mark.c: Add handling of XLAT_RAW and XLAT_VERBOSE
flags.
* tests/gen_tests.in (fanotify_mark-Xabbev, fanotify_mark-Xraw,
fanotify_mark-Xverbose): New tests.
2018-05-08 13:39:50 +00:00
Eugene Syromyatnikov
429d45bcab
tests: add variants of IPC tests with different xlat verbosity levels
...
* tests/.gitignore: Add ipc_msg-Xabbrev, ipc_msg-Xraw, ipc_msg-Xverbose,
ipc_msgbuf-Xabbrev, ipc_msgbuf-Xraw, ipc_msgbuf-Xverbose,
ipc_sem-Xabbrev, ipc_sem-Xraw, ipc_sem-Xverbose, ipc_shm-Xabbrev,
ipc_shm-Xraw, and ipc_shm-Xverbose.
* tests/pure_executables.list: Likewise.
* tests/gen_tests.in (ipc_msg-Xabbrev, ipc_msg-Xraw, ipc_msg-Xverbose,
ipc_msgbuf-Xabbrev, ipc_msgbuf-Xraw, ipc_msgbuf-Xverbose,
ipc_sem-Xabbrev, ipc_sem-Xraw, ipc_sem-Xverbose, ipc_shm-Xabbrev,
ipc_shm-Xraw, ipc_shm-Xverbose): New tests.
* tests/ipc_msg-Xabbrev.c: New file.
* tests/ipc_msg-Xraw.c: Likewise.
* tests/ipc_msg-Xverbose.c: Likewise.
* tests/ipc_msgbuf-Xabbrev.c: Likewise.
* tests/ipc_msgbuf-Xraw.c: Likewise.
* tests/ipc_msgbuf-Xverbose.c: Likewise.
* tests/ipc_sem-Xabbrev.c: Likewise.
* tests/ipc_sem-Xraw.c: Likewise.
* tests/ipc_sem-Xverbose.c: Likewise.
* tests/ipc_shm-Xabbrev.c: Likewise.
* tests/ipc_shm-Xraw.c: Likewise.
* tests/ipc_shm-Xverbose.c: Likewise.
* tests/ipc.sh: Add support for accepting test arguments.
* tests/ipc_msgbuf.test: Likewise.
* tests/ipc_msg.c: Add handling of XLAT_RAW and XLAT_VERBOSE flags.
* tests/ipc_msgbuf.c: Likewise.
* tests/ipc_sem.c: Likewise.
* tests/ipc_shm.c: Likewise.
2018-05-07 10:52:16 +00:00
Eugene Syromyatnikov
1f357a8f1a
tests: add mount variants with different xlat verbosity levels
...
* tests/mount-Xabbrev.c: New file.
* tests/mount-Xraw.c: Likewise.
* tests/mount-Xverbose.c: Likewise.
* tests/mount.c: Add handling of XLAT_RAW and XLAT_VERBOSE macros.
* tests/pure_executables.list: Add mount-Xabbrev, mount-Xraw,
and mount-Xverbose.
* tests/.gitignore: Likewise.
* tests/gen_tests.in (mount-Xabbrev, mount-Xraw, mount-Xverbose): New
tests.
2018-04-28 20:48:52 +00:00
Eugene Syromyatnikov
42f1ccc867
tests: add old_mmap variants with different xlat verbosity levels
...
* tests/old_mmap-Xabbrev.c: New file.
* tests/old_mmap-Xraw.c: Likewise.
* tests/old_mmap-Xverbose.c: Likewise.
* tests/old_mmap.c (main): Add handling of XLAT_RAW and XLAT_VERBOSE
macros.
* tests/pure_executables.list: Add old_mmap-Xabbrev, old_mmap-Xraw,
and old_mmap-Xverbose.
* tests/.gitignore: Likewise.
* tests/gen_tests.in (old_mmap-Xabbrev, old_mmap-Xraw,
old_mmap-Xverbose): New tests.
2018-04-28 20:48:52 +00:00
Eugene Syromyatnikov
417ec2479d
tests: add mmap/mmap64 variants different xlat verbosity levels
...
* tests/tests.h [!XLAT_RAW] (XLAT_RAW): Define.
[!XLAT_VERBOSE] (XLAT_VERBOSE): Likewise.
* tests/mmap-Xabbrev.c: New file.
* tests/mmap-Xraw.c: Likewise.
* tests/mmap-Xverbose.c: Likewise.
* tests/mmap64-Xabbrev.c: Likewise.
* tests/mmap64-Xraw.c: Likewise.
* tests/mmap64-Xverbose.c: Likewise.
* tests/mmap.c (main): Add handling of XLAT_RAW and XLAT_VERBOSE macros.
* tests/mmap.test: Add handling of optional test arguments that set
alignment and xlat verbosity options.
* tests/Makefile.am (mmap64_Xabbrev_CPPFLAGS, mmap64_Xraw_CPPFLAGS,
mmap64_Xverbose_CPPFLAGS): New variables, analogous to mmap64_CPPFLAGS.
* tests/pure_executables.list: Add mmap-Xabbrev, mmap-Xraw,
mmap-Xverbose, mmap64-Xabbrev, mmap64-Xraw, and mmap64-Xverbose.
* tests/.gitignore: Likewise.
* tests/gen_tests.in (mmap-Xabbrev, mmap-Xraw, mmap-Xverbose,
mmap64-Xabbrev, mmap64-Xraw, mmap64-Xverbose): New tests.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-04-28 20:48:52 +00:00
Harsha Sharma
d94871775a
tests: check basic decoding of PTP_* ioctl commands
...
* tests/ioctl_ptp.c: New file.
* tests/gen_tests.in (ioctl_ptp): New entry.
* tests/pure_executables.list: Add ioctl_ptp.
* tests/.gitignore: Likewise.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-04-11 15:41:40 +00:00
Eugene Syromyatnikov
a02a583b3f
strace: handle possible NULL from localtime() call
...
* strace.c (printleader): Print raw tv_sec value if localtime() returned
NULL.
* tests/localtime.c: New file.
* tests/localtime.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add localtime.
(MISC_TESTS): Add localtime.test.
(localtime_LDADD): New variable.
* tests/.gitignore: Add localtime.
* ci/install-dependencies.sh (common_packages): Add faketime.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
Closes: https://github.com/strace/strace/issues/42
2018-04-04 20:32:42 +00:00
Eugene Syromyatnikov
6f8bbc6fef
tests: check decoding of kern_features syscall
...
* tests/kern_features.c: New file.
* tests/kern_features-fault.test: New test.
* tests/gen_tests.in (kern_features): New entry.
* tests/Makefile.am (DECODER_TESTS): Add kern_features-fault.test.
* tests/pure_executables.list: Add kern_features.
* tests/.gitignore: Likewise.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-03-27 22:22:23 +00:00
Eugene Syromyatnikov
58598cd7f6
tests: check injection of return values into a "never fails" syscall
...
* tests/inject-nf.c: New file.
* tests/inject-nf.test: New test.
* tests/.gitignore: Add inject-nf.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(MISC_TESTS): Add inject-nf.test.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-03-23 13:43:13 +00:00
Elvira Khabirova
a3bef655cb
tests: check delay injection
...
* tests/delay.c: New file.
* tests/delay.test: New test.
* tests/.gitignore: Add delay.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(delay_LDADD): New variable.
(MISC_TESTS): Add delay.test.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-03-22 06:23:25 +00:00
Eugene Syromyatnikov
08b4355d9c
tests: check printing of block/char device numbers in -yy mode
...
* tests/dev-yy.c: New file.
* tests/pure_executables.list: Add dev-yy.
* tests/.gitignore: Likewise.
* tests/gen_tests.in (dev-yy): New test.
2018-03-01 01:00:24 +00:00
Eugene Syromyatnikov
e196eebea4
tests: check file name printing in strace -y mode
...
* tests/fsync-y.c: New file.
* tests/.gitignore: Add fsync-y.
* tests/Makefile.am (check_PROGRAMS): Likewise.
* tests/gen_tests.in (fsync-y): New test.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-03-01 01:00:24 +00:00
Eugene Syromyatnikov
d2f152e969
tests: check decoding of ip6:port pairs associated with socket descriptors
...
* tests/net-yy-inet.c: Generalise test.
* tests/net-yy-inet6.c: New file.
* tests/pure_executables.list: Add net-yy-inet6.
* tests/.gitignore: Likewise.
* tests/gen_tests.in (net-yy-inet6): New entry.
2018-02-27 00:17:47 +00:00
Eugene Syromyatnikov
e470a92d38
tests: check s390_pci_mmio_read and s390_pci_mmio_write decoders
...
* tests/s390_pci_mmio_read_write.c: New file.
* tests/.gitignore: Add s390_pci_mmio_read_write.
* tests/pure_executables.list: Likewise.
* tests/gen_tests.in (s390_pci_mmio_read_write): New test.
2018-01-29 14:12:50 +01:00
Eugene Syromyatnikov
9d35c59421
tests: check s390_runtime_instr system call decoder
...
* tests/s390_runtime_instr.c: New file.
* tests/.gitignore: Add s390_runtime_instr.
* tests/pure_executables.list: Likewise.
* tests/gen_tests.in (s390_runtime_instr): New test.
2018-01-29 14:10:10 +01:00
Eugene Syromyatnikov
52970d343b
tests: check s390_guarded_storage system call decoder
...
* configure.ac (AC_CHECK_HEADERS): Add asm/guarded_storage.h.
* tests/s390_guarded_storage-v.c: New file.
* tests/s390_guarded_storage.c: Likewise.
* tests/.gitignore: Add s390_guarded_storage, s390_guarded_storage-v.
* tests/pure_executables.list: Likewise.
* tests/gen_tests.in (s390_guarded_storage, s390_guarded_storage-v):
New tests.
2018-01-29 14:10:10 +01:00
Eugene Syromyatnikov
9437d47366
tests: check s390_sthyi system call decoder
...
* configure.ac (AC_CHECK_FUNCS): Add iconv_open.
(AC_CHECK_HEADERS): Add iconv.h.
* tests/s390_sthyi-v.c: New file.
* tests/s390_sthyi.c: Likewise.
* tests/.gitignore: Add s390_sthyi, s390_sthyi-v.
* tests/pure_executables.list: Likewise.
* tests/gen_tests.in (s390_sthyi, s390_sthyi): New tests.
2018-01-29 14:10:10 +01:00
Eugene Syromyatnikov
13f0c7a955
tests: check riscv_flush_icache syscall decoder
...
* tests/riscv_flush_icache.c: New file.
* tests/.gitignore: Add riscv_flush_icache.
* tests/gen_tests.in: Likewise.
* tests/pure_executables.list: Likewise.
2018-01-25 01:55:08 +00:00