On Mon, Jun 09, 2025 at 01:29:38PM +0800, Shung-Hsi Yu wrote:
From: Ihor Solodrai ihor.solodrai@pm.me
Recently perf_link test started unreliably failing on libbpf CI:
- https://github.com/libbpf/libbpf/actions/runs/11260672407/job/31312405473
- https://github.com/libbpf/libbpf/actions/runs/11260992334/job/31315514626
- https://github.com/libbpf/libbpf/actions/runs/11263162459/job/31320458251
Part of the test is running a dummy loop for a while and then checking for a counter incremented by the test program.
Instead of waiting for an arbitrary number of loop iterations once, check for the test counter in a loop and use get_time_ns() helper to enforce a 100ms timeout.
v1: https://lore.kernel.org/bpf/zuRd072x9tumn2iN4wDNs5av0nu5nekMNV4PkR-YwCT10eFF...
Signed-off-by: Ihor Solodrai ihor.solodrai@pm.me Signed-off-by: Andrii Nakryiko andrii@kernel.org Link: https://lore.kernel.org/bpf/20241011153104.249800-1-ihor.solodrai@pm.me Signed-off-by: Shung-Hsi Yu shung-hsi.yu@suse.com
.../testing/selftests/bpf/prog_tests/perf_link.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
<formletter>
This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly.
</formletter>