[LTP] [PATCH] syscalls/keyctl07: skip test if syscall unavailable

Steve Muckle smuckle.linux@gmail.com
Thu Feb 1 20:07:33 CET 2018


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.

Signed-off-by: Steve Muckle <smuckle.linux@gmail.com>
---
 testcases/kernel/syscalls/keyctl/keyctl07.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/testcases/kernel/syscalls/keyctl/keyctl07.c b/testcases/kernel/syscalls/keyctl/keyctl07.c
index 39f07eb5fbce..08a585b6c956 100644
--- a/testcases/kernel/syscalls/keyctl/keyctl07.c
+++ b/testcases/kernel/syscalls/keyctl/keyctl07.c
@@ -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));
 }
 
-- 
2.13.6



More information about the ltp mailing list