Commit ca202504 authored by Tobias Klauser's avatar Tobias Klauser Committed by Christian Brauner

selftests/core: fix close_range_test build after XFAIL removal

XFAIL was removed in commit 9847d24a ("selftests/harness: Refactor
XFAIL into SKIP") and its use in close_range_test was already replaced
by commit 1d44d0dd ("selftests: core: use SKIP instead of XFAIL in
close_range_test.c"). However, commit 23afeaef ("selftests: core:
add tests for CLOSE_RANGE_CLOEXEC") introduced usage of XFAIL in
TEST(close_range_cloexec). Use SKIP there as well.

Fixes: 23afeaef ("selftests: core: add tests for CLOSE_RANGE_CLOEXEC")
Cc: Giuseppe Scrivano <gscrivan@redhat.com>
Cc: linux-fsdevel@vger.kernel.org
Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
Acked-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
Link: https://lore.kernel.org/r/20201218112428.13662-1-tklauser@distanz.ch
Link: https://lore.kernel.org/r/20201218145415.801063-1-christian.brauner@ubuntu.comSigned-off-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
parent fec8a6a6
...@@ -102,7 +102,7 @@ TEST(close_range_unshare) ...@@ -102,7 +102,7 @@ TEST(close_range_unshare)
int i, ret, status; int i, ret, status;
pid_t pid; pid_t pid;
int open_fds[101]; int open_fds[101];
struct clone_args args = { struct __clone_args args = {
.flags = CLONE_FILES, .flags = CLONE_FILES,
.exit_signal = SIGCHLD, .exit_signal = SIGCHLD,
}; };
...@@ -191,7 +191,7 @@ TEST(close_range_unshare_capped) ...@@ -191,7 +191,7 @@ TEST(close_range_unshare_capped)
int i, ret, status; int i, ret, status;
pid_t pid; pid_t pid;
int open_fds[101]; int open_fds[101];
struct clone_args args = { struct __clone_args args = {
.flags = CLONE_FILES, .flags = CLONE_FILES,
.exit_signal = SIGCHLD, .exit_signal = SIGCHLD,
}; };
...@@ -241,7 +241,7 @@ TEST(close_range_cloexec) ...@@ -241,7 +241,7 @@ TEST(close_range_cloexec)
fd = open("/dev/null", O_RDONLY); fd = open("/dev/null", O_RDONLY);
ASSERT_GE(fd, 0) { ASSERT_GE(fd, 0) {
if (errno == ENOENT) 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; open_fds[i] = fd;
...@@ -250,9 +250,9 @@ TEST(close_range_cloexec) ...@@ -250,9 +250,9 @@ TEST(close_range_cloexec)
ret = sys_close_range(1000, 1000, CLOSE_RANGE_CLOEXEC); ret = sys_close_range(1000, 1000, CLOSE_RANGE_CLOEXEC);
if (ret < 0) { if (ret < 0) {
if (errno == ENOSYS) if (errno == ENOSYS)
XFAIL(return, "close_range() syscall not supported"); SKIP(return, "close_range() syscall not supported");
if (errno == EINVAL) 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. */ /* Ensure the FD_CLOEXEC bit is set also with a resource limit in place. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment