Hi,
In the net-next tree commit v6.8-rc7-2348-g75c2946db360, vannila except for this minor mod
to selftest suite:
----------------------------------------------------------------------------------------
marvin@defiant:~/linux/kernel/net-next$ git diff
diff --git a/tools/testing/selftests/breakpoints/Makefile b/tools/testing/selftests/breakpoints/Makefile
index 9ec2c78de8ca..76a0e3837136 100644
--- a/tools/testing/selftests/breakpoints/Makefile
+++ b/tools/testing/selftests/breakpoints/Makefile
@@ -3,7 +3,7 @@
uname_M := $(shell uname -m 2>/dev/null || echo not)
ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/)
-TEST_GEN_PROGS := step_after_suspend_test
+# TEST_GEN_PROGS := step_after_suspend_test
ifeq ($(ARCH),x86)
TEST_GEN_PROGS += breakpoint_test
marvin@defiant:~/linux/kernel/net-next$
----------------------------------------------------------------------------------------
there seems to be a bug.
The symptom is a hang in forever loop in ./pidfd_setns_test :
pidfd_send_signal(18, SIGKILL, NULL, 0) = 0
pidfd_send_signal(18, SIGKILL, NULL, 0) = 0
pidfd_send_signal(18, SIGKILL, NULL, 0) = 0
pidfd_send_signal(18, SIGKILL, NULL, 0) = 0
pidfd_send_signal(18, SIGKILL, NULL, 0) = 0
pidfd_send_signal(18, SIGKILL, NULL, 0) = 0
pidfd_send_signal(18, SIGKILL, NULL, 0) = 0
pidfd_send_signal(18, SIGKILL, NULL, 0) = 0
pidfd_send_signal(18, SIGKILL, NULL, 0) = 0
pidfd_send_signal(18, SIGKILL, NULL, 0) = 0
pidfd_send_signal(18, SIGKILL, NULL, 0) = 0
pidfd_send_signal(18, SIGKILL, NULL, 0) = 0
pidfd_send_signal(18, SIGKILL, NULL, 0) = 0
pidfd_send_signal(18, SIGKILL, NULL, 0) = 0
pidfd_send_signal(18, SIGKILL, NULL, 0) = 0
pidfd_send_signal(18, SIGKILL, NULL, 0) = 0
pidfd_send_signal(18, SIGKILL, NULL, 0) = 0
pidfd_send_signal(18, SIGKILL, NULL, 0) = 0
pidfd_send_signal(18, SIGKILL, NULL, 0) = 0
pidfd_send_signal(18, SIGKILL, NULL, 0) = 0
.
.
.
This could happen here:
FIXTURE_TEARDOWN(current_nsset)
{
int i;
→ ASSERT_EQ(sys_pidfd_send_signal(self->child_pidfd1,
SIGKILL, NULL, 0), 0);
→ ASSERT_EQ(sys_pidfd_send_signal(self->child_pidfd2,
SIGKILL, NULL, 0), 0);
for (i = 0; i < PIDFD_NS_MAX; i++) {
if (self->nsfds[i] >= 0)
close(self->nsfds[i]);
if (self->child_nsfds1[i] >= 0)
close(self->child_nsfds1[i]);
if (self->child_nsfds2[i] >= 0)
close(self->child_nsfds2[i]);
}
if (self->child_pidfd1 >= 0)
EXPECT_EQ(0, close(self->child_pidfd1));
if (self->child_pidfd2 >= 0)
EXPECT_EQ(0, close(self->child_pidfd2));
ASSERT_EQ(sys_waitid(P_PID, self->child_pid_exited, WEXITED), 0);
ASSERT_EQ(sys_waitid(P_PID, self->child_pid1, WEXITED), 0);
ASSERT_EQ(sys_waitid(P_PID, self->child_pid2, WEXITED), 0);
}
The testsuite output is this:
root@defiant:/home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd# ./pidfd_setns_test
TAP version 13
1..7
# Starting 7 tests from 2 test cases.
# RUN global.setns_einval ...
# OK global.setns_einval
ok 1 global.setns_einval
# RUN current_nsset.invalid_flags ...
# pidfd_setns_test.c:161:invalid_flags:Expected self->child_pid_exited (0) > 0 (0)
# OK current_nsset.invalid_flags
ok 2 current_nsset.invalid_flags
# RUN current_nsset.pidfd_exited_child ...
# pidfd_setns_test.c:161:pidfd_exited_child:Expected self->child_pid_exited (0) > 0 (0)
# OK current_nsset.pidfd_exited_child
ok 3 current_nsset.pidfd_exited_child
# RUN current_nsset.pidfd_incremental_setns ...
# pidfd_setns_test.c:161:pidfd_incremental_setns:Expected self->child_pid_exited (0) > 0 (0)
# pidfd_setns_test.c:408:pidfd_incremental_setns:Managed to correctly setns to user namespace of 1005687 via pidfd 18
# pidfd_setns_test.c:408:pidfd_incremental_setns:Managed to correctly setns to mnt namespace of 1005687 via pidfd 18
# pidfd_setns_test.c:408:pidfd_incremental_setns:Managed to correctly setns to pid namespace of 1005687 via pidfd 18
# pidfd_setns_test.c:408:pidfd_incremental_setns:Managed to correctly setns to uts namespace of 1005687 via pidfd 18
# pidfd_setns_test.c:408:pidfd_incremental_setns:Managed to correctly setns to ipc namespace of 1005687 via pidfd 18
# pidfd_setns_test.c:408:pidfd_incremental_setns:Managed to correctly setns to net namespace of 1005687 via pidfd 18
# pidfd_setns_test.c:408:pidfd_incremental_setns:Managed to correctly setns to cgroup namespace of 1005687 via pidfd 18
# pidfd_setns_test.c:408:pidfd_incremental_setns:Managed to correctly setns to pid_for_children namespace of 1005687 via pidfd 18
# pidfd_setns_test.c:391:pidfd_incremental_setns:Expected setns(self->child_pidfd1, info->flag) (-1) == 0 (0)
# pidfd_setns_test.c:392:pidfd_incremental_setns:Too many users - Failed to setns to time namespace of 1005687 via pidfd 18
# pidfd_incremental_setns: Test terminated by timeout
# FAIL current_nsset.pidfd_incremental_setns
not ok 4 current_nsset.pidfd_incremental_setns
# RUN current_nsset.nsfd_incremental_setns ...
# pidfd_setns_test.c:161:nsfd_incremental_setns:Expected self->child_pid_exited (0) > 0 (0)
# pidfd_setns_test.c:444:nsfd_incremental_setns:Managed to correctly setns to user namespace of 1005695 via nsfd 17
# pidfd_setns_test.c:444:nsfd_incremental_setns:Managed to correctly setns to mnt namespace of 1005695 via nsfd 22
# pidfd_setns_test.c:444:nsfd_incremental_setns:Managed to correctly setns to pid namespace of 1005695 via nsfd 25
# pidfd_setns_test.c:444:nsfd_incremental_setns:Managed to correctly setns to uts namespace of 1005695 via nsfd 28
# pidfd_setns_test.c:444:nsfd_incremental_setns:Managed to correctly setns to ipc namespace of 1005695 via nsfd 31
# pidfd_setns_test.c:444:nsfd_incremental_setns:Managed to correctly setns to net namespace of 1005695 via nsfd 34
# pidfd_setns_test.c:444:nsfd_incremental_setns:Managed to correctly setns to cgroup namespace of 1005695 via nsfd 37
# pidfd_setns_test.c:444:nsfd_incremental_setns:Managed to correctly setns to pid_for_children namespace of 1005695 via nsfd 40
# pidfd_setns_test.c:427:nsfd_incremental_setns:Expected setns(self->child_nsfds1[i], info->flag) (-1) == 0 (0)
# pidfd_setns_test.c:428:nsfd_incremental_setns:Too many users - Failed to setns to time namespace of 1005695 via nsfd 43
# nsfd_incremental_setns: Test terminated by timeout
# FAIL current_nsset.nsfd_incremental_setns
not ok 5 current_nsset.nsfd_incremental_setns
# RUN current_nsset.pidfd_one_shot_setns ...
# pidfd_setns_test.c:161:pidfd_one_shot_setns:Expected self->child_pid_exited (0) > 0 (0)
# pidfd_setns_test.c:462:pidfd_one_shot_setns:Adding user namespace of 1005710 to list of namespaces to attach to
# pidfd_setns_test.c:462:pidfd_one_shot_setns:Adding mnt namespace of 1005710 to list of namespaces to attach to
# pidfd_setns_test.c:462:pidfd_one_shot_setns:Adding pid namespace of 1005710 to list of namespaces to attach to
# pidfd_setns_test.c:462:pidfd_one_shot_setns:Adding uts namespace of 1005710 to list of namespaces to attach to
# pidfd_setns_test.c:462:pidfd_one_shot_setns:Adding ipc namespace of 1005710 to list of namespaces to attach to
# pidfd_setns_test.c:462:pidfd_one_shot_setns:Adding net namespace of 1005710 to list of namespaces to attach to
# pidfd_setns_test.c:462:pidfd_one_shot_setns:Adding cgroup namespace of 1005710 to list of namespaces to attach to
# pidfd_setns_test.c:462:pidfd_one_shot_setns:Adding pid_for_children namespace of 1005710 to list of namespaces to attach to
# pidfd_setns_test.c:462:pidfd_one_shot_setns:Adding time namespace of 1005710 to list of namespaces to attach to
# pidfd_setns_test.c:466:pidfd_one_shot_setns:Expected setns(self->child_pidfd1, flags) (-1) == 0 (0)
# pidfd_setns_test.c:467:pidfd_one_shot_setns:Too many users - Failed to setns to namespaces of 1005710
# pidfd_one_shot_setns: Test terminated by timeout
# FAIL current_nsset.pidfd_one_shot_setns
not ok 6 current_nsset.pidfd_one_shot_setns
# RUN current_nsset.no_foul_play ...
# pidfd_setns_test.c:161:no_foul_play:Expected self->child_pid_exited (0) > 0 (0)
# pidfd_setns_test.c:506:no_foul_play:Adding user namespace of 1005745 to list of namespaces to attach to
# pidfd_setns_test.c:506:no_foul_play:Adding mnt namespace of 1005745 to list of namespaces to attach to
# pidfd_setns_test.c:506:no_foul_play:Adding pid namespace of 1005745 to list of namespaces to attach to
# pidfd_setns_test.c:506:no_foul_play:Adding uts namespace of 1005745 to list of namespaces to attach to
# pidfd_setns_test.c:506:no_foul_play:Adding ipc namespace of 1005745 to list of namespaces to attach to
# pidfd_setns_test.c:506:no_foul_play:Adding net namespace of 1005745 to list of namespaces to attach to
# pidfd_setns_test.c:506:no_foul_play:Adding cgroup namespace of 1005745 to list of namespaces to attach to
# pidfd_setns_test.c:506:no_foul_play:Adding time namespace of 1005745 to list of namespaces to attach to
# pidfd_setns_test.c:510:no_foul_play:Expected setns(self->child_pidfd1, flags) (-1) == 0 (0)
# pidfd_setns_test.c:511:no_foul_play:Too many users - Failed to setns to namespaces of 1005745 vid pidfd 18
# no_foul_play: Test terminated by timeout
# FAIL current_nsset.no_foul_play
not ok 7 current_nsset.no_foul_play
# FAILED: 3 / 7 tests passed.
# Totals: pass:3 fail:4 xfail:0 xpass:0 skip:0 error:0
root@defiant:/home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd#
The main selftest thread is still hanging with total output of:
make[3]: Entering directory '/home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd'
TAP version 13
1..7
# timeout set to 45
# selftests: pidfd: pidfd_test
# TAP version 13
# 1..8
# # Parent: pid: 958028
# # Parent: Waiting for Child (958029) to complete.
# # Child (pidfd): starting. pid 958029 tid 958029
# # Child Thread: starting. pid 958029 tid 958030 ; and sleeping
# # Child Thread: doing exec of sleep
# # Time waited for child: 3
# ok 1 pidfd_poll check for premature notification on child thread exec test: Passed
# # Parent: pid: 958028
# # Parent: Waiting for Child (958031) to complete.
# # Child (pidfd): starting. pid 958031 tid 958031
# # Child Thread: starting. pid 958031 tid 958032 ; and sleeping
# # Child Thread: doing exec of sleep
# # Parent: Child process waited for.
# # Time waited for child: 3
# ok 2 pidfd_poll check for premature notification on child thread exec test: Passed
# # Parent: pid: 958028
# # Parent: Waiting for Child (958033) to complete.
# # Child: starting. pid 958033 tid 958033
# # Child Thread: starting. pid 958033 tid 958034 ; and sleeping
# # Child Thread: starting. pid 958033 tid 958035 ; and sleeping
# # # Child Thread: DONE. pid 958033 tid 958034
# Child Thread: DONE. pid 958033 tid 958035
# # Time since child exit: 3
# ok 3 pidfd_poll check for premature notification on non-emptygroup leader exit test: Passed
# # Parent: pid: 958028
# # Parent: Waiting for Child (958036) to complete.
# # Child: starting. pid 958036 tid 958036
# # Child Thread: starting. pid 958036 tid 958037 ; and sleeping
# # Child Thread: starting. pid 958036 tid 958038 ; and sleeping
# # Child Thread: DONE. pid 958036 tid 958037
# # Child Thread: DONE. pid 958036 tid 958038
# # Parent: Child process waited for.
# # Time since child exit: 3
# ok 4 pidfd_poll check for premature notification on non-emptygroup leader exit test: Passed
# ok 5 pidfd_send_signal check for support test: pidfd_send_signal() syscall is supported. Tests can be executed
# ok 6 pidfd_send_signal send SIGUSR1 test: Sent signal
# # waitpid WEXITSTATUS=0
# ok 7 pidfd_send_signal signal exited process test: Failed to send signal as expected
# # pid to recycle is 1000
# ok 8 # SKIP pidfd_send_signal signal recycled pid test: Skipping test
# # Totals: pass:7 fail:0 xfail:0 xpass:0 skip:1 error:0
ok 1 selftests: pidfd: pidfd_test
# timeout set to 45
# selftests: pidfd: pidfd_fdinfo_test
# TAP version 13
# 1..2
# # New child: 990827, fd: 5
# # New child: 990828, fd: 6
# # waitpid WEXITSTATUS=0
# # waitpid WEXITSTATUS=0
# ok 1 pidfd check for NSpid in fdinfo test: Passed
# # New child: 990830, fd: 5
# # waitpid WEXITSTATUS=0
# ok 2 pidfd check fdinfo for dead process test: Passed
# # Totals: pass:2 fail:0 xfail:0 xpass:0 skip:0 error:0
ok 2 selftests: pidfd: pidfd_fdinfo_test
# timeout set to 45
# selftests: pidfd: pidfd_open_test
# 1..3
# ok 1 do not allow invalid pid test: passed
# ok 2 do not allow invalid flag test: passed
# ok 3 open a new pidfd test: passed
# # pidfd 5 refers to process with pid 990848
# # Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0
ok 3 selftests: pidfd: pidfd_open_test
# timeout set to 45
# selftests: pidfd: pidfd_poll_test
# # running pidfd poll test for 10000 iterations
# ok 1 pidfd poll test: pass
# # Planned tests != run tests (0 != 1)
# # Totals: pass:1 fail:0 xfail:0 xpass:0 skip:0 error:0
ok 4 selftests: pidfd: pidfd_poll_test
# timeout set to 45
# selftests: pidfd: pidfd_wait
# TAP version 13
# 1..3
# # Starting 3 tests from 1 test cases.
# # RUN global.wait_simple ...
# # OK global.wait_simple
# ok 1 global.wait_simple
# # RUN global.wait_states ...
# # OK global.wait_states
# ok 2 global.wait_states
# # RUN global.wait_nonblock ...
# # OK global.wait_nonblock
# ok 3 global.wait_nonblock
# # PASSED: 3 / 3 tests passed.
# # Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0
ok 5 selftests: pidfd: pidfd_wait
# timeout set to 45
# selftests: pidfd: pidfd_getfd_test
# TAP version 13
# 1..4
# # Starting 4 tests from 2 test cases.
# # RUN global.flags_set ...
# # OK global.flags_set
# ok 1 global.flags_set
# # RUN child.disable_ptrace ...
# # OK child.disable_ptrace
# ok 2 child.disable_ptrace
# # RUN child.fetch_fd ...
# # OK child.fetch_fd
# ok 3 child.fetch_fd
# # RUN child.test_unknown_fd ...
# # OK child.test_unknown_fd
# ok 4 child.test_unknown_fd
# # PASSED: 4 / 4 tests passed.
# # Totals: pass:4 fail:0 xfail:0 xpass:0 skip:0 error:0
ok 6 selftests: pidfd: pidfd_getfd_test
# timeout set to 45
# selftests: pidfd: pidfd_setns_test
# TAP version 13
# 1..7
# # Starting 7 tests from 2 test cases.
# # RUN global.setns_einval ...
# # OK global.setns_einval
# ok 1 global.setns_einval
# # RUN current_nsset.invalid_flags ...
# # pidfd_setns_test.c:161:invalid_flags:Expected self->child_pid_exited (0) > 0 (0)
# # OK current_nsset.invalid_flags
# ok 2 current_nsset.invalid_flags
# # RUN current_nsset.pidfd_exited_child ...
# # pidfd_setns_test.c:161:pidfd_exited_child:Expected self->child_pid_exited (0) > 0 (0)
# # OK current_nsset.pidfd_exited_child
# ok 3 current_nsset.pidfd_exited_child
# # RUN current_nsset.pidfd_incremental_setns ...
# # pidfd_setns_test.c:161:pidfd_incremental_setns:Expected self->child_pid_exited (0) > 0 (0)
# # pidfd_setns_test.c:408:pidfd_incremental_setns:Managed to correctly setns to user namespace of 1000951 via pidfd 20
# # pidfd_setns_test.c:408:pidfd_incremental_setns:Managed to correctly setns to mnt namespace of 1000951 via pidfd 20
# # pidfd_setns_test.c:408:pidfd_incremental_setns:Managed to correctly setns to pid namespace of 1000951 via pidfd 20
# # pidfd_setns_test.c:408:pidfd_incremental_setns:Managed to correctly setns to uts namespace of 1000951 via pidfd 20
# # pidfd_setns_test.c:408:pidfd_incremental_setns:Managed to correctly setns to ipc namespace of 1000951 via pidfd 20
# # pidfd_setns_test.c:408:pidfd_incremental_setns:Managed to correctly setns to net namespace of 1000951 via pidfd 20
# # pidfd_setns_test.c:408:pidfd_incremental_setns:Managed to correctly setns to cgroup namespace of 1000951 via pidfd 20
# # pidfd_setns_test.c:408:pidfd_incremental_setns:Managed to correctly setns to pid_for_children namespace of 1000951 via pidfd 20
# # pidfd_setns_test.c:391:pidfd_incremental_setns:Expected setns(self->child_pidfd1, info->flag) (-1) == 0 (0)
# # pidfd_setns_test.c:392:pidfd_incremental_setns:Too many users - Failed to setns to time namespace of 1000951 via pidfd 20
# # pidfd_incremental_setns: Test terminated by timeout
# # FAIL current_nsset.pidfd_incremental_setns
# not ok 4 current_nsset.pidfd_incremental_setns
# # RUN current_nsset.nsfd_incremental_setns ...
# # pidfd_setns_test.c:161:nsfd_incremental_setns:Expected self->child_pid_exited (0) > 0 (0)
# # pidfd_setns_test.c:444:nsfd_incremental_setns:Managed to correctly setns to user namespace of 1000958 via nsfd 19
# # pidfd_setns_test.c:444:nsfd_incremental_setns:Managed to correctly setns to mnt namespace of 1000958 via nsfd 24
# # pidfd_setns_test.c:444:nsfd_incremental_setns:Managed to correctly setns to pid namespace of 1000958 via nsfd 27
# # pidfd_setns_test.c:444:nsfd_incremental_setns:Managed to correctly setns to uts namespace of 1000958 via nsfd 30
# # pidfd_setns_test.c:444:nsfd_incremental_setns:Managed to correctly setns to ipc namespace of 1000958 via nsfd 33
# # pidfd_setns_test.c:444:nsfd_incremental_setns:Managed to correctly setns to net namespace of 1000958 via nsfd 36
# # pidfd_setns_test.c:444:nsfd_incremental_setns:Managed to correctly setns to cgroup namespace of 1000958 via nsfd 39
# # pidfd_setns_test.c:444:nsfd_incremental_setns:Managed to correctly setns to pid_for_children namespace of 1000958 via nsfd 42
# # pidfd_setns_test.c:427:nsfd_incremental_setns:Expected setns(self->child_nsfds1[i], info->flag) (-1) == 0 (0)
# # pidfd_setns_test.c:428:nsfd_incremental_setns:Too many users - Failed to setns to time namespace of 1000958 via nsfd 45
[HANG]
# ps -efwww
root 958005 66430 0 01:04 pts/2 00:00:00 make OUTPUT=/home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd -C pidfd run_tests SRC_PATH=/home/marvin/linux/kernel/net-next/tools/testing/selftests OBJ_PATH=/home/marvin/linux/kernel/net-next/tools/testing/selftests O=/home/marvin/linux/kernel/net-next
root 958006 958005 0 01:04 pts/2 00:00:00 /bin/sh -c BASE_DIR="/home/marvin/linux/kernel/net-next/tools/testing/selftests"; . /home/marvin/linux/kernel/net-next/tools/testing/selftests/kselftest/runner.sh; if [ "X" != "X" ]; then per_test_logging=1; fi; run_many /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_test /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_fdinfo_test /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_open_test /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_poll_test /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_wait /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_getfd_test /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_setns_test
root 1000927 958006 0 01:05 pts/2 00:00:00 /bin/sh -c BASE_DIR="/home/marvin/linux/kernel/net-next/tools/testing/selftests"; . /home/marvin/linux/kernel/net-next/tools/testing/selftests/kselftest/runner.sh; if [ "X" != "X" ]; then per_test_logging=1; fi; run_many /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_test /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_fdinfo_test /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_open_test /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_poll_test /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_wait /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_getfd_test /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_setns_test
root 1000928 1000927 0 01:05 pts/2 00:00:00 /bin/sh -c BASE_DIR="/home/marvin/linux/kernel/net-next/tools/testing/selftests"; . /home/marvin/linux/kernel/net-next/tools/testing/selftests/kselftest/runner.sh; if [ "X" != "X" ]; then per_test_logging=1; fi; run_many /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_test /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_fdinfo_test /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_open_test /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_poll_test /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_wait /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_getfd_test /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_setns_test
root 1000929 1000928 0 01:05 pts/2 00:00:00 /bin/sh -c BASE_DIR="/home/marvin/linux/kernel/net-next/tools/testing/selftests"; . /home/marvin/linux/kernel/net-next/tools/testing/selftests/kselftest/runner.sh; if [ "X" != "X" ]; then per_test_logging=1; fi; run_many /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_test /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_fdinfo_test /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_open_test /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_poll_test /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_wait /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_getfd_test /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_setns_test
root 1000932 1000929 0 01:05 pts/2 00:00:00 /bin/sh -c BASE_DIR="/home/marvin/linux/kernel/net-next/tools/testing/selftests"; . /home/marvin/linux/kernel/net-next/tools/testing/selftests/kselftest/runner.sh; if [ "X" != "X" ]; then per_test_logging=1; fi; run_many /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_test /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_fdinfo_test /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_open_test /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_poll_test /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_wait /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_getfd_test /home/marvin/linux/kernel/net-next/tools/testing/selftests/pidfd/pidfd_setns_test
root 1000934 1000932 0 01:05 pts/2 00:00:00 perl /home/marvin/linux/kernel/net-next/tools/testing/selftests/kselftest/prefix.pl
root 1000955 2931 0 01:05 pts/2 00:00:00 ./pidfd_setns_test
root 1000956 1000955 99 01:05 pts/2 13:20:17 ./pidfd_setns_test
root 1000957 1000956 0 01:05 pts/2 00:00:00 [pidfd_setns_tes] <defunct>
root 1000958 1000956 0 01:05 pts/2 00:00:00 [pidfd_setns_tes] <defunct>
root 1000959 1000956 0 01:05 pts/2 00:00:00 ./pidfd_setns_test
in a 99%CPU forever loop:
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
pidfd_send_signal(20, SIGKILL, NULL, 0) = 0
That's about all there is. Nothing interesting in /var/log/syslog or dmesg.
Hope this helps.
Best regards,
Mirsad Todorovac
Arch maintainers, please ack/review patches.
This is a resend of a series from Frank last year[1]. I worked in Rob's
review comments to unconditionally call unflatten_device_tree() and
fixup/audit calls to of_have_populated_dt() so that behavior doesn't
change.
I need this series so I can add DT based tests in the clk framework.
Either I can merge it through the clk tree once everyone is happy, or
Rob can merge it through the DT tree and provide some branch so I can
base clk patches on it.
Changes from v3 (https://lore.kernel.org/r/20240202195909.3458162-1-sboyd@kernel.org):
* Made OF_UNITTEST depend on OF_EARLY_FLATREE
* Made OF_EARLY_FLATREE depend on absence of arches that don't call
unflatten_device_tree()
* Added of_ prefix to dtb_ prefixed KUnit tests
* Picked up tags
Changes from v2 (https://lore.kernel.org/r/20240130004508.1700335-1-sboyd@kernel.org):
* Reorder patches to have OF changes largely first
* No longer modify initial_boot_params if ACPI=y
* Put arm64 patch back to v1
Changes from v1 (https://lore.kernel.org/r/20240112200750.4062441-1-sboyd@kernel.org):
* x86 patch included
* arm64 knocks out initial dtb if acpi is in use
* keep Kconfig hidden but def_bool enabled otherwise
Changes from Frank's series[1]:
* Add a DTB loaded kunit test
* Make of_have_populated_dt() return false if the DTB isn't from the
bootloader
* Architecture calls made unconditional so that a root node is always
made
Frank Rowand (2):
of: Create of_root if no dtb provided by firmware
of: unittest: treat missing of_root as error instead of fixing up
Stephen Boyd (5):
of: Always unflatten in unflatten_and_copy_device_tree()
um: Unconditionally call unflatten_device_tree()
x86/of: Unconditionally call unflatten_and_copy_device_tree()
arm64: Unconditionally call unflatten_device_tree()
of: Add KUnit test to confirm DTB is loaded
arch/arm64/kernel/setup.c | 3 +-
arch/um/kernel/dtb.c | 14 ++++----
arch/x86/kernel/devicetree.c | 24 +++++++-------
drivers/of/.kunitconfig | 3 ++
drivers/of/Kconfig | 14 ++++++--
drivers/of/Makefile | 4 ++-
drivers/of/empty_root.dts | 6 ++++
drivers/of/fdt.c | 64 +++++++++++++++++++++++++++---------
drivers/of/of_test.c | 57 ++++++++++++++++++++++++++++++++
drivers/of/platform.c | 3 --
drivers/of/unittest.c | 16 +++------
include/linux/of.h | 25 ++++++++------
12 files changed, 168 insertions(+), 65 deletions(-)
create mode 100644 drivers/of/.kunitconfig
create mode 100644 drivers/of/empty_root.dts
create mode 100644 drivers/of/of_test.c
[1] https://lore.kernel.org/r/20230317053415.2254616-1-frowand.list@gmail.com
base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d
--
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git
Hi all,
This series does a number of cleanups into resctrl_val() and
generalizes it by removing test name specific handling from the
function.
One of the changes improves MBA/MBM measurement by narrowing down the
period the resctrl FS derived memory bandwidth numbers are measured
over. My feel is it didn't cause noticeable difference into the numbers
because they're generally good anyway except for the small number of
outliers. To see the impact on outliers, I'd need to setup a test to
run large number of replications and do a statistical analysis, which
I've not spent my time on. Even without the statistical analysis, the
new way to measure seems obviously better and makes sense even if I
cannot see a major improvement with the setup I'm using.
This series has some conflicts with SNC series from Maciej and also
with the MBA/MBM series from Babu.
--
i.
Ilpo Järvinen (13):
selftests/resctrl: Convert get_mem_bw_imc() fd close to for loop
selftests/resctrl: Calculate resctrl FS derived mem bw over sleep(1)
only
selftests/resctrl: Consolidate get_domain_id() into resctrl_val()
selftests/resctrl: Use correct type for pids
selftests/resctrl: Cleanup bm_pid and ppid usage & limit scope
selftests/resctrl: Rename measure_vals() to measure_mem_bw_vals() &
document
selftests/resctrl: Add ->measure() callback to resctrl_val_param
selftests/resctrl: Add ->init() callback into resctrl_val_param
selftests/resctrl: Simplify bandwidth report type handling
selftests/resctrl: Make some strings passed to resctrlfs functions
const
selftests/resctrl: Convert ctrlgrp & mongrp to pointers
selftests/resctrl: Remove mongrp from MBA test
selftests/resctrl: Remove test name comparing from
write_bm_pid_to_resctrl()
tools/testing/selftests/resctrl/cache.c | 6 +-
tools/testing/selftests/resctrl/cat_test.c | 5 +-
tools/testing/selftests/resctrl/cmt_test.c | 21 +-
tools/testing/selftests/resctrl/mba_test.c | 34 ++-
tools/testing/selftests/resctrl/mbm_test.c | 33 ++-
tools/testing/selftests/resctrl/resctrl.h | 48 ++--
tools/testing/selftests/resctrl/resctrl_val.c | 269 ++++++------------
tools/testing/selftests/resctrl/resctrlfs.c | 55 ++--
8 files changed, 224 insertions(+), 247 deletions(-)
--
2.39.2
This is the 4th version of the patch set. In this patchset we aim to add
pstore multi-backend support then user can register more than one pstore
backend.
Changes in v4:
- Replace all rcu_read_lock with mutex
- Move bif_oops_buf, max_compressed_size and pstore_dumper into
pstore_info_list
- add a helper to do "is this name in the list" and a helper to do
"is this backend loaded"
- make comments in pstore_(un)register clearer
- return the max_seen ret or the first negative err in write_pmsg()
- add a /sys/module entry for the list of backends, comma separated
- Link to v3: https://lore.kernel.org/all/20230928024244.257687-1-xiangzao@linux.alibaba.…
Changes in v3:
- Fix ftrace.c build error
- Link to v2: https://lore.kernel.org/all/20240205122852.7069-1-xiangzao@linux.alibaba.co…
Changes in v2:
- pstore.backend no longer acts as "registered backend", but
"backends eligible for registration".
- drop subdir since it will break user space
- drop tty frontend since I haven't yet devised a satisfactory
implementation strategy
- Link to v1: https://lore.kernel.org/all/20230928024244.257687-1-xiangzao@linux.alibaba.…
Yuanhe Shu (4):
pstore: add multi-backend support
pstore: add a /sys/module entry for loaded backends
Documentation: adjust pstore backend related document
tools/testing: adjust pstore backend related selftest
Documentation/ABI/testing/pstore | 8 +-
.../admin-guide/kernel-parameters.txt | 4 +-
fs/pstore/ftrace.c | 27 +-
fs/pstore/inode.c | 57 +++-
fs/pstore/internal.h | 5 +-
fs/pstore/platform.c | 274 ++++++++++++------
fs/pstore/pmsg.c | 27 +-
include/linux/pstore.h | 23 ++
tools/testing/selftests/pstore/common_tests | 8 +-
.../selftests/pstore/pstore_post_reboot_tests | 67 +++--
tools/testing/selftests/pstore/pstore_tests | 2 +-
11 files changed, 358 insertions(+), 144 deletions(-)
--
2.39.3
On Thu, Mar 07 2024 at 13:34, Edward Liaw wrote:
>> Thanks for picking those up and moving them forward. Any particular
>> reason why you didn't pick up the full set?
>
> I didn't know enough about the code to resolve some of the merges in the
> full set. I had run into the issue with the test timer_distribution test
> hanging on the Android kernel and wanted to get that fixed first.
Fair enough. I've marked your series for my post merge window tree and
I'll have a look at the rest of the pile.
Thanks,
tglx
I'm sending some patches that were orignally in
https://lore.kernel.org/lkml/20230606132949.068951363@linutronix.de/
to prevent the timer_distribution test from hanging and also fix some
format inconsistencies.
Edward Liaw (3):
selftests/timers/posix_timers: Make signal distribution test less
fragile
selftests/timers/posix_timers: Use TAP reporting format
selftests/timers/posix_timers: Use llabs for long long
tools/testing/selftests/timers/posix_timers.c | 196 ++++++++----------
1 file changed, 89 insertions(+), 107 deletions(-)
--
2.44.0.rc1.240.g4c46232300-goog
This series enables support for the data processing extensions in the
newly released 2023 architecture, this is mainly support for 8 bit
floating point formats. Most of the extensions only introduce new
instructions and therefore only require hwcaps but there is a new EL0
visible control register FPMR used to control the 8 bit floating point
formats, we need to manage traps for this and context switch it.
Due to the very recently merged KVM changes for configuring guest
features via ID register writes only being available in -next the
support for guest state has been dropped for this version, the relevant
KVM interfaces should all be there after the merge window so the code
will be refreshed for the new interfaces then.
I've not added test coverage for ptrace, my plan is to add support to
fp-ptrace (which is now merged so I'll update after the merge window).
Signed-off-by: Mark Brown <broonie(a)kernel.org>
---
Changes in v5:
- Rebase onto v6.8-rc3.
- Use u64 rather than unsigned long for storing FPMR.
- Temporarily drop KVM guest support due to issues with KVM being a
moving target.
- Link to v4: https://lore.kernel.org/r/20240122-arm64-2023-dpisa-v4-0-776e094861df@kerne…
Changes in v4:
- Rebase onto v6.8-rc1.
- Move KVM support to the end of the series.
- Link to v3: https://lore.kernel.org/r/20231205-arm64-2023-dpisa-v3-0-dbcbcd867a7f@kerne…
Changes in v3:
- Rebase onto v6.7-rc3.
- Hook up traps for FPMR in emulate-nested.c.
- Link to v2: https://lore.kernel.org/r/20231114-arm64-2023-dpisa-v2-0-47251894f6a8@kerne…
Changes in v2:
- Rebase onto v6.7-rc1.
- Link to v1: https://lore.kernel.org/r/20231026-arm64-2023-dpisa-v1-0-8470dd989bb2@kerne…
---
Mark Brown (9):
arm64/cpufeature: Hook new identification registers up to cpufeature
arm64/fpsimd: Enable host kernel access to FPMR
arm64/fpsimd: Support FEAT_FPMR
arm64/signal: Add FPMR signal handling
arm64/ptrace: Expose FPMR via ptrace
arm64/hwcap: Define hwcaps for 2023 DPISA features
kselftest/arm64: Handle FPMR context in generic signal frame parser
kselftest/arm64: Add basic FPMR test
kselftest/arm64: Add 2023 DPISA hwcap test coverage
Documentation/arch/arm64/elf_hwcaps.rst | 49 +++++
arch/arm64/include/asm/cpu.h | 3 +
arch/arm64/include/asm/cpufeature.h | 5 +
arch/arm64/include/asm/fpsimd.h | 2 +
arch/arm64/include/asm/hwcap.h | 15 ++
arch/arm64/include/asm/kvm_arm.h | 2 +-
arch/arm64/include/asm/kvm_host.h | 1 +
arch/arm64/include/asm/processor.h | 4 +
arch/arm64/include/uapi/asm/hwcap.h | 15 ++
arch/arm64/include/uapi/asm/sigcontext.h | 8 +
arch/arm64/kernel/cpufeature.c | 72 +++++++
arch/arm64/kernel/cpuinfo.c | 18 ++
arch/arm64/kernel/fpsimd.c | 13 ++
arch/arm64/kernel/ptrace.c | 42 ++++
arch/arm64/kernel/signal.c | 59 ++++++
arch/arm64/kvm/fpsimd.c | 1 +
arch/arm64/tools/cpucaps | 1 +
include/uapi/linux/elf.h | 1 +
tools/testing/selftests/arm64/abi/hwcap.c | 217 +++++++++++++++++++++
tools/testing/selftests/arm64/signal/.gitignore | 1 +
.../arm64/signal/testcases/fpmr_siginfo.c | 82 ++++++++
.../selftests/arm64/signal/testcases/testcases.c | 8 +
.../selftests/arm64/signal/testcases/testcases.h | 1 +
23 files changed, 619 insertions(+), 1 deletion(-)
---
base-commit: 54be6c6c5ae8e0d93a6c4641cb7528eb0b6ba478
change-id: 20231003-arm64-2023-dpisa-2f3d25746474
Best regards,
--
Mark Brown <broonie(a)kernel.org>
From: Zi Yan <ziy(a)nvidia.com>
Hi all,
File folio supports any order and multi-size THP is upstreamed[1], so both
file and anonymous folios can be >0 order. Currently, split_huge_page()
only splits a huge page to order-0 pages, but splitting to orders higher than
0 might better utilize large folios, if done properly. In addition,
Large Block Sizes in XFS support would benefit from it during truncate[2].
This patchset adds support for splitting a large folio to any lower order
folios. The patchset is on top of mm-everything-2024-02-24-02-40.
In addition to this implementation of split_huge_page_to_list_to_order(),
a possible optimization could be splitting a large folio to arbitrary
smaller folios instead of a single order. As both Hugh and Ryan pointed
out [3,5] that split to a single order might not be optimal, an order-9 folio
might be better split into 1 order-8, 1 order-7, ..., 1 order-1, and 2 order-0
folios, depending on subsequent folio operations. Leave this as future work.
Changelog
===
Since v4[4]
1. Picked up Matthew's order-1 folio support in the page cache patch, so
that XFS Large Block Sizes patchset can avoid additional code churn in
split_huge_page_to_list_to_order().
2. Dropped truncate change patch and corresponding testing code.
3. Removed thp_nr_pages() use in __split_huge_page()
(per David Hildenbrand).
4. Fixed __split_page_owner() (per David Hildenbrand).
5. Changed unmap_folio() to only add TTU_SPLIT_HUGE_PMD if the folios is
pmd mappable (per Ryan Roberts).
6. Moved swapcached folio split warning upfront and return -EINVAL
(per Ryan Roberts).
Since v3
---
1. Excluded shmem folios and pagecache folios without FS support from
splitting to any order (per Hugh Dickins).
2. Allowed splitting anonymous large folio to any lower order since
multi-size THP is upstreamed.
3. Adapted selftests code to new framework.
Since v2
---
1. Fixed an issue in __split_page_owner() introduced during my rebase
Since v1
---
1. Changed split_page_memcg() and split_page_owner() parameter to use order
2. Used folio_test_pmd_mappable() in place of the equivalent code
Details
===
* Patch 1 changes unmap_folio() to only add TTU_SPLIT_HUGE_PMD if the
folio is pmd mappable.
* Patch 2 adds support for order-1 page cache folio.
* Patch 3 changes split_page_memcg() to use order instead of nr_pages.
* Patch 4 changes split_page_owner() to use order instead of nr_pages.
* Patch 5 and 6 add new_order parameter split_page_memcg() and
split_page_owner() and prepare for upcoming changes.
* Patch 7 adds split_huge_page_to_list_to_order() to split a huge page
to any lower order. The original split_huge_page_to_list() calls
split_huge_page_to_list_to_order() with new_order = 0.
* Patch 8 adds a test API to debugfs and test cases in
split_huge_page_test selftests.
Comments and/or suggestions are welcome.
[1] https://lore.kernel.org/all/20231207161211.2374093-1-ryan.roberts@arm.com/
[2] https://lore.kernel.org/linux-mm/20240226094936.2677493-1-kernel@pankajragh…
[3] https://lore.kernel.org/linux-mm/9dd96da-efa2-5123-20d4-4992136ef3ad@google…
[4] https://lore.kernel.org/linux-mm/cbb1d6a0-66dd-47d0-8733-f836fe050374@arm.c…
[5] https://lore.kernel.org/linux-mm/20240213215520.1048625-1-zi.yan@sent.com/
Matthew Wilcox (Oracle) (1):
mm: Support order-1 folios in the page cache
Zi Yan (7):
mm/huge_memory: only split PMD mapping when necessary in unmap_folio()
mm/memcg: use order instead of nr in split_page_memcg()
mm/page_owner: use order instead of nr in split_page_owner()
mm: memcg: make memcg huge page split support any order split.
mm: page_owner: add support for splitting to any order in split
page_owner.
mm: thp: split huge page to any lower order pages
mm: huge_memory: enable debugfs to split huge pages to any order.
include/linux/huge_mm.h | 21 ++-
include/linux/memcontrol.h | 4 +-
include/linux/page_owner.h | 14 +-
mm/filemap.c | 2 -
mm/huge_memory.c | 173 +++++++++++++-----
mm/internal.h | 3 +-
mm/memcontrol.c | 10 +-
mm/page_alloc.c | 8 +-
mm/page_owner.c | 6 +-
mm/readahead.c | 3 -
.../selftests/mm/split_huge_page_test.c | 115 +++++++++++-
11 files changed, 276 insertions(+), 83 deletions(-)
--
2.43.0