File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
tools/testing/selftests/seccomp Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -3722,7 +3722,12 @@ TEST(user_notification_sibling_pid_ns)
3722
3722
ASSERT_GE (pid , 0 );
3723
3723
3724
3724
if (pid == 0 ) {
3725
- ASSERT_EQ (unshare (CLONE_NEWPID ), 0 );
3725
+ ASSERT_EQ (unshare (CLONE_NEWPID ), 0 ) {
3726
+ if (errno == EPERM )
3727
+ SKIP (return , "CLONE_NEWPID requires CAP_SYS_ADMIN" );
3728
+ else if (errno == EINVAL )
3729
+ SKIP (return , "CLONE_NEWPID is invalid (missing CONFIG_PID_NS?)" );
3730
+ }
3726
3731
3727
3732
pid2 = fork ();
3728
3733
ASSERT_GE (pid2 , 0 );
@@ -3740,6 +3745,8 @@ TEST(user_notification_sibling_pid_ns)
3740
3745
ASSERT_EQ (unshare (CLONE_NEWPID ), 0 ) {
3741
3746
if (errno == EPERM )
3742
3747
SKIP (return , "CLONE_NEWPID requires CAP_SYS_ADMIN" );
3748
+ else if (errno == EINVAL )
3749
+ SKIP (return , "CLONE_NEWPID is invalid (missing CONFIG_PID_NS?)" );
3743
3750
}
3744
3751
ASSERT_EQ (errno , 0 );
3745
3752
You can’t perform that action at this time.
0 commit comments