1877 Commits

Author SHA1 Message Date
78460f8bb2 tests: ensure that strace can detach from running processes
* tests/detach-running: New test.
* tests/Makefile.am (TESTS): Add it.
2013-06-19 10:22:18 +00:00
223e9a6f85 tests: ensure that strace does not leave sleeping processes stopped
* tests/detach-sleeping: Do not send SIGCONT to the sleeping process.
2013-06-19 01:05:30 +00:00
3cb7a0cd00 tests: fix parallel-tests support in detach-* tests
* tests/detach-sleeping: Use $LOG file for set_ptracer_any output.
* tests/detach-stopped: Likewise.
2013-06-18 22:37:08 +00:00
1e0a28063f tests: parametrize "sleep 1"
* tests/init.sh (SLEEP_A_BIT): New variable.
* tests/detach-sleeping: Use it.
* tests/detach-stopped: Likewise.
2013-06-18 20:51:49 +00:00
97c85088a2 tests: ensure that strace can detach from sleeping and stopped processes
* tests/set_ptracer_any.c: New file.
* tests/detach-sleeping: New test.
* tests/detach-stopped: Likewise.
* tests/Makefile.am (check_PROGRAMS): Add set_ptracer_any.
(TESTS): Add detach-sleeping and detach-stopped.
* tests/.gitignore: Add set_ptracer_any.
2013-06-18 17:07:48 +00:00
f60347d857 tests: enhance timeout checks
Run each test using a wrapper that does all necessary timeout checks.

* tests/run.sh: New file.
* tests/Makefile.am (EXTRA_DIST, LOG_COMPILER): Add it.
* tests/init.sh (check_strace, check_timeout): Remove.
* tests/detach-stopped: Update callers.
* tests/net: Likewise.
* tests/ptrace_setoptions: Likewise.
* tests/qual_syscall: Likewise.
* tests/stat: Likewise.
* tests/strace-f: Likewise.
2013-06-18 17:07:37 +00:00
107ceb935f tests: prepare for parallel-tests support
* tests/Makefile.am (CLEANFILES): Calculate dynamically from TESTS.
* tests/init.sh (LOG): New variable.
* tests/detach-stopped: Use it.
* tests/net: Likewise.
* tests/qual_syscall: Likewise.
* tests/stat: Likewise.
* tests/strace-f: Likewise.
2013-06-18 16:58:02 +00:00
56ef5ef90f tests/net: fix portability issues
* tests/net-accept-connect.c: Fix address length passed to bind()
and connect().
* tests/net: Update regexps.
2013-05-08 14:03:38 +00:00
47b0dcca2b tests: add a test for basic network syscalls
* tests/.gitignore: Add net-accept-connect, *.o and *.log.*.
* tests/Makefile.am (AM_CFLAGS): New variable.
(check_PROGRAMS): Add net-accept-connect.
(TESTS): Add net.
* tests/net-accept-connect.c: New file.
* tests/net: New file.
2013-05-08 02:06:39 +00:00
56fb81c696 tests: do not skip tests when timeout utility is not available
* tests/init.sh (check_timeout): New function.
* tests/ptrace_setoptions: Use it.
* tests/qual_syscall: Likewise.
* tests/stat: Likewise.
* tests/strace-f: Likewise.
2013-05-08 01:54:32 +00:00
53f6795d75 tests/stat: enhance regexps
* tests/stat: Enhance regexps that check tracing of stat/stat64 and
fstatat/fstatat64 syscalls.
2013-05-06 19:15:09 +00:00
Chris Metcalf
6f11acd360 tests/stat: support fstatat syscall for stat()
Newer Linux architectures don't support the stat/stat64 syscalls.
Instead they use fstatat() with AT_FDCWD and an extra flags argument.
Support seeing this output in the 'strace -efile' test.

As part of this change, use "grep -E -x" syntax consistently for
all stat tests, since the number of \(foo\)\? expressions was becoming
pretty unwieldy.

