Skip to content

Commit

Permalink
selftests: core: use SKIP instead of XFAIL in close_range_test.c
Browse files Browse the repository at this point in the history
[ Upstream commit 1d44d0d ]

XFAIL is gone since commit 9847d24 ("selftests/harness: Refactor XFAIL
into SKIP"), use SKIP instead.

Fixes: 9847d24 ("selftests/harness: Refactor XFAIL into SKIP")
Signed-off-by: Tommi Rantala <tommi.t.rantala@nokia.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
rantala authored and gregkh committed Nov 18, 2020
1 parent d0a8729 commit 991efbf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/testing/selftests/core/close_range_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ TEST(close_range)
fd = open("/dev/null", O_RDONLY | O_CLOEXEC);
ASSERT_GE(fd, 0) {
if (errno == ENOENT)
XFAIL(return, "Skipping test since /dev/null does not exist");
SKIP(return, "Skipping test since /dev/null does not exist");
}

open_fds[i] = fd;
}

EXPECT_EQ(-1, sys_close_range(open_fds[0], open_fds[100], -1)) {
if (errno == ENOSYS)
XFAIL(return, "close_range() syscall not supported");
SKIP(return, "close_range() syscall not supported");
}

EXPECT_EQ(0, sys_close_range(open_fds[0], open_fds[50], 0));
Expand Down Expand Up @@ -108,7 +108,7 @@ TEST(close_range_unshare)
fd = open("/dev/null", O_RDONLY | O_CLOEXEC);
ASSERT_GE(fd, 0) {
if (errno == ENOENT)
XFAIL(return, "Skipping test since /dev/null does not exist");
SKIP(return, "Skipping test since /dev/null does not exist");
}

open_fds[i] = fd;
Expand Down Expand Up @@ -197,7 +197,7 @@ TEST(close_range_unshare_capped)
fd = open("/dev/null", O_RDONLY | O_CLOEXEC);
ASSERT_GE(fd, 0) {
if (errno == ENOENT)
XFAIL(return, "Skipping test since /dev/null does not exist");
SKIP(return, "Skipping test since /dev/null does not exist");
}

open_fds[i] = fd;
Expand Down

0 comments on commit 991efbf

Please sign in to comment.