Re: [PATCH bpf-next] selftests/bpf: skip the timer_lockup test for single-CPU nodes

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

 





On 2024/11/7 19:52, Viktor Malik wrote:
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 test_lockup

nit: s/test_lockup/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")
---

Can reproduce this issue and this patch solves it.

Tested-by: Philo Lu <lulie@xxxxxxxxxxxxxxxxx>

Cheers.
--
Philo





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux