summaryrefslogtreecommitdiff
path: root/tools/usb/Build
diff options
context:
space:
mode:
authorEduard Zingerman <eddyz87@gmail.com>2024-11-12 03:09:05 -0800
committerAlexei Starovoitov <ast@kernel.org>2024-11-12 13:53:27 -0800
commit3209139d00e594e30abc2429ea54c36bfbb9528a (patch)
treea37fd0702d751a0cbe58ed3df6d2c5ffa89c01c2 /tools/usb/Build
parent03066ed3105a71c2b0ad39ea44b6e5733ddd4a68 (diff)
downloadlinux-3209139d00e594e30abc2429ea54c36bfbb9528a.tar.gz
linux-3209139d00e594e30abc2429ea54c36bfbb9528a.tar.bz2
linux-3209139d00e594e30abc2429ea54c36bfbb9528a.zip
selftests/bpf: allow send_signal test to timeout
The following invocation: $ t1=send_signal/send_signal_perf_thread_remote \ t2=send_signal/send_signal_nmi_thread_remote \ ./test_progs -t $t1,$t2 Leads to send_signal_nmi_thread_remote to be stuck on a line 180: /* wait for result */ err = read(pipe_c2p[0], buf, 1); In this test case: - perf event PERF_COUNT_HW_CPU_CYCLES is created for parent process; - BPF program is attached to perf event, and sends a signal to child process when event occurs; - parent program burns some CPU in busy loop and calls read() to get notification from child that it received a signal. The perf event is declared with .sample_period = 1. This forces perf to throttle events, and under some unclear conditions the event does not always occur while parent is in busy loop. After parent enters read() system call CPU cycles event won't be generated for parent anymore. Thus, if perf event had not occurred already the test is stuck. This commit updates the parent to wait for notification with a timeout, doing several iterations of busy loop + read_with_timeout(). Signed-off-by: Eduard Zingerman <eddyz87@gmail.com> Link: https://lore.kernel.org/r/20241112110906.3045278-4-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/usb/Build')
0 files changed, 0 insertions, 0 deletions