diff mbox series

selftests/core: fix close_range_test build after XFAIL removal

Message ID 20201218112428.13662-1-tklauser@distanz.ch (mailing list archive)
State Accepted
Headers show
Series selftests/core: fix close_range_test build after XFAIL removal | expand

Commit Message

Tobias Klauser Dec. 18, 2020, 11:24 a.m. UTC
XFAIL was removed in commit 9847d24af95c ("selftests/harness: Refactor
XFAIL into SKIP") and its use in close_range_test was already replaced
by commit 1d44d0dd61b6 ("selftests: core: use SKIP instead of XFAIL in
close_range_test.c"). However, commit 23afeaeff3d9 ("selftests: core:
add tests for CLOSE_RANGE_CLOEXEC") introduced usage of XFAIL in
TEST(close_range_cloexec). Use SKIP there as well.

Cc: Giuseppe Scrivano <gscrivan@redhat.com>
Fixes: 23afeaeff3d9 ("selftests: core: add tests for CLOSE_RANGE_CLOEXEC")
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 tools/testing/selftests/core/close_range_test.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Christian Brauner Dec. 18, 2020, 12:25 p.m. UTC | #1
On Fri, Dec 18, 2020 at 12:24:28PM +0100, Tobias Klauser wrote:
> XFAIL was removed in commit 9847d24af95c ("selftests/harness: Refactor
> XFAIL into SKIP") and its use in close_range_test was already replaced
> by commit 1d44d0dd61b6 ("selftests: core: use SKIP instead of XFAIL in
> close_range_test.c"). However, commit 23afeaeff3d9 ("selftests: core:
> add tests for CLOSE_RANGE_CLOEXEC") introduced usage of XFAIL in
> TEST(close_range_cloexec). Use SKIP there as well.
> 
> Cc: Giuseppe Scrivano <gscrivan@redhat.com>
> Fixes: 23afeaeff3d9 ("selftests: core: add tests for CLOSE_RANGE_CLOEXEC")
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> ---

Thanks for this! I already have a fix for this in my tree but I'm
dropping it and taking yours instead.

Acked-by: Christian Brauner <christian.brauner@ubuntu.com>

Shuah, I'll be taking this through my tree since I'm adding selftests
for a vfs regression fix that I'll be sending before Sunday.

Christian
Shuah Khan Feb. 9, 2021, 12:24 a.m. UTC | #2
On 12/18/20 5:25 AM, Christian Brauner wrote:
> On Fri, Dec 18, 2020 at 12:24:28PM +0100, Tobias Klauser wrote:
>> XFAIL was removed in commit 9847d24af95c ("selftests/harness: Refactor
>> XFAIL into SKIP") and its use in close_range_test was already replaced
>> by commit 1d44d0dd61b6 ("selftests: core: use SKIP instead of XFAIL in
>> close_range_test.c"). However, commit 23afeaeff3d9 ("selftests: core:
>> add tests for CLOSE_RANGE_CLOEXEC") introduced usage of XFAIL in
>> TEST(close_range_cloexec). Use SKIP there as well.
>>
>> Cc: Giuseppe Scrivano <gscrivan@redhat.com>
>> Fixes: 23afeaeff3d9 ("selftests: core: add tests for CLOSE_RANGE_CLOEXEC")
>> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
>> ---
> 
> Thanks for this! I already have a fix for this in my tree but I'm
> dropping it and taking yours instead.
> 
> Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
> 
> Shuah, I'll be taking this through my tree since I'm adding selftests
> for a vfs regression fix that I'll be sending before Sunday.
> 
> Christian
> 

Thank you Christian

thanks,
-- Shuah
diff mbox series

Patch

diff --git a/tools/testing/selftests/core/close_range_test.c b/tools/testing/selftests/core/close_range_test.c
index 87e16d65d9d7..670fb30d62f6 100644
--- a/tools/testing/selftests/core/close_range_test.c
+++ b/tools/testing/selftests/core/close_range_test.c
@@ -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;
@@ -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.  */