Kselftest update for Linux 5.7-rc3
Subsystems (4)
Shuah Khan
maintainerHi Linus,
Please pull the following Kselftest update for Linux 5.7-rc3.
This kselftest update for Linux 5.7-rc3 consists of fixes to runner scripts and individual test run-time bugs. Includes fixes to tpm2 and memfd test run-time regressions.
diff is attached.
thanks,
-- Shuah
----------------------------------------------------------------
The following changes since commit 8f3d9f354286745c751374f5f1fcafee6b3f3136:
Linux 5.7-rc1 (2020-04-12 12:35:55 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
tags/linux-kselftest-5.7-rc3
for you to fetch changes up to b87080eab4c1377706c113fc9c0157f19ea8fed1:
selftests/ipc: Fix test failure seen after initial test run
(2020-04-14 10:24:28 -0600)
----------------------------------------------------------------
linux-kselftest-5.7-rc3
This kselftest update for Linux 5.7-rc3 consists of fixes to runner scripts and individual test run-time bugs. Includes fixes to tpm2 and memfd test run-time regressions.
----------------------------------------------------------------
Andrea Righi (1):
kselftest/runner: allow to properly deliver signals to tests
Colin Ian King (1):
selftests/harness: fix spelling mistake "SIGARLM" -> "SIGALRM"
Jarkko Sakkinen (1):
Revert "Kernel selftests: tpm2: check for tpm support"
Sandipan Das (2):
selftests: vm: Do not override definition of ARCH
selftests: vm: Fix 64-bit test builds for powerpc64le
Shuah Khan (1):
selftests: Fix memfd test run-time regression
Thadeu Lima de Souza Cascardo (1):
selftests/seccomp: allow clock_nanosleep instead of nanosleep
Tyler Hicks (1):
selftests/ipc: Fix test failure seen after initial test run
Xiao Yang (1):
selftests/ftrace: Add CONFIG_SAMPLE_FTRACE_DIRECT=m kconfig
tools/testing/selftests/ftrace/config | 1 + tools/testing/selftests/ipc/msgque.c | 2 +- tools/testing/selftests/kselftest/runner.sh | 2 +- tools/testing/selftests/kselftest_harness.h | 6 +++--- tools/testing/selftests/memfd/Makefile | 3 ++- tools/testing/selftests/seccomp/seccomp_bpf.c | 14 ++++++++------ tools/testing/selftests/tpm2/test_smoke.sh | 13 ++----------- tools/testing/selftests/tpm2/test_space.sh | 9 +-------- tools/testing/selftests/vm/Makefile | 4 ++-- tools/testing/selftests/vm/run_vmtests | 2 +- 10 files changed, 22 insertions(+), 34 deletions(-)
----------------------------------------------------------------
tools/testing/selftests/ftrace/config +1 -0
@@ -11,5 +11,6 @@ CONFIG_PREEMPTIRQ_DELAY_TEST=m CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_SAMPLES=y +CONFIG_SAMPLE_FTRACE_DIRECT=m CONFIG_SAMPLE_TRACE_PRINTK=m CONFIG_KALLSYMS_ALL=y
tools/testing/selftests/ipc/msgque.c +1 -1
@@ -137,7 +137,7 @@ int dump_queue(struct msgque_data *msgque)for (kern_id =0 ; kern_id <256 ; kern_id++) { ret =msgctl (kern_id,MSG_STAT , &ds);if (ret <0 ) { -if (errno == -EINVAL ) +if (errno ==EINVAL )continue ;printf ("Failed to get stats for IPC queue with id %d\n" , kern_id);
tools/testing/selftests/kselftest/runner.sh +1 -1
@@ -33,7 +33,7 @@ tap_timeout() { # Make sure tests will time out if utility is available. if [ -x /usr/bin/timeout ] ; then - /usr/bin/timeout "$kselftest_timeout" "$1" + /usr/bin/timeout --foreground "$kselftest_timeout" "$1" else "$1" fi
tools/testing/selftests/kselftest_harness.h +3 -3
@@ -705,7 +705,7 @@ static void __timeout_handler(int sig, siginfo_t *info, void *ucontext)/* Sanity check handler execution environment. */ if (!t) {fprintf (TH_LOG_STREAM , -"no active test in SIGARLM handler!?\n" ); +"no active test in SIGALRM handler!?\n" );abort (); }if (sig !=SIGALRM || sig != info->si_signo) {
@@ -731,7 +731,7 @@ void __wait_for_test(struct __test_metadata *t)if (sigaction (SIGALRM , &action, &saved_action)) { t->passed =0 ;fprintf (TH_LOG_STREAM , -"%s: unable to install SIGARLM handler\n" , +"%s: unable to install SIGALRM handler\n" , t->name);return ; }
@@ -743,7 +743,7 @@ void __wait_for_test(struct __test_metadata *t)if (sigaction (SIGALRM , &saved_action,NULL )) { t->passed =0 ;fprintf (TH_LOG_STREAM , -"%s: unable to uninstall SIGARLM handler\n" , +"%s: unable to uninstall SIGALRM handler\n" , t->name);return ; }
tools/testing/selftests/memfd/Makefile +2 -1
@@ -4,8 +4,9 @@ CFLAGS += -I../../../../include/uapi/ CFLAGS += -I../../../../include/ CFLAGS += -I../../../../usr/include/ -TEST_GEN_PROGS := memfd_test fuse_test fuse_mnt +TEST_GEN_PROGS := memfd_test TEST_PROGS := run_fuse_test.sh run_hugetlbfs_test.sh +TEST_GEN_FILES := fuse_test fuse_mnt fuse_mnt.o: CFLAGS += $(shell pkg-config fuse --cflags)
tools/testing/selftests/seccomp/seccomp_bpf.c +8 -6
@@ -2803,12 +2803,13 @@ TEST(syscall_restart) offsetof(struct seccomp_data, nr)),#ifdef __NR_sigreturn -BPF_JUMP (BPF_JMP |BPF_JEQ |BPF_K , __NR_sigreturn,6 ,0 ), +BPF_JUMP (BPF_JMP |BPF_JEQ |BPF_K , __NR_sigreturn,7 ,0 ), #endif -BPF_JUMP (BPF_JMP |BPF_JEQ |BPF_K , __NR_read,5 ,0 ), -BPF_JUMP (BPF_JMP |BPF_JEQ |BPF_K , __NR_exit,4 ,0 ), -BPF_JUMP (BPF_JMP |BPF_JEQ |BPF_K , __NR_rt_sigreturn,3 ,0 ), -BPF_JUMP (BPF_JMP |BPF_JEQ |BPF_K , __NR_nanosleep,4 ,0 ), +BPF_JUMP (BPF_JMP |BPF_JEQ |BPF_K , __NR_read,6 ,0 ), +BPF_JUMP (BPF_JMP |BPF_JEQ |BPF_K , __NR_exit,5 ,0 ), +BPF_JUMP (BPF_JMP |BPF_JEQ |BPF_K , __NR_rt_sigreturn,4 ,0 ), +BPF_JUMP (BPF_JMP |BPF_JEQ |BPF_K , __NR_nanosleep,5 ,0 ), +BPF_JUMP (BPF_JMP |BPF_JEQ |BPF_K , __NR_clock_nanosleep,4 ,0 ), BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, __NR_restart_syscall, 4, 0),/* Allow __NR_write for easy logging. */
@@ -2895,7 +2896,8 @@ TEST(syscall_restart)ASSERT_EQ (PTRACE_EVENT_SECCOMP , (status >>16 ));ASSERT_EQ (0 ,ptrace (PTRACE_GETEVENTMSG , child_pid,NULL , &msg));ASSERT_EQ (0x100 , msg); -EXPECT_EQ (__NR_nanosleep,get_syscall (_metadata, child_pid)); + ret =get_syscall (_metadata, child_pid); +EXPECT_TRUE (ret == __NR_nanosleep || ret == __NR_clock_nanosleep);/* Might as well check siginfo for sanity while we're here. */ ASSERT_EQ (0 ,ptrace (PTRACE_GETSIGINFO , child_pid,NULL , &info));
tools/testing/selftests/tpm2/test_smoke.sh +2 -11
@@ -1,17 +1,8 @@ #!/bin/bash # SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) -self.flags = flags -# Kselftest framework requirement - SKIP code is 4. -ksft_skip=4 - - -if [ -f /dev/tpm0 ] ; then - python -m unittest -v tpm2_tests.SmokeTest - python -m unittest -v tpm2_tests.AsyncTest -else - exit $ksft_skip -fi +python -m unittest -v tpm2_tests.SmokeTest +python -m unittest -v tpm2_tests.AsyncTest CLEAR_CMD=$(which tpm2_clear) if [ -n $CLEAR_CMD ]; then
tools/testing/selftests/tpm2/test_space.sh +1 -8
@@ -1,11 +1,4 @@ #!/bin/bash # SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) -# Kselftest framework requirement - SKIP code is 4. -ksft_skip=4 - -if [ -f /dev/tpmrm0 ] ; then - python -m unittest -v tpm2_tests.SpaceTest -else - exit $ksft_skip -fi +python -m unittest -v tpm2_tests.SpaceTest
tools/testing/selftests/vm/Makefile +2 -2
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 # Makefile for vm selftests uname_M := $(shell uname -m 2>/dev/null || echo not) -ARCH ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/') +MACHINE ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/') CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS) LDLIBS = -lrt
@@ -20,7 +20,7 @@ TEST_GEN_FILES += thuge-gen TEST_GEN_FILES += transhuge-stress TEST_GEN_FILES += userfaultfd -ifneq (,$(filter $(ARCH),arm64 ia64 mips64 parisc64 ppc64 riscv64 s390x sh64 sparc64 x86_64)) +ifneq (,$(filter $(MACHINE),arm64 ia64 mips64 parisc64 ppc64 ppc64le riscv64 s390x sh64 sparc64 x86_64)) TEST_GEN_FILES += va_128TBswitch TEST_GEN_FILES += virtual_address_range TEST_GEN_FILES += write_to_hugetlbfs
tools/testing/selftests/vm/run_vmtests +1 -1
@@ -59,7 +59,7 @@ else fi #filter 64bit architectures -ARCH64STR="arm64 ia64 mips64 parisc64 ppc64 riscv64 s390x sh64 sparc64 x86_64" +ARCH64STR="arm64 ia64 mips64 parisc64 ppc64 ppc64le riscv64 s390x sh64 sparc64 x86_64" if [ -z $ARCH ]; then ARCH=`uname -m 2>/dev/null | sed -e 's/aarch64.*/arm64/'` fi
The pull request you sent on Wed, 22 Apr 2020 10:57:31 -0600:
The pull request you sent on Wed, 22 Apr 2020 10:57:31 -0600:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftesttags/linux-kselftest-5.7-rc3
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/c578ddb39e565139897124e74e5a43e56538cb33
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.wiki.kernel.org/userdoc/prtracker