summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2023-10-07 00:06:55 +0200
committerMartin KaFai Lau <martin.lau@kernel.org>2023-10-06 17:11:21 -0700
commit37345b8535b44daa4021426fa0ea8d6ed6142112 (patch)
treea942fd617e7117920da2aa2e03878c33c48973b8 /arch
parent685446b0629b53a7574886fde40126d47c51d7d4 (diff)
selftests/bpf: Make seen_tc* variable tests more robust
Martin reported that on his local dev machine the test_tc_chain_mixed() fails as "test_tc_chain_mixed:FAIL:seen_tc5 unexpected seen_tc5: actual 1 != expected 0" and others occasionally, too. However, when running in a more isolated setup (qemu in particular), it works fine for him. The reason is that there is a small race-window where seen_tc* could turn into true for various test cases when there is background traffic, e.g. after the asserts they often get reset. In such case when subsequent detach takes place, unrelated background traffic could have already flipped the bool to true beforehand. Add a small helper tc_skel_reset_all_seen() to reset all bools before we do the ping test. At this point, everything is set up as expected and therefore no race can occur. All tc_{opts,links} tests continue to pass after this change. Reported-by: Martin KaFai Lau <martin.lau@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/r/20231006220655.1653-7-daniel@iogearbox.net Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions