Commit Graph

20 Commits

Author SHA1 Message Date
0171752084 test: remove fork.c and vfork.c
These manual tests are obsoleted by fork-f.test and vfork-f.test.

* test/fork.c: Remove.
* test/vfork.c: Remove.
* test/Makefile (PROGS): Remove fork and vfork.
* test/.gitignore: Remove fork and vfork.
2015-12-30 23:28:35 +00:00
Denys Vlasenko
68ba190f0a New test: test/many_looping_threads.c
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2015-03-21 20:59:39 +01:00
Denys Vlasenko
35431577b5 test/Makefile: add missing test targets
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2015-03-21 18:54:16 +01:00
30bcb792cf tests: add a test for sigreturn/rt_sigreturn decoding
Convert test/sigreturn.c into a regular test.

* test/Makefile (PROGS): Remove sigreturn.
* test/.gitignore: Likewise.
* test/sigreturn.c: Rewrite to ...
* tests/sigreturn.c: ... new file.
* tests/sigreturn.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add sigreturn.
(TESTS): Add sigreturn.test.
* tests/.gitignore: Add sigreturn.
2015-03-05 00:05:27 +00:00
35701997cf test: add a manual test for seccomp decoding
* test/.gitignore: Add seccomp.
* test/Makefile (PROGS): Likewise.
* test/seccomp.c: New file.
* test/README: Mention ../tests/.
2015-02-06 01:52:59 +00:00
e837b14a53 tests: add a test for select syscall decoding
Convert test/select.c into a regular test.

* test/Makefile (PROGS): Remove select.
* test/.gitignore: Likewise.
* test/select.c: Rewrite to ...
* tests/select.c: ... new file.
* tests/select.awk: New file.
* tests/select.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add select.
(TESTS): Add select.test.
(EXTRA_DIST): Add select.awk.
* tests/.gitignore: Add select.
2015-02-04 02:21:13 +00:00
Dr. David Alan Gilbert
025f1082b6 Fix select decoding with bogus (huge or negative) nfds.
We used to allocate and fetch bit arrays using a sanitized
length, but then iterate over them with "j < arg[0]" condition,
where arg[0] is not sanitized. This segfaults if arg[0] is huge
or negative. This change fixes this.

Add test/select.c to capture the case.

Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-11-05 11:54:51 +01:00
Denys Vlasenko
b51f364c42 Improve sigreturn decoding on x86 to show RT signal bits too.
This includes decoding of 32-bit sigreturn by 64-bit strace,
which previously wasn't done.

Added a test for it.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2013-07-16 12:06:25 +02:00
Mike Frysinger
48d3159d67 test: add mtd/ubi test helpers
I used these to develop the mtd/ubi ioctl decoders.

* test/.gitignore: Add mtd/ubi.
* test/Makefile: Declare all tests in a PROGS var.
Declare build targets .PHONY.
(all): Depend on $(PROGS) instead of hardcoded list.
(clean): Remove $(PROGS) instead of hardcoded list.
* test/mtd.c: New file.
* test/ubi.c: Likewise.
2013-05-02 22:43:47 +00:00
Mike Frysinger
b51ce62454 test: include headers for used funcs
These funcs use things like wait/write/read/strcmp but sometimes
don't include the right header for them.

* test/Makefile: Add -Wall to CFLAGS.
* test/clone.c: Include unistd.h.
* test/fork.c: Include sys/wait.h.
* test/sig.c: Include unistd.h.
* test/sigkill_rain.c: Include sys/wait.h.
* test/vfork.c: Include sys/wait.h.
* test/wait_must_be_interruptible.c: Include string.h
2013-05-02 22:41:50 +00:00
Denys Vlasenko
a6d91ded3f Tidy up includes and copyright notices, fix indentation
The files not mentioned in changelog below had only
copyright notices fixes and indentation fixes.

* defs.h: Include <stdint.h> and <inttypes.h>.
* file.c: Do not include <inttypes.h>.
Move struct kernel_dirent declaration below top include block.
* block.c: Do not include <stdint.h> and <inttypes.h>.
* quota.c: Likewise.
* desc.c: Likewise.
* signal.c: Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-16 12:02:22 +01:00
Denys Vlasenko
c76ae4352e Add new test program: test/threaded_execve.c
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-01-27 15:37:13 +01:00
Denys Vlasenko
8158e7716c Update test/* directory, it seem to be a bit bit-rotted
Added README; modified sigkill_rain.c to be more understandable,
made clone.c compile; added wait_must_be_interruptible.c test;
updated Makefile and .gitignore.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-08 14:08:59 +02:00
414fe7d4d2 Cleanup trailing whitespaces and indentation that uses spaces before tabs
Correct spacing to fix warnings reported by
git diff --check 4b825dc642 HEAD

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2009-07-08 14:57:27 +00:00
Roland McGrath
276ceb33f2 2007-11-06 Jan Kratochvil <jan.kratochvil@redhat.com>
* strace.c [LINUX] (droptcb): Recurse on TCP->parent if it is a
	TCB_EXITING zombie group leader.
	* test/childthread.c: New file.
	* test/.cvsignore, test/Makefile: Add it.
	Code advisory: Roland McGrath
	Fixes RH#354261.
2007-11-13 08:12:12 +00:00
Roland McGrath
e1e57b2840 2007-07-05 Jan Kratochvil <jan.kratochvil@redhat.com>
* test/leaderkill.c: New file.
	* test/.cvsignore, test/Makefile: Add it.
2007-07-05 18:43:18 +00:00
Wichert Akkerman
c792698a99 README-linux: updated to note that strace might not compile
with development kernels
bjm.c: sys_query_module: check if malloc succeeds
system.c: sys_cap[gs]et(): check if malloc succeeds, only malloc once
linux/syscallent.h: updated for 2.3.99pre3
linux/alpha/syscallent.h: updated for 2.3.99pre3, add all osf syscalls
even though Linux doesn't implement them
syscall.c: add global variables for MIPS registers as well
syscall.c: move global variables to before get_scno since that uses them
util.c: oops, misspelled defined
process.c: fix ptrace calls in change_syscall
mem.c: decode sys_madvise
Merge patch from Topi Miettinen <Topi.Miettinen@nic.fi>
+ add support for quotactl, fdatasync, mlock, mlockall, munlockall & acct
+ small fix for RLIMIT_* and RUSAGE_BOTH
+ enhace support for capget and capset
2000-04-10 22:22:31 +00:00
Wichert Akkerman
faf722234d test/vfork.c: new file to test vfork traces
test/.cvsignore: new file
defs.h: Up maximum number of traced processed to 64
strace.c: Disable some debugging code from davidm
implement setarg for more architectures
implement change_syscall
2000-02-19 23:59:03 +00:00
Pavel Machek
245a6ac0e7 Automatically probe for sys/poll.h
Include example of nasty program where strace (by design) gives
incorrect output.
2000-02-01 16:12:33 +00:00
Wichert Akkerman
76baf7c9f6 Initial revision 1999-02-19 00:21:36 +00:00