Commit Graph

8 Commits

Author SHA1 Message Date
38a34c9349 Add copyright headers to some files which lack them
Before this change, all files that exist since 20th century had
copyright headers, while most files that appeared later didn't.  This
change fixes the inconsistency by adding missing copyright headers.

It doesn't mean that copyright headers became maintained.  In my view,
git history provides much better information on this subject and is much
more accurate than copyright headers.
2015-12-17 17:56:48 +00:00
6c8ef051f7 Consistently use error_msg instead of fprintf(stderr)
* linux/alpha/get_scno.c: Use error_msg.
* linux/arm/get_scno.c: Likewise.
* linux/mips/get_scno.c: Likewise.
* linux/sh/get_scno.c: Likewise.
* linux/x86_64/get_scno.c: Likewise.
* exit.c (sys_exit): Likewise.
* pathtrace.c (pathtrace_select, pathtrace_match): Likewise.
* strace.c (alloctcb, droptcb, detach, startup_attach,
test_ptrace_seize, init, cleanup, print_debug_info,
maybe_allocate_tcb, startup_tcb, trace): Likewise.
* syscall.c (update_personality, trace_syscall_exiting,
get_scno): Likewise.
* unwind.c (DPRINTF): Likewise.
* tests/bexecve.test: Update patterns.
* tests/detach-stopped.test: Likewise.
2015-05-25 23:31:31 +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
74697bd29b tests: skip detach tests if kill does not work
* tests/detach-running.test: Skip if "kill -0" does not work.
* tests/detach-sleeping.test: Likewise.
* tests/detach-stopped.test: Likewise.
2015-01-14 08:10:59 +00:00
3ec5c0492c tests: cleanup checks for basic programs
* tests/init.sh: Check for cat and rm.
* tests/getdents.test: Check for awk.
* tests/ptrace_setoptions.test: Check for grep.
* tests/net-fd.test: Do not check for rm.
* tests/net.test: Likewise.
* tests/scm_rights-fd.test: Likewise.
* tests/stat.test: Likewise.
* tests/uio.test: Likewise.
2014-09-23 01:51:05 +00:00
e55264e012 tests: skip detach-stopped.test when PTRACE_SEIZE doesn't work
detach-stopped.test is known to fail when PTRACE_SEIZE is not available,
so skip the test in that case.

* tests/detach-stopped.test: Check for "strace -d" output and skip the
test when it says that PTRACE_SEIZE doesn't work.
2014-08-12 01:09:28 +00:00
Mike Frysinger
2b5bfeb2a8 tests: fix shell errors in detach tests
The current detach test code does:
	set -e
	...
	cleanup() {
		set +e
		kill ...
		wait ...
	}
	...
	cleanup
	exit 0

The problem is that while `set -e` is disabled for the body of the
cleanup function, it isn't necessarily disabled in the caller scope.
So if the return value of the cleanup function (`wait` in this case)
is non-zero, the script ends up failing overall.

Add an explicit return 0 to the cleanup function so that we don't kill
the overall test pipeline.

* tests/detach-running.test (cleanup): Add return 0.
* tests/detach-sleeping.test (cleanup): Likewise.
* tests/detach-stopped.test (cleanup): Likewise.
2014-08-11 17:22:38 +00:00
123d401508 tests: rename all tests so that their names end in .test suffix
Due to automake limitations, some features work only for tests
that end in one of the suffixes listed in TEST_EXTENSIONS.

* tests/detach-running: Rename to detach-running.test.
* tests/detach-sleeping: Rename to detach-sleeping.test.
* tests/detach-stopped: Rename to detach-stopped.test.
* tests/net: Rename to net.test.
* tests/ptrace_setoptions: Rename to ptrace_setoptions.test.
* tests/qual_syscall: Rename to qual_syscall.test.
* tests/sigaction.sh: Rename to sigaction.test.
* tests/stat: Rename to stat.test.
* tests/strace-f: Rename to strace-f.test.
* tests/Makefile.am (TESTS): Update.
(LOG_COMPILER): Rename to TEST_LOG_COMPILER.
2014-02-02 16:49:41 +00:00