summaryrefslogtreecommitdiff
path: root/tests/ptrace.c
diff options
context:
space:
mode:
authorEugene Syromyatnikov <evgsyr@gmail.com>2016-11-30 23:50:26 +0300
committerDmitry V. Levin <ldv@altlinux.org>2016-12-01 01:23:28 +0000
commitdcc9b9cdb2cd6de7c5b300b8d1f5dfb3f0b31ab2 (patch)
tree0b35a75e58cabbd000a0cd80061e91fb37ac3fa3 /tests/ptrace.c
parent3c8b6734088ceb54e17b03e11dbb07bc8294f9c5 (diff)
downloadstrace-dcc9b9cdb2cd6de7c5b300b8d1f5dfb3f0b31ab2.tar.gz
tests: additional check for PTRACE_SETSIGINFO ptrace command
* tests/ptrace.c (main): Add an additional PTRACE_SETSIGINFO check.
Diffstat (limited to 'tests/ptrace.c')
-rw-r--r--tests/ptrace.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ptrace.c b/tests/ptrace.c
index c046fa485..80ce8cbb2 100644
--- a/tests/ptrace.c
+++ b/tests/ptrace.c
@@ -349,6 +349,19 @@ main(void)
" = %s\n",
(unsigned) pid, bad_request, sip->si_call_addr, sip->si_syscall,
errstr);
+
+ sip->si_errno = 3141592653U;
+ sip->si_call_addr = NULL;
+ sip->si_syscall = __NR_read;
+ sip->si_arch = 0xda7a1057;
+
+ do_ptrace(PTRACE_SETSIGINFO, pid, bad_request, (unsigned long) sip);
+ printf("ptrace(PTRACE_SETSIGINFO, %u, %#lx, {si_signo=SIGSYS"
+ ", si_code=SYS_SECCOMP, si_errno=%d, si_call_addr=NULL"
+ ", si_syscall=__NR_read, si_arch=%#x /* AUDIT_ARCH_??? */})"
+ " = %s\n",
+ (unsigned) pid, bad_request, sip->si_errno, sip->si_arch,
+ errstr);
#endif
#if defined HAVE_SIGINFO_T_SI_TIMERID && defined HAVE_SIGINFO_T_SI_OVERRUN