[PATCH 1/2] selftests: capabilities: fix to run Non-root +ia, sgidroot => i test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>
---
 tools/testing/selftests/capabilities/test_execve.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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()) {
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux