Commit Graph

4 Commits

Author SHA1 Message Date
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
c446d22fc6 tests: cleanup temporary files removals
As every test now runs in its own subdirectory, there is no need
to remove leftover files manually by each test.

* tests/init.sh (run_strace_match_diff): Do not remove $EXP.
* tests/brk.test: Likewise.
* tests/options-syntax.test: Likewise.
* tests/qual_inject-retval.test (check_injection): Likewise.
* tests/qual_signal.test (test_one_sig): Likewise.
* tests/sched.test: Likewise.
* tests/seccomp-strict.test: Likewise.
* tests/strace-V.test: Likewise.
* tests/strace-tt.test: Likewise.
* tests/strace-ttt.test: Likewise.
* tests/threads-execve.test: Likewise.
* tests/attach-f-p.test: Use $EXP instead of $OUT, do not remove it.
* tests/personality.test: Likewise.
* tests/poll.test: Likewise.
* tests/fstat.test: Likewise.
* tests/ipc.sh: Likewise.
* tests/restart_syscall.test: Likewise.
* tests/utimensat.test: Likewise.
* tests/attach-p-cmd.test: Likewise.  Do not remove
attach-p-cmd.test-lock.
* tests/detach-running.test: Do not remove $LOG.
* tests/detach-sleeping.test: Likewise.
* tests/detach-stopped.test: Likewise.
* tests/redirect.test: Do not remove $OUT.
* tests/strace-S.test: Likewise.
* tests/getdents.test: Do not remove $LOG.dir.
* tests/getdents64.test: Likewise.
* tests/readdir.test: Likewise.
* tests/btrfs-v.test: Do not remove $EXP and $OUT.
* tests/btrfs-vw.test: Likewise.
* tests/btrfs-w.test: Likewise.
* tests/execve-v.test: Likewise.
* tests/execve.test: Likewise.
* tests/fadvise64.test: Likewise.
* tests/getuid.test: Likewise.
* tests/ioctl.test: Likewise.
* tests/ioctl_dm-v.test: Likewise.
* tests/ioctl_dm.test: Likewise.
* tests/ioctl_evdev-v.test: Likewise.
* tests/ioctl_loop-nv.test: Likewise.
* tests/ioctl_loop-v.test: Likewise.
* tests/ioctl_loop.test: Likewise.
* tests/ioctl_rtc-v.test: Likewise.
* tests/ioctl_sock_gifconf.test: Likewise.
* tests/llseek.test: Likewise.
* tests/lseek.test: Likewise.
* tests/mmap.test: Likewise.
* tests/net-y-unix.test: Likewise.
* tests/net-yy-inet.test: Likewise.
* tests/net-yy-netlink.test: Likewise.
* tests/net-yy-unix.test: Likewise.
* tests/opipe.test: Likewise.
* tests/prctl-arg2-intptr.test: Likewise.
* tests/prctl-dumpable.test: Likewise.
* tests/prctl-name.test: Likewise.
* tests/prctl-no-args.test: Likewise.
* tests/prctl-pdeathsig.test: Likewise.
* tests/prctl-seccomp-filter-v.test: Likewise.
* tests/prctl-seccomp-strict.test: Likewise.
* tests/prctl-securebits.test: Likewise.
* tests/prctl-tid_address.test: Likewise.
* tests/prctl-tsc.test: Likewise.
* tests/umovestr2.test: Likewise.
* tests/uname.test: Likewise.
* tests/pread64-pwrite64.test: Do nore remove pread64-pwrite64-tmpfile.
* tests/read-write.test: Do nore remove read-write-tmpfile.
* tests/qual_fault.test (check_fault_injection): Do not remove $EXP,
$outexp, and $outgot.
* tests/redirect-fds.test (check_fd): Reorder removal of work files.
* tests/pc.test: Use $EXP instead of $EXPECTED, do not remove it.
* tests/strace-t.test: Likewise.
* tests/scm_rights-fd.test: Likewise.  Use dir instead of $LOG.dir,
do not remove it.
* tests/strace-ff.test: Do not remove $OUT and $LOG.* files.
2017-04-03 16:24:28 +00:00
2e8a7871ab tests: move definitions of $OUT and $ERR to init.sh
As virtually every test defines either one or both of OUT and ERR
variables and these definitions are exactly the same, move definitions
of these variables from individual tests to init.sh.

* tests/init.sh (OUT, ERR): New variables.
* tests/ipc.sh: Remove initialization of OUT variable.
* tests/statx.sh: Likewise.
* tests/*.test: Remove initialization of OUT and ERR variables.
2016-03-30 00:13:37 +00:00
8f54664d68 tests: factor out common shell code to functions
Factor out shell code used in several tests to common functions.

* tests/fanotify_mark.expected: New file.
* tests/ioctl.expected: New file.
* tests/net-fd.expected: New file.
* tests/net.expected: New file.
* tests/statfs.expected: New file.
* tests/sun_path.expected: New file.
* tests/uio.expected: New file.
* tests/ipc.sh: New file.
* tests/Makefile.am (EXTRA_DIST): Add them.
* tests/init.sh (dump_log_and_fail_with, run_prog,
run_prog_skip_if_failed, run_strace, run_strace_merge,
match_awk, match_diff, match_grep): New functions.
* tests/*.test: Use them.
2015-03-18 02:29:36 +00:00