Skip to contentSkip to conversation

syscalls/keyctl07: skip test if syscall unavailable

PATCH New Steve Muckle 2 participants 2 messages Feb 1, 2018 – Feb 6, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 syscalls/keyctl07: skip test if syscall unavailable

If the child is unable to run the test because the syscall is unavailable TBROK is currently reported. Look for TCONF from the child and report that in this scenario instead.

---
 testcases/kernel/syscalls/keyctl/keyctl07.c | 3 +++
 1 file changed, 3 insertions(+)
testcases/kernel/syscalls/keyctl/keyctl07.c +3 -0
index 39f07eb5fbce..08a585b6c956 100644
@@ -106,6 +106,9 @@ static void do_test(void)
 		return;
 	}
 
+	if (WIFEXITED(status) && WEXITSTATUS(status) == TCONF)
+		tst_brk(TCONF, "syscall not implemented");
+
 	tst_brk(TBROK, "Child %s", tst_strstatus(status));
 }
 
Signature · 1 line
2.13.6
#1 lore raw

PATCH 1/1 syscalls/keyctl07: skip test if syscall unavailable

Hi,

Quoted 14 lines

If the child is unable to run the test because the syscall is unavailable TBROK is currently reported. Look for TCONF from the child and report that in this scenario instead.

---
 testcases/kernel/syscalls/keyctl/keyctl07.c | 3 +++
 1 file changed, 3 insertions(+)
testcases/kernel/syscalls/keyctl/keyctl07.c +0 -0
index 39f07eb5fbce..08a585b6c956 100644

testcases/kernel/syscalls/keyctl/keyctl07.c static void do_test(void) · line 113

Quoted 8 lines
testcases/kernel/syscalls/keyctl/keyctl07.c +3 -0
@@ -106,6 +106,9 @@ static void do_test(void)
 		return;
 	}
 
+	if (WIFEXITED(status) && WEXITSTATUS(status) == TCONF)
+		tst_brk(TCONF, "syscall not implemented");
+
 	tst_brk(TBROK, "Child %s", tst_strstatus(status));
 }

Pushed, thanks.

Kind regards,
Petr