]> granicus.if.org Git - strace/commit
tests: check status qualifier
authorPaul Chaignon <paul.chaignon@gmail.com>
Mon, 1 Apr 2019 20:50:45 +0000 (22:50 +0200)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 10 Jul 2019 16:12:44 +0000 (16:12 +0000)
commit1d9b0d3d8c186d8ea08020579a090e94a536d685
tree3f28836452532aa4b6c42ca4222968d1ac74a17f
parente45a594cb08394c96f71105db9bacf08aa4c734d
tests: check status qualifier

This change adds 8 test cases for -e status with unfinished, failed,
none, successful, detached, and the whole set.  The test cases for
failed, successful, and the whole set use chdir(2).  Threaded test cases
for unfinished and none rely on a child thread execve'ing the lead
thread.  There are additional single-threaded tests for status=none and
status=unfinished.  The test case for detached interrupts strace while
attached to a sleeping process.

* tests/status.c: New file.
* tests/status-all.c: Likewise.
* tests/status-failed.c: Likewise.
* tests/status-detached.expected: Likewise.
* tests/status-none.c: Likewise.
* tests/status-none-threads.c: Likewise.
* tests/status-successful.c: Likewise.
* tests/status-unfinished-threads.c: Likewise.
* tests/status-unfinished.c: Likewise.
* tests/status-detached.test: New test.
* tests/status-none-threads.test: Likewise.
* tests/status-unfinished-threads.test: Likewise.
* tests/tests.h (test_status_chdir): New prototype.
* tests/.gitignore: Add status-all, status-failed, status-none,
status-none-threads, status-successful, status-unfinished,
and status-unfinished-threads.
* tests/gen_tests.in: Add status-all, status-failed, status-successful,
status-none, and status-unfinished.
* tests/pure_executables.list: Likewise.
* tests/Makefile.am (libtests_a_SOURCES): Add status.c.
(check_PROGRAMS): Add status-none-threads and status-unfinished-threads.
(status_none_threads_LDADD, status_unfinished_threads_LDADD): New
variables.
(MISC_TESTS): Add status-detached.test, status-none-threads.test, and
status-unfinished-threads.test.
(EXTRA_DIST): Add status-detached.expected.

Co-Authored-by: Burkhard Kohl <burkhard.kohl@intel.com>
Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
17 files changed:
tests/.gitignore
tests/Makefile.am
tests/gen_tests.in
tests/pure_executables.list
tests/status-all.c [new file with mode: 0644]
tests/status-detached.expected [new file with mode: 0644]
tests/status-detached.test [new file with mode: 0755]
tests/status-failed.c [new file with mode: 0644]
tests/status-none-threads.c [new file with mode: 0644]
tests/status-none-threads.test [new file with mode: 0755]
tests/status-none.c [new file with mode: 0644]
tests/status-successful.c [new file with mode: 0644]
tests/status-unfinished-threads.c [new file with mode: 0644]
tests/status-unfinished-threads.test [new file with mode: 0755]
tests/status-unfinished.c [new file with mode: 0644]
tests/status.c [new file with mode: 0644]
tests/tests.h