summaryrefslogtreecommitdiff
path: root/tests/prctl-seccomp-strict.c
diff options
context:
space:
mode:
authorSrikavin Ramkumar <srikavinramkumar@gmail.com>2021-07-12 12:14:24 -0400
committerDmitry V. Levin <ldv@strace.io>2021-07-12 12:14:24 -0400
commitb9f9d5b259bfea677286bc2f7dd9e89611f08c54 (patch)
tree3f5add9203e0ad457ffbc021c44fdca393ffb2ee /tests/prctl-seccomp-strict.c
parent45ca20603805d935a3809c866c0fffbdff734152 (diff)
downloadstrace-b9f9d5b259bfea677286bc2f7dd9e89611f08c54.tar.gz
tests: unify common code in prctl decoder tests
* tests/prctl.sh: Extract common test code. * tests/gen_tests.in (prctl-arg2-intptr, prctl-dumpable, prctl-name, prctl-no-args, prctl-pdeathsig, prctl-seccomp-filter-v, prctl-securebits, prctl-tid_address, prctl-tsc): New entries. * tests/Makefile.am (DECODER_TESTS): Remove prctl-arg2-intptr.test, prctl-dumpable.test, prctl-name.test, prctl-no-args.test, prctl-pdeathsig.test, prctl-seccomp-filter-v.test, prctl-securebits.test, prctl-tid_address.test, and prctl-tsc.test. (EXTRA_DIST): Add prctl.sh. * tests/prctl-seccomp-strict.test: Replace output filtering with a sed filter. * tests/prctl-spec-inject.test: Likewise. * tests/prctl-arg2-intptr.c: Add a marker to indicate the start of the expected output. * tests/prctl-dumpable.c: Likewise. * tests/prctl-name.c: Likewise. * tests/prctl-no-args.c: Likewise. * tests/prctl-pdeathsig.c: Likewise. * tests/prctl-seccomp-filter-v.c: Likewise. * tests/prctl-seccomp-strict.c: Likewise. * tests/prctl-securebits.c: Likewise. * tests/prctl-tid_address.c: Likewise. * tests/prctl-tsc.c: Likewise. * tests/prctl-arg2-intptr.test: Remove file. * tests/prctl-dumpable.test: Likewise. * tests/prctl-name.test: Likewise. * tests/prctl-no-args.test: Likewise. * tests/prctl-pdeathsig.test: Likewise. * tests/prctl-seccomp-filter-v.test: Likewise. * tests/prctl-securebits.test: Likewise. * tests/prctl-spec-inject.c: Likewise. * tests/prctl-tid_address.test: Likewise. * tests/prctl-tsc.test: Likewise.
Diffstat (limited to 'tests/prctl-seccomp-strict.c')
-rw-r--r--tests/prctl-seccomp-strict.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/prctl-seccomp-strict.c b/tests/prctl-seccomp-strict.c
index 3867ca176..682a5a8c5 100644
--- a/tests/prctl-seccomp-strict.c
+++ b/tests/prctl-seccomp-strict.c
@@ -19,6 +19,8 @@ main(void)
"prctl(PR_SET_SECCOMP, SECCOMP_MODE_STRICT) = 0\n";
static const char text2[] = "+++ exited with 0 +++\n";
+ syscall(__NR_prctl, -1U, -2U, -3U, -4U, -5U);
+
int rc = prctl(PR_SET_SECCOMP, -1L, 1, 2, 3);
printf("prctl(PR_SET_SECCOMP, %#lx /* SECCOMP_MODE_??? */, 0x1, 0x2, 0x3)"
" = %d %s (%m)\n", -1L, rc, errno2name());