* tests/stat: Update stat/stat64 check regexp to handle architectures
that use fstatat instead.  Use "grep -E -x" syntax consistently.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2013-05-06 18:47:50 +00:00
Mike Frysinger
1970da0aa8 tests: stat: fix clean up of sample file
* tests/stat: Also rm the sample file at the end of the test.
2013-05-02 22:06:44 +00:00
Mike Frysinger
d26d011078 Ignore more files
* .gitignore: Add gdb related files.
* tests/.gitignore: Ignore test logs.
2013-05-02 22:06:12 +00:00
318b0dde76 tests: add basic test for ftruncate, lseek and stat family syscalls
* tests/stat: New test.
* tests/Makefile.am (TESTS): Add stat.
2013-05-02 00:44:57 +00:00
Maxin B. John
066a733bc0 tests: relax check_prog to allow timeout command provided by busybox
Busybox version of timeout doesn't have --version option.
Relax check_prog to handle those cases.

* tests/init.sh (check_prog): Use type builtin to check program
availability.

Signed-off-by: Maxin B. John <maxin.john@enea.com>
2013-03-18 22:17:41 +00:00
7b9e45e891 Fix trace=set regression introduced by commit v4.7-111-g9cbc15b
* syscall.c (qual_syscall, qualify): Pass personality down to
qualify_one.
* tests/qual_syscall: New test.
* tests/Makefile.am (TESTS): Add qual_syscall.
2013-03-01 16:22:02 +00:00
823eba28cd tests: raise strace check timeout to 60 seconds
* tests/init.sh (check_timeout): New variable.
* tests/ptrace_setoptions: Use it.
* tests/strace-f: Likewise.

Reported-by: Mike Frysinger <vapier@gentoo.org>
2012-05-01 21:32:09 +00:00
84abf70011 tests: robustify again buggy shells
* tests/init.sh (check_strace): Use "${parameter:-word}" shell syntax
instead of "${parameter-word}".

Reported-by: Mike Frysinger <vapier@gentoo.org>
2012-03-15 20:17:49 +00:00
d1d182209e tests: finish ptrace_setoptions_* merge
* tests/Makefile.am (TESTS): Merge ptrace_setoptions_*.
* tests/ptrace_setoptions: Check for Linux kernel > 2.6.
2011-06-21 15:03:17 +00:00
Denys Vlasenko
8f0f14b6da Fix tests/ptrace_setoptions_* to match last fix in ptrace options code
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-21 15:55:07 +02:00
2ea2ab0590 Add test for PTRACE_O_TRACESYSGOOD
* tests/ptrace_setoptions_for_all: New file.
* tests/Makefile.am (TESTS): Add ptrace_setoptions_for_all.
2011-06-09 18:28:02 +00:00
30ecdcc121 tests: update test for linux kernel version
* tests/ptrace_setoptions_followfork: Check for Linux kernel > 2.6.
2011-06-09 18:23:09 +00:00
e254e53d8c Update ptrace_setoptions test
The test have to be adjusted after commit v4.6-5-g3454e4b.

* ptrace_setoptions: Update grep pattern, rename to
ptrace_setoptions_followfork.
* tests/Makefile.am (TESTS): Rename ptrace_setoptions to
ptrace_setoptions_followfork.
2011-06-09 16:10:07 +00:00
f9a84ef39f tests: avoid SIGPIPE
* tests/ptrace_setoptions: Replace "grep -q" with "grep > /dev/null".
The former may result to strace being killed by SIGPIPE, which in
certain configuratons may lead to generation of a core file.
Suggested by Mike Frysinger.
2011-03-03 00:10:20 +00:00
Mike Frysinger
e689e04c10 tests: do not make missing /usr/bin/time a failure
* tests/init.sh (framework_skip_): New function.
(check_prog): Use it instead of framework_failure_.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-03-01 00:54:06 +00:00
4e4b5adfab Implement two basic "strace -f" tests
* Makefile.am (SUBDIRS): Add tests.
* configure.ac (AC_CONFIG_FILES): Add tests/Makefile.
* tests/.gitignore: New file.
* tests/Makefile.am: Likewise.
* tests/init.sh: Likewise.
* tests/ptrace_setoptions: Likewise.
* tests/strace-f: Likewise.
2011-02-27 00:28:50 +00:00