We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55dc57e commit ebd2233Copy full SHA for ebd2233
testcases/kernel/syscalls/ptrace/ptrace02.c
@@ -30,10 +30,18 @@ static void verify_ptrace(void)
30
if (!child_pid[1]) {
31
SAFE_SETUID(uid);
32
TEST(ptrace(PTRACE_ATTACH, child_pid[0], NULL, NULL));
33
+
34
if (TST_RET == 0) {
35
tst_res(TFAIL, "ptrace() succeeded unexpectedly");
36
exit(0);
37
}
38
39
+ if (TST_RET != -1) {
40
+ tst_res(TFAIL,
41
+ "Invalid ptrace() return value %ld", TST_RET);
42
+ exit(0);
43
+ }
44
45
if (TST_ERR == EPERM)
46
tst_res(TPASS | TTERRNO, "ptrace() failed as expected");
47
else
0 commit comments