Skip to content

Commit

Permalink
selftests/core: fix close_range_test build after XFAIL removal
Browse files Browse the repository at this point in the history
XFAIL was removed in commit 9847d24 ("selftests/harness: Refactor
XFAIL into SKIP") and its use in close_range_test was already replaced
by commit 1d44d0d ("selftests: core: use SKIP instead of XFAIL in
close_range_test.c"). However, commit 23afeae ("selftests: core:
add tests for CLOSE_RANGE_CLOEXEC") introduced usage of XFAIL in
TEST(close_range_cloexec). Use SKIP there as well.

Fixes: 23afeae ("selftests: core: add tests for CLOSE_RANGE_CLOEXEC")
Cc: Giuseppe Scrivano <[email protected]>
Cc: [email protected]
Signed-off-by: Tobias Klauser <[email protected]>
Acked-by: Christian Brauner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
  • Loading branch information
tklauser authored and Christian Brauner committed Dec 19, 2020
1 parent fec8a6a commit ca20250
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/testing/selftests/core/close_range_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ TEST(close_range_unshare)
int i, ret, status;
pid_t pid;
int open_fds[101];
struct clone_args args = {
struct __clone_args args = {
.flags = CLONE_FILES,
.exit_signal = SIGCHLD,
};
Expand Down Expand Up @@ -191,7 +191,7 @@ TEST(close_range_unshare_capped)
int i, ret, status;
pid_t pid;
int open_fds[101];
struct clone_args args = {
struct __clone_args args = {
.flags = CLONE_FILES,
.exit_signal = SIGCHLD,
};
Expand Down Expand Up @@ -241,7 +241,7 @@ TEST(close_range_cloexec)
fd = open("/dev/null", O_RDONLY);
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 All @@ -250,9 +250,9 @@ TEST(close_range_cloexec)
ret = sys_close_range(1000, 1000, CLOSE_RANGE_CLOEXEC);
if (ret < 0) {
if (errno == ENOSYS)
XFAIL(return, "close_range() syscall not supported");
SKIP(return, "close_range() syscall not supported");
if (errno == EINVAL)
XFAIL(return, "close_range() doesn't support CLOSE_RANGE_CLOEXEC");
SKIP(return, "close_range() doesn't support CLOSE_RANGE_CLOEXEC");
}

/* Ensure the FD_CLOEXEC bit is set also with a resource limit in place. */
Expand Down

0 comments on commit ca20250

Please sign in to comment.