selftests: capabilities: fix to run Non-root +ia, sgidroot => i test
authorShuah Khan <shuahkh@osg.samsung.com>
Tue, 25 Jul 2017 19:00:56 +0000 (13:00 -0600)
committerShuah Khan <shuahkh@osg.samsung.com>
Wed, 2 Aug 2017 21:29:39 +0000 (15:29 -0600)
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

index 763f37fecfb86b5ba37ee4eae409712939d5edb8..7f2e999839c2671d8487bd718ca9c7d04515a6c5 100644 (file)
@@ -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()) {