Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1696633

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

From Shuah Khan <shuahkh@osg.samsung.com>
Newsgroups linux.kernel
Subject [PATCH 1/2] selftests: capabilities: fix to run Non-root +ia, sgidroot => i test
Date 2017-07-26 00:10 +0200
Message-ID <u7gbE-eH-27@gated-at.bofh.it> (permalink)
References <u7gbD-eH-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] selftests: capabilities: convert to TAP13 ksft framework Shuah Khan <shuahkh@osg.samsung.com> - 2017-07-26 00:10 +0200
  [PATCH 1/2] selftests: capabilities: fix to run Non-root +ia, sgidroot => i test Shuah Khan <shuahkh@osg.samsung.com> - 2017-07-26 00:10 +0200

csiph-web