summaryrefslogtreecommitdiff
path: root/scripts/lib/kdoc/kdoc_parser.py
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2024-10-22 21:39:06 -0700
committerAlexei Starovoitov <ast@kernel.org>2024-10-23 22:15:09 -0700
commit1b2bfc29695d273492c3dd8512775261f3272686 (patch)
tree4c2b1e894f0ab9a0481d7a6c2a41ca6b02693ac8 /scripts/lib/kdoc/kdoc_parser.py
parentc94ffb3ba45bec2b82779818c33848e5c288a9a9 (diff)
selftests/bpf: fix test_spin_lock_fail.c's global vars usage
Global variables of special types (like `struct bpf_spin_lock`) make underlying ARRAY maps non-mmapable. To make this work with libbpf's mmaping logic, application is expected to declare such special variables as static, so libbpf doesn't even attempt to mmap() such ARRAYs. test_spin_lock_fail.c didn't follow this rule, but given it relied on this test to trigger failures, this went unnoticed, as we never got to the step of mmap()'ing these ARRAY maps. It is fragile and relies on specific sequence of libbpf steps, which are an internal implementation details. Fix the test by marking lockA and lockB as static. Fixes: c48748aea4f8 ("selftests/bpf: Add failure test cases for spin lock pairing") Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/r/20241023043908.3834423-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
0 files changed, 0 insertions, 0 deletions