summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShuah Khan <shuahkh@osg.samsung.com>2017-07-25 22:00:56 +0300
committerShuah Khan <shuahkh@osg.samsung.com>2017-08-03 00:29:39 +0300
commit52888fe43e1802cfc7dcea1b634d08351a0a73f4 (patch)
tree51b6c0ca3e50e0c67f1e8771aa2136c7c9e60691
parent3e18b641744ec8fe2ade75d6b9eae5f4de780476 (diff)
downloadlinux-52888fe43e1802cfc7dcea1b634d08351a0a73f4.tar.xz
selftests: capabilities: fix to run Non-root +ia, sgidroot => i test
do_tests() runs sgidnonroot test without fork_wait(). As a result the last test "Non-root +ia, sgidroot => i test" is left out. Fix it. Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
-rw-r--r--tools/testing/selftests/capabilities/test_execve.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/capabilities/test_execve.c b/tools/testing/selftests/capabilities/test_execve.c
index 763f37fecfb8..7f2e999839c2 100644
--- a/tools/testing/selftests/capabilities/test_execve.c
+++ b/tools/testing/selftests/capabilities/test_execve.c
@@ -380,7 +380,8 @@ static int do_tests(int uid, const char *our_path)
true, true, true, false);
} else {
printf("[RUN]\tNon-root +ia, sgidnonroot => i\n");
- exec_other_validate_cap("./validate_cap_sgidnonroot",
+ if (fork_wait())
+ exec_other_validate_cap("./validate_cap_sgidnonroot",
false, false, true, false);
if (fork_wait()) {