Commit Graph

5 Commits

Author SHA1 Message Date
6833d61090 tests: change text marker in fork-f and vfork-f tests
Use chdir syscalls instead of pwrite64 syscalls as a method of inserting
text markers into strace output because the former are more portable.

* tests/fork-f.c (logit): Rename to logit_. Use chdir instead of pwrite.
(logit): New macro wrapper around logit_.
(main): Update expected output.
* tests/vfork-f.c: Likewise.
* tests/fork-f.test: Update.
2016-01-08 02:45:05 +00:00
1eabdb3c99 tests/vfork-f.c: support platforms without vfork
On some platforms, e.g. hppa glibc, vfork() is implemented using fork
syscall, so the test cannot rely on the parent process remaining blocked
until the child process either terminates or calls execve.

* tests/vfork-f.c (main): Explicitly block the parent until the child
either terminates or calls execve.
2016-01-07 02:11:58 +00:00
f90f69fa32 tests/vfork-f.c: use libtests
* tests/vfork-f.c (main): Use assert and perror_msg_and_fail.
2016-01-06 11:24:44 +00:00
0c8853c3c3 tests: include tests.h instead of config.h
Automatically edit tests/*.c files using the following perl one-liner:

perl -0777 -pi -e \
's/#ifdef HAVE_CONFIG_H\n# include "config\.h"\n#endif\n*/#include "tests.h"\n/' \
tests/*.c
2016-01-05 23:17:11 +00:00
78db0f2dcf tests: add fork-f.test and vfork-f.test
Check how strace -f follows fork and vfork syscalls.

* tests/fork-f.c: New file.
* tests/fork-f.test: New test.
* tests/vfork-f.c: New file.
* tests/vfork-f.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add fork-f and vfork-f.
(TESTS): Add fork-f.test and vfork-f.test.
* tests/.gitignore: Add fork-f and vfork-f.
2015-12-30 23:08:32 +00:00