Patch "selftests/bpf: skip the timer_lockup test for single-CPU nodes" has been added to the 6.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    selftests/bpf: skip the timer_lockup test for single-CPU nodes

to the 6.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     selftests-bpf-skip-the-timer_lockup-test-for-single-.patch
and it can be found in the queue-6.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e8fa8e5b34917d6f8f2dabff2152091c2c17d7fa
Author: Viktor Malik <vmalik@xxxxxxxxxx>
Date:   Thu Nov 7 12:52:31 2024 +0100

    selftests/bpf: skip the timer_lockup test for single-CPU nodes
    
    [ Upstream commit 937a1c29a287e8f48c4cea714c76a13e14d989ac ]
    
    The timer_lockup test needs 2 CPUs to work, on single-CPU nodes it fails
    to set thread affinity to CPU 1 since it doesn't exist:
    
        # ./test_progs -t timer_lockup
        test_timer_lockup:PASS:timer_lockup__open_and_load 0 nsec
        test_timer_lockup:PASS:pthread_create thread1 0 nsec
        test_timer_lockup:PASS:pthread_create thread2 0 nsec
        timer_lockup_thread:PASS:cpu affinity 0 nsec
        timer_lockup_thread:FAIL:cpu affinity unexpected error: 22 (errno 0)
        test_timer_lockup:PASS: 0 nsec
        #406     timer_lockup:FAIL
    
    Skip the test if only 1 CPU is available.
    
    Signed-off-by: Viktor Malik <vmalik@xxxxxxxxxx>
    Fixes: 50bd5a0c658d1 ("selftests/bpf: Add timer lockup selftest")
    Tested-by: Philo Lu <lulie@xxxxxxxxxxxxxxxxx>
    Acked-by: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20241107115231.75200-1-vmalik@xxxxxxxxxx
    Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx>
    Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/bpf/prog_tests/timer_lockup.c b/tools/testing/selftests/bpf/prog_tests/timer_lockup.c
index 871d16cb95cfd..1a2f99596916f 100644
--- a/tools/testing/selftests/bpf/prog_tests/timer_lockup.c
+++ b/tools/testing/selftests/bpf/prog_tests/timer_lockup.c
@@ -5,6 +5,7 @@
 #include <test_progs.h>
 #include <pthread.h>
 #include <network_helpers.h>
+#include <sys/sysinfo.h>
 
 #include "timer_lockup.skel.h"
 
@@ -52,6 +53,11 @@ void test_timer_lockup(void)
 	pthread_t thrds[2];
 	void *ret;
 
+	if (get_nprocs() < 2) {
+		test__skip();
+		return;
+	}
+
 	skel = timer_lockup__open_and_load();
 	if (!ASSERT_OK_PTR(skel, "timer_lockup__open_and_load"))
 		return;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux