selftests fixes
Subsystems (5)
cover selftests fixes
Hi, small fixes to issues I hit with selftests.
Tommi Rantala (13):
selftests: filter kselftest headers from command in lib.mk
selftests: pidfd: fix compilation errors due to wait.h
selftests: add vmaccess to .gitignore selftests/harness: prettify SKIP message whitespace again
selftests: pidfd: use ksft_test_result_skip() when skipping test
selftests: pidfd: skip test on kcmp() ENOSYS
selftests: pidfd: add CONFIG_CHECKPOINT_RESTORE=y to config
selftests: pidfd: drop needless linux/kcmp.h inclusion in
pidfd_setns_test.c
selftests: android: fix multiple definition of sock_name
selftests: proc: fix warning: _GNU_SOURCE redefined
selftests: core: use SKIP instead of XFAIL in close_range_test.c
selftests: clone3: use SKIP instead of XFAIL
selftests: binderfs: use SKIP instead of XFAIL
tools/testing/selftests/android/ion/ipcsocket.c | 1 + tools/testing/selftests/android/ion/ipcsocket.h | 2 -- .../selftests/clone3/clone3_cap_checkpoint_restore.c | 2 +- tools/testing/selftests/core/close_range_test.c | 8 ++++---- .../selftests/filesystems/binderfs/binderfs_test.c | 8 ++++---- tools/testing/selftests/kselftest_harness.h | 2 +- tools/testing/selftests/lib.mk | 2 +- tools/testing/selftests/pidfd/config | 1 + tools/testing/selftests/pidfd/pidfd_getfd_test.c | 5 ++++- tools/testing/selftests/pidfd/pidfd_open_test.c | 1 - tools/testing/selftests/pidfd/pidfd_poll_test.c | 1 - tools/testing/selftests/pidfd/pidfd_setns_test.c | 1 - tools/testing/selftests/pidfd/pidfd_test.c | 2 +- tools/testing/selftests/proc/proc-loadavg-001.c | 1 - tools/testing/selftests/proc/proc-self-syscall.c | 1 - tools/testing/selftests/proc/proc-uptime-002.c | 1 - tools/testing/selftests/ptrace/.gitignore | 1 + 17 files changed, 19 insertions(+), 21 deletions(-)
Signature · 1 line
2.26.2
PATCH 1/13 selftests: filter kselftest headers from command in lib.mk
Commit 1056d3d2c97e ("selftests: enforce local header dependency in lib.mk") added header dependency to the rule, but as the rule uses $^, the headers are added to the compiler command line.
This can cause unexpected precompiled header files being generated when compilation fails:
$ echo { >> openat2_test.c $ make
gcc -Wall -O2 -g -fsanitize=address -fsanitize=undefined openat2_test.c
tools/testing/selftests/kselftest_harness.h tools/testing/selftests/kselftest.h helpers.c
-o tools/testing/selftests/openat2/openat2_test
openat2_test.c:313:1: error: expected identifier or ‘(’ before ‘{’ token
313 | {
| ^
make: *** [../lib.mk:140: tools/testing/selftests/openat2/openat2_test] Error 1$ file openat2_test* openat2_test: GCC precompiled header (version 014) for C openat2_test.c: C source, ASCII text
Fix it by filtering out the headers, so that we'll only pass the actual *.c files in the compiler command line.
--- tools/testing/selftests/lib.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/lib.mk +1 -1
@@ -137,7 +137,7 @@ endif ifeq ($(OVERRIDE_TARGETS),) LOCAL_HDRS := $(selfdir)/kselftest_harness.h $(selfdir)/kselftest.h $(OUTPUT)/%:%.c $(LOCAL_HDRS) - $(LINK.c) $^ $(LDLIBS) -o $@ + $(LINK.c) $(filter-out $(LOCAL_HDRS),$^) $(LDLIBS) -o $@ $(OUTPUT)/%.o:%.S $(COMPILE.S) $^ -o $@
Signature · 1 line
2.26.2
Re: [PATCH 01/13] selftests: filter kselftest headers from command in lib.mk
Quoted 22 lines · Tommi Rantala
Commit
1056d3d2c97e("selftests: enforce local header dependency in lib.mk") added header dependency to the rule, but as the rule uses $^, the headers are added to the compiler command line.This can cause unexpected precompiled header files being generated when compilation fails:
$ echo { >> openat2_test.c$ make gcc -Wall -O2 -g -fsanitize=address -fsanitize=undefined openat2_test.c tools/testing/selftests/kselftest_harness.h tools/testing/selftests/kselftest.h helpers.c -o tools/testing/selftests/openat2/openat2_test openat2_test.c:313:1: error: expected identifier or ‘(’ before ‘{’ token 313 | { | ^ make: *** [../lib.mk:140: tools/testing/selftests/openat2/openat2_test] Error 1$ file openat2_test* openat2_test: GCC precompiled header (version 014) for C openat2_test.c: C source, ASCII text
Quoted 5 lines
Fix it by filtering out the headers, so that we'll only pass the actual *.c files in the compiler command line.
Fixes 1056d3d2c97e ("selftests: enforce local header dependency in lib.mk")Signed-off-by Tommi Rantala <[email protected]>
Ah yes, thanks!
Signature · 1 line
Kees Cook
Re: [PATCH 01/13] selftests: filter kselftest headers from command in lib.mk
In reply to Tommi RantalaQuoted 22 lines · Tommi Rantala
Commit
1056d3d2c97e("selftests: enforce local header dependency in lib.mk") added header dependency to the rule, but as the rule uses $^, the headers are added to the compiler command line.This can cause unexpected precompiled header files being generated when compilation fails:
$ echo { >> openat2_test.c$ make gcc -Wall -O2 -g -fsanitize=address -fsanitize=undefined openat2_test.c tools/testing/selftests/kselftest_harness.h tools/testing/selftests/kselftest.h helpers.c -o tools/testing/selftests/openat2/openat2_test openat2_test.c:313:1: error: expected identifier or ‘(’ before ‘{’ token 313 | { | ^ make: *** [../lib.mk:140: tools/testing/selftests/openat2/openat2_test] Error 1$ file openat2_test* openat2_test: GCC precompiled header (version 014) for C openat2_test.c: C source, ASCII text
Quoted 6 lines
Fix it by filtering out the headers, so that we'll only pass the actual *.c files in the compiler command line.
Fixes 1056d3d2c97e ("selftests: enforce local header dependency in lib.mk")Signed-off-by Tommi Rantala <[email protected]>---
Thanks!
PATCH 2/13 selftests: pidfd: fix compilation errors due to wait.h
In reply to Tommi RantalaDrop unneeded <linux/wait.h> header inclusion to fix pidfd compilation errors seen in Fedora 32:
In file included from pidfd_open_test.c:9:../../../../usr/include/linux/wait.h:17:16: error: expected identifier before numeric constant
17 | #define P_ALL 0
| ^--- tools/testing/selftests/pidfd/pidfd_open_test.c | 1 - tools/testing/selftests/pidfd/pidfd_poll_test.c | 1 - 2 files changed, 2 deletions(-)
tools/testing/selftests/pidfd/pidfd_open_test.c +0 -1
@@ -6,7 +6,6 @@#include <inttypes.h> #include <limits.h> #include <linux/types.h> -#include <linux/wait.h> #include <sched.h> #include <signal.h> #include <stdbool.h>
tools/testing/selftests/pidfd/pidfd_poll_test.c +0 -1
@@ -3,7 +3,6 @@#define _GNU_SOURCE#include <errno.h> #include <linux/types.h> -#include <linux/wait.h> #include <poll.h> #include <signal.h> #include <stdbool.h>
Signature · 1 line
2.26.2
Re: [PATCH 02/13] selftests: pidfd: fix compilation errors due to wait.h
Quoted 9 lines · Tommi Rantala
Drop unneeded <
linux/wait.h> header inclusion to fix pidfd compilation errors seen in Fedora 32:In file included from pidfd_open_test.c:9:
../../../../usr/include/linux/wait.h:17:16: error: expected identifier before numeric constant17 | #define P_ALL 0 | ^Signed-off-by Tommi Rantala <[email protected]>
Signature · 1 line
Kees Cook
Re: [PATCH 02/13] selftests: pidfd: fix compilation errors due to wait.h
In reply to Tommi RantalaQuoted 10 lines · Tommi Rantala
Drop unneeded <
linux/wait.h> header inclusion to fix pidfd compilation errors seen in Fedora 32:In file included from pidfd_open_test.c:9:
../../../../usr/include/linux/wait.h:17:16: error: expected identifier before numeric constant17 | #define P_ALL 0 | ^Signed-off-by Tommi Rantala <[email protected]>---
Thanks!
PATCH 3/13 selftests: add vmaccess to .gitignore
In reply to Tommi RantalaCommit 2de4e82318c7 ("selftests/ptrace: add test cases for dead-locks") added vmaccess testcase, add the binary to .gitignore
--- tools/testing/selftests/ptrace/.gitignore | 1 + 1 file changed, 1 insertion(+)
tools/testing/selftests/ptrace/.gitignore +1 -0
@@ -1,3 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only get_syscall_info peeksiginfo +vmaccess
Signature · 1 line
2.26.2
Re: [PATCH 03/13] selftests: add vmaccess to .gitignore
Quoted 5 lines · Tommi Rantala
Commit
2de4e82318c7("selftests/ptrace: add test cases for dead-locks") added vmaccess testcase, add the binary to .gitignoreFixes 2de4e82318c7 ("selftests/ptrace: add test cases for dead-locks")Signed-off-by Tommi Rantala <[email protected]>
Signature · 1 line
Kees Cook
Re: [PATCH 03/13] selftests: add vmaccess to .gitignore
In reply to Tommi RantalaQuoted 6 lines · Tommi Rantala
Commit
2de4e82318c7("selftests/ptrace: add test cases for dead-locks") added vmaccess testcase, add the binary to .gitignoreFixes 2de4e82318c7 ("selftests/ptrace: add test cases for dead-locks")Signed-off-by Tommi Rantala <[email protected]>---
Thanks!
PATCH 4/13 selftests/harness: prettify SKIP message whitespace again
In reply to Tommi RantalaCommit 9847d24af95c ("selftests/harness: Refactor XFAIL into SKIP") replaced XFAIL with SKIP in the output. Add one more space to make the output aligned and pretty again.
--- tools/testing/selftests/kselftest_harness.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/kselftest_harness.h +1 -1
@@ -126,7 +126,7 @@snprintf (_metadata->results->reason, \ sizeof(_metadata->results->reason), fmt, ##__VA_ARGS__); \if (TH_LOG_ENABLED ) { \ -fprintf (TH_LOG_STREAM ,"# SKIP %s\n" , \ +fprintf (TH_LOG_STREAM ,"# SKIP %s\n" , \ _metadata->results->reason); \ } \ _metadata->passed =1 ; \
Signature · 1 line
2.26.2
Re: [PATCH 04/13] selftests/harness: prettify SKIP message whitespace again
Quoted 6 lines · Tommi Rantala
Commit
9847d24af95c("selftests/harness: Refactor XFAIL into SKIP") replaced XFAIL with SKIP in the output. Add one more space to make the output aligned and pretty again.Fixes 9847d24af95c ("selftests/harness: Refactor XFAIL into SKIP")Signed-off-by Tommi Rantala <[email protected]>
Nice catch!
Signature · 1 line
Kees Cook
Re: [PATCH 04/13] selftests/harness: prettify SKIP message whitespace again
In reply to Tommi RantalaQuoted 7 lines · Tommi Rantala
Commit
9847d24af95c("selftests/harness: Refactor XFAIL into SKIP") replaced XFAIL with SKIP in the output. Add one more space to make the output aligned and pretty again.Fixes 9847d24af95c ("selftests/harness: Refactor XFAIL into SKIP")Signed-off-by Tommi Rantala <[email protected]>---
Thanks!
PATCH 5/13 selftests: pidfd: use ksft_test_result_skip() when skipping test
In reply to Tommi RantalaThere's planned tests != run tests in pidfd_test when some test is skipped:
$ ./pidfd_test TAP version 13 1..8 [...] # pidfd_send_signal signal recycled pid test: Skipping test # Planned tests != run tests (8 != 7) # Totals: pass:7 fail:0 xfail:0 xpass:0 skip:0 error:0
Fix by using ksft_test_result_skip():
$ ./pidfd_test TAP version 13 1..8 [...] ok 8 # SKIP pidfd_send_signal signal recycled pid test: Unsharing pid namespace not permitted # Totals: pass:7 fail:0 xfail:0 xpass:0 skip:1 error:0
--- tools/testing/selftests/pidfd/pidfd_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/pidfd/pidfd_test.c +1 -1
@@ -330,7 +330,7 @@ static int test_pidfd_send_signal_recycled_pid_fail(void)ksft_exit_fail_msg ("%s test: Failed to recycle pid %d\n" , test_name,PID_RECYCLE );case PIDFD_SKIP : -ksft_print_msg ("%s test: Skipping test\n" , test_name); +ksft_test_result_skip ("%s test: Skipping test\n" , test_name); ret =0 ;break ;case PIDFD_XFAIL :
Signature · 1 line
2.26.2
Re: [PATCH 05/13] selftests: pidfd: use ksft_test_result_skip() when skipping test
Quoted 20 lines · Tommi Rantala
There's planned tests != run tests in
pidfd_testwhen some test is skipped:$ ./pidfd_test TAP version 13 1..8 [...] # pidfd_send_signal signal recycled pid test: Skipping test # Planned tests != run tests (8 != 7) # Totals: pass:7 fail:0 xfail:0 xpass:0 skip:0 error:0Fix by using
ksft_test_result_skip():$ ./pidfd_test TAP version 13 1..8 [...] ok 8 # SKIP pidfd_send_signal signal recycled pid test: Unsharing pid namespace not permitted # Totals: pass:7 fail:0 xfail:0 xpass:0 skip:1 error:0
Quoted 2 lines
Signed-off-by Tommi Rantala <[email protected]>---
Thanks, I never got around to fixing this myself.
PATCH 6/13 selftests: pidfd: skip test on kcmp() ENOSYS
In reply to Tommi RantalaSkip test if kcmp() is not available, for example if kernel is compiled without CONFIG_CHECKPOINT_RESTORE=y.
--- tools/testing/selftests/pidfd/pidfd_getfd_test.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
tools/testing/selftests/pidfd/pidfd_getfd_test.c +4 -1
@@ -204,7 +204,10 @@ TEST_F(child, fetch_fd) fd =sys_pidfd_getfd (self->pidfd, self->remote_fd,0 );ASSERT_GE (fd,0 ); -EXPECT_EQ (0 ,sys_kcmp (getpid (), self->pid,KCMP_FILE , fd, self->remote_fd)); + ret =sys_kcmp (getpid (), self->pid,KCMP_FILE , fd, self->remote_fd); +if (ret <0 && errno ==ENOSYS ) +SKIP (return,"kcmp() syscall not supported" ); +EXPECT_EQ (ret,0 ); ret =fcntl (fd,F_GETFD );ASSERT_GE (ret,0 );
Signature · 1 line
2.26.2
Re: [PATCH 06/13] selftests: pidfd: skip test on kcmp() ENOSYS
Quoted 5 lines · Tommi Rantala
Skip test if
kcmp()is not available, for example if kernel is compiled withoutCONFIG_CHECKPOINT_RESTORE=y.Signed-off-by Tommi Rantala <[email protected]>---
Good catch, thanks!
PATCH 7/13 selftests: pidfd: add CONFIG_CHECKPOINT_RESTORE=y to config
In reply to Tommi Rantalakcmp syscall is used in pidfd_getfd_test.c, so add CONFIG_CHECKPOINT_RESTORE=y to config to ensure kcmp is available.
--- tools/testing/selftests/pidfd/config | 1 + 1 file changed, 1 insertion(+)
tools/testing/selftests/pidfd/config +1 -0
@@ -4,3 +4,4 @@ CONFIG_USER_NS=y CONFIG_PID_NS=y CONFIG_NET_NS=y CONFIG_CGROUPS=y +CONFIG_CHECKPOINT_RESTORE=y
Signature · 1 line
2.26.2
Re: [PATCH 07/13] selftests: pidfd: add CONFIG_CHECKPOINT_RESTORE=y to config
Quoted 5 lines · Tommi Rantala
kcmp syscall is used in
pidfd_getfd_test.c, so addCONFIG_CHECKPOINT_RESTORE=yto config to ensure kcmp is available.Signed-off-by Tommi Rantala <[email protected]>---
Good catch, thanks!
PATCH 8/13 selftests: pidfd: drop needless linux/kcmp.h inclusion in pidfd_setns_test.c
In reply to Tommi Rantalakcmp is not used in pidfd_setns_test.c, so do not include <linux/kcmp.h>
--- tools/testing/selftests/pidfd/pidfd_setns_test.c | 1 - 1 file changed, 1 deletion(-)
tools/testing/selftests/pidfd/pidfd_setns_test.c +0 -1
@@ -16,7 +16,6 @@#include <unistd.h> #include <sys/socket.h> #include <sys/stat.h> -#include <linux/kcmp.h> #include "pidfd.h" #include "../clone3/clone3_selftests.h"
Signature · 1 line
2.26.2
Re: [PATCH 08/13] selftests: pidfd: drop needless linux/kcmp.h inclusion in pidfd_setns_test.c
Quoted 4 lines · Tommi Rantala
kcmp is not used in
pidfd_setns_test.c, so do not include <linux/kcmp.h>Signed-off-by Tommi Rantala <[email protected]>---
Thanks!
PATCH 9/13 selftests: android: fix multiple definition of sock_name
In reply to Tommi RantalaFix multiple definition of sock_name compilation error:
tools/testing/selftests/android/ion/ipcsocket.h:8: multiple definition of `sock_name'
--- tools/testing/selftests/android/ion/ipcsocket.c | 1 + tools/testing/selftests/android/ion/ipcsocket.h | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-)
tools/testing/selftests/android/ion/ipcsocket.c +1 -0
@@ -10,6 +10,7 @@#include "ipcsocket.h" +static char sock_name[MAX_SOCK_NAME_LEN ];int opensocket (int *sockfd,const char *name,int connecttype) {
tools/testing/selftests/android/ion/ipcsocket.h +0 -2
@@ -5,8 +5,6 @@#define MAX_SOCK_NAME_LEN 64 -char sock_name[MAX_SOCK_NAME_LEN ]; -/* This structure is responsible for holding the IPC data * data: hold the buffer fd * len: just the length of 32-bit integer fd
Signature · 1 line
2.26.2
Re: [PATCH 09/13] selftests: android: fix multiple definition of sock_name
Quoted 6 lines · Tommi Rantala
Fix multiple definition of
sock_namecompilation error:
tools/testing/selftests/android/ion/ipcsocket.h:8: multiple definition of `sock_name'Signed-off-by Tommi Rantala <[email protected]>---
Ion will be removed from the kernel soon but this seems like an ok bugfix.
Thanks!
Shuah Khan
maintainerRe: [PATCH 09/13] selftests: android: fix multiple definition of sock_name
Quoted 5 lines · Christian Brauner
Quoted 4 lines · Tommi Rantala
Fix multiple definition of
sock_namecompilation error:
tools/testing/selftests/android/ion/ipcsocket.h:8: multiple definition of `sock_name'
Quoted 8 lines
Quoted 2 lines
Signed-off-by Tommi Rantala <[email protected]>---
Ion will be removed from the kernel soon but this seems like an ok bugfix.
Thanks!
ion is already gone. I am dropping this from linux-kselftest fixes now. This is also causing conflict with ion removal commit
thanks,
-- Shuah
PATCH 10/13 selftests: proc: fix warning: _GNU_SOURCE redefined
In reply to Tommi RantalaMakefile already contains -D_GNU_SOURCE, so we can remove it from the *.c files.
--- tools/testing/selftests/proc/proc-loadavg-001.c | 1 - tools/testing/selftests/proc/proc-self-syscall.c | 1 - tools/testing/selftests/proc/proc-uptime-002.c | 1 - 3 files changed, 3 deletions(-)
tools/testing/selftests/proc/proc-loadavg-001.c +0 -1
@@ -14,7 +14,6 @@* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /* Test that /proc/loadavg correctly reports last pid in pid namespace. */ -#define _GNU_SOURCE#include <errno.h> #include <sched.h> #include <sys/types.h>
tools/testing/selftests/proc/proc-self-syscall.c +0 -1
@@ -13,7 +13,6 @@* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define _GNU_SOURCE#include <unistd.h> #include <sys/syscall.h> #include <sys/types.h>
tools/testing/selftests/proc/proc-uptime-002.c +0 -1
@@ -15,7 +15,6 @@*/ // Test that values in /proc/uptime increment monotonically // while shifting across CPUs. -#define _GNU_SOURCE#undef NDEBUG#include <assert.h> #include <unistd.h>
Signature · 1 line
2.26.2
PATCH 11/13 selftests: core: use SKIP instead of XFAIL in close_range_test.c
In reply to Tommi RantalaXFAIL is gone since 9847d24af95c ("selftests/harness: Refactor XFAIL into SKIP"), use SKIP instead.
--- tools/testing/selftests/core/close_range_test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
tools/testing/selftests/core/close_range_test.c +4 -4
@@ -44,7 +44,7 @@ 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;
@@ -52,7 +52,7 @@ TEST(close_range) 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 ));
@@ -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;
@@ -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;
Signature · 1 line
2.26.2
Re: [PATCH 11/13] selftests: core: use SKIP instead of XFAIL in close_range_test.c
Quoted 5 lines · Tommi Rantala
XFAIL is gone since
9847d24af95c("selftests/harness: Refactor XFAIL into SKIP"), use SKIP instead.Fixes 9847d24af95c ("selftests/harness: Refactor XFAIL into SKIP")Signed-off-by Tommi Rantala <[email protected]>
Signature · 1 line
Kees Cook
Re: [PATCH 11/13] selftests: core: use SKIP instead of XFAIL in close_range_test.c
In reply to Tommi RantalaQuoted 6 lines · Tommi Rantala
XFAIL is gone since
9847d24af95c("selftests/harness: Refactor XFAIL into SKIP"), use SKIP instead.Fixes 9847d24af95c ("selftests/harness: Refactor XFAIL into SKIP")Signed-off-by Tommi Rantala <[email protected]>---
Thanks!
PATCH 12/13 selftests: clone3: use SKIP instead of XFAIL
In reply to Tommi RantalaXFAIL is gone since 9847d24af95c ("selftests/harness: Refactor XFAIL into SKIP"), use SKIP instead.
--- tools/testing/selftests/clone3/clone3_cap_checkpoint_restore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/clone3/clone3_cap_checkpoint_restore.c +1 -1
@@ -145,7 +145,7 @@ TEST(clone3_cap_checkpoint_restore)test_clone3_supported (); EXPECT_EQ(getuid(), 0) -XFAIL (return,"Skipping all tests as non-root\n" ); +SKIP (return,"Skipping all tests as non-root" );memset (&set_tid,0 ,sizeof (set_tid));
Signature · 1 line
2.26.2
Re: [PATCH 12/13] selftests: clone3: use SKIP instead of XFAIL
Quoted 5 lines · Tommi Rantala
XFAIL is gone since
9847d24af95c("selftests/harness: Refactor XFAIL into SKIP"), use SKIP instead.Fixes 9847d24af95c ("selftests/harness: Refactor XFAIL into SKIP")Signed-off-by Tommi Rantala <[email protected]>
Signature · 1 line
Kees Cook
Re: [PATCH 12/13] selftests: clone3: use SKIP instead of XFAIL
In reply to Tommi RantalaQuoted 6 lines · Tommi Rantala
XFAIL is gone since
9847d24af95c("selftests/harness: Refactor XFAIL into SKIP"), use SKIP instead.Fixes 9847d24af95c ("selftests/harness: Refactor XFAIL into SKIP")Signed-off-by Tommi Rantala <[email protected]>---
Thanks!
PATCH 13/13 selftests: binderfs: use SKIP instead of XFAIL
In reply to Tommi RantalaXFAIL is gone since 9847d24af95c ("selftests/harness: Refactor XFAIL into SKIP"), use SKIP instead.
--- .../selftests/filesystems/binderfs/binderfs_test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
tools/testing/selftests/filesystems/binderfs/binderfs_test.c +4 -4
@@ -74,7 +74,7 @@ static int __do_binderfs_test(struct __test_metadata *_metadata) ret =mount (NULL , binderfs_mntpt,"binder" ,0 ,0 ); EXPECT_EQ(ret, 0) {if (errno ==ENODEV ) - XFAIL(goto out, "binderfs missing"); + SKIP(goto out, "binderfs missing");TH_LOG ("%s - Failed to mount binderfs" ,strerror (errno)); goto rmdir; }
@@ -475,10 +475,10 @@ TEST(binderfs_stress)TEST (binderfs_test_privileged) {if (geteuid () !=0 ) -XFAIL (return,"Tests are not run as root. Skipping privileged tests" ); +SKIP (return,"Tests are not run as root. Skipping privileged tests" );if (__do_binderfs_test (_metadata)) -XFAIL (return,"The Android binderfs filesystem is not available" ); +SKIP (return,"The Android binderfs filesystem is not available" ); }TEST (binderfs_test_unprivileged)
@@ -511,7 +511,7 @@ TEST(binderfs_test_unprivileged) ret =wait_for_pid (pid);if (ret) {if (ret ==2 ) -XFAIL (return,"The Android binderfs filesystem is not available" ); +SKIP (return,"The Android binderfs filesystem is not available" ); ASSERT_EQ(ret, 0) {TH_LOG ("wait_for_pid() failed" ); }
Signature · 1 line
2.26.2
Re: [PATCH 13/13] selftests: binderfs: use SKIP instead of XFAIL
Quoted 5 lines · Tommi Rantala
XFAIL is gone since
9847d24af95c("selftests/harness: Refactor XFAIL into SKIP"), use SKIP instead.Fixes 9847d24af95c ("selftests/harness: Refactor XFAIL into SKIP")Signed-off-by Tommi Rantala <[email protected]>
Signature · 1 line
Kees Cook
Re: [PATCH 13/13] selftests: binderfs: use SKIP instead of XFAIL
In reply to Tommi RantalaQuoted 6 lines · Tommi Rantala
XFAIL is gone since
9847d24af95c("selftests/harness: Refactor XFAIL into SKIP"), use SKIP instead.Fixes 9847d24af95c ("selftests/harness: Refactor XFAIL into SKIP")Signed-off-by Tommi Rantala <[email protected]>---
Thanks!
Quoted 17 lines · Tommi Rantala
Hi, small fixes to issues I hit with selftests.
Tommi Rantala (13):
selftests: filter kselftest headers from command in lib.mk
selftests: pidfd: fix compilation errors due towait.h
selftests: add vmaccess to .gitignore selftests/harness: prettify SKIP message whitespace again
selftests: pidfd: useksft_test_result_skip()when skipping test
selftests: pidfd: skip test onkcmp()ENOSYS
selftests: pidfd: addCONFIG_CHECKPOINT_RESTORE=yto config
selftests: pidfd: drop needlesslinux/kcmp.hinclusion in
pidfd_setns_test.c
selftests: android: fix multiple definition ofsock_name
selftests: proc: fix warning:_GNU_SOURCEredefined
selftests: core: use SKIP instead of XFAIL inclose_range_test.c
selftests: clone3: use SKIP instead of XFAIL
selftests: binderfs: use SKIP instead of XFAIL
This mostly deals with stuff I maintain but it can go via the selftest tree, thanks!
Christian
Shuah Khan
maintainerQuoted 28 lines · Tommi Rantala
Hi, small fixes to issues I hit with selftests.
Tommi Rantala (13):
selftests: filter kselftest headers from command in lib.mk
selftests: pidfd: fix compilation errors due towait.h
selftests: add vmaccess to .gitignore selftests/harness: prettify SKIP message whitespace again
selftests: pidfd: useksft_test_result_skip()when skipping test
selftests: pidfd: skip test onkcmp()ENOSYS
selftests: pidfd: addCONFIG_CHECKPOINT_RESTORE=yto config
selftests: pidfd: drop needlesslinux/kcmp.hinclusion in
pidfd_setns_test.c
selftests: android: fix multiple definition ofsock_name
selftests: proc: fix warning:_GNU_SOURCEredefined
selftests: core: use SKIP instead of XFAIL inclose_range_test.c
selftests: clone3: use SKIP instead of XFAIL
selftests: binderfs: use SKIP instead of XFAILtools/testing/selftests/android/ion/ipcsocket.c | 1 + tools/testing/selftests/android/ion/ipcsocket.h | 2 -- .../selftests/clone3/clone3_cap_checkpoint_restore.c | 2 +- tools/testing/selftests/core/close_range_test.c | 8 ++++---- .../selftests/filesystems/binderfs/binderfs_test.c | 8 ++++---- tools/testing/selftests/kselftest_harness.h | 2 +- tools/testing/selftests/lib.mk | 2 +- tools/testing/selftests/pidfd/config | 1 + tools/testing/selftests/pidfd/pidfd_getfd_test.c | 5 ++++- tools/testing/selftests/pidfd/pidfd_open_test.c | 1 -
Quoted 9 lines
tools/testing/selftests/pidfd/pidfd_poll_test.c | 1 - tools/testing/selftests/pidfd/pidfd_setns_test.c | 1 - tools/testing/selftests/pidfd/pidfd_test.c | 2 +- tools/testing/selftests/proc/proc-loadavg-001.c | 1 - tools/testing/selftests/proc/proc-self-syscall.c | 1 - tools/testing/selftests/proc/proc-uptime-002.c | 1 - tools/testing/selftests/ptrace/.gitignore | 1 + 17 files changed, 19 insertions(+), 21 deletions(-)
Thanks for fixing these.
Applied all except 03/13 which is already fixed.
thanks,
-- Shuah
Quoted 17 lines · Tommi Rantala
Hi, small fixes to issues I hit with selftests.
Tommi Rantala (13):
selftests: filter kselftest headers from command in lib.mk
selftests: pidfd: fix compilation errors due towait.h
selftests: add vmaccess to .gitignore selftests/harness: prettify SKIP message whitespace again
selftests: pidfd: useksft_test_result_skip()when skipping test
selftests: pidfd: skip test onkcmp()ENOSYS
selftests: pidfd: addCONFIG_CHECKPOINT_RESTORE=yto config
selftests: pidfd: drop needlesslinux/kcmp.hinclusion in
pidfd_setns_test.c
selftests: android: fix multiple definition ofsock_name
selftests: proc: fix warning:_GNU_SOURCEredefined
selftests: core: use SKIP instead of XFAIL inclose_range_test.c
selftests: clone3: use SKIP instead of XFAIL
selftests: binderfs: use SKIP instead of XFAIL
This series doesn't seem to have been picked up?
cheers
Shuah Khan
maintainerQuoted 19 lines · Michael Ellerman
Quoted 17 lines · Tommi Rantala
Hi, small fixes to issues I hit with selftests.
Tommi Rantala (13):
selftests: filter kselftest headers from command in lib.mk
selftests: pidfd: fix compilation errors due towait.h
selftests: add vmaccess to .gitignore selftests/harness: prettify SKIP message whitespace again
selftests: pidfd: useksft_test_result_skip()when skipping test
selftests: pidfd: skip test onkcmp()ENOSYS
selftests: pidfd: addCONFIG_CHECKPOINT_RESTORE=yto config
selftests: pidfd: drop needlesslinux/kcmp.hinclusion in
pidfd_setns_test.c
selftests: android: fix multiple definition ofsock_name
selftests: proc: fix warning:_GNU_SOURCEredefined
selftests: core: use SKIP instead of XFAIL inclose_range_test.c
selftests: clone3: use SKIP instead of XFAIL
selftests: binderfs: use SKIP instead of XFAIL
Quoted 4 lines
This series doesn't seem to have been picked up?
cheers
I applied them to linux-kselftest fixes yesterday.
thanks,
-- Shuah
Quoted 20 lines · Shuah Khan
Quoted 19 lines · Michael Ellerman
Quoted 17 lines · Tommi Rantala
Hi, small fixes to issues I hit with selftests.
Tommi Rantala (13):
selftests: filter kselftest headers from command in lib.mk
selftests: pidfd: fix compilation errors due towait.h
selftests: add vmaccess to .gitignore selftests/harness: prettify SKIP message whitespace again
selftests: pidfd: useksft_test_result_skip()when skipping test
selftests: pidfd: skip test onkcmp()ENOSYS
selftests: pidfd: addCONFIG_CHECKPOINT_RESTORE=yto config
selftests: pidfd: drop needlesslinux/kcmp.hinclusion in
pidfd_setns_test.c
selftests: android: fix multiple definition ofsock_name
selftests: proc: fix warning:_GNU_SOURCEredefined
selftests: core: use SKIP instead of XFAIL inclose_range_test.c
selftests: clone3: use SKIP instead of XFAIL
selftests: binderfs: use SKIP instead of XFAIL
Quoted 4 lines
Quoted 2 lines
This series doesn't seem to have been picked up?
I applied them to linux-kselftest fixes yesterday.
Thanks.
cheers