summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMaxim Skokov <skokovmaksimevg@gmail.com>2026-10-16 22:47:58 +0300
committerAlexei Starovoitov <ast@kernel.org>2026-10-17 14:44:32 +0000
commit631fee3f5a18b13f6d89df4e1c1146e71e420ea1 (patch)
tree50acda71545da25a684853c2f6500df627e8eb0b /tools/perf/scripts/python
parent70ac4de43ad1d24ae0c845f35eed307442a0aabc (diff)
selftests/bpf: Test bpftool map dump on maps that can't be iterated
Socket storage can't be iterated from user space. Create a BPF_MAP_TYPE_SK_STORAGE map, attach storage to a socket, pin it, and check that "bpftool map dump" fails with nothing but an error: a JSON error object with -j, no elements on stdout in plain mode, and the reason on stderr. Socket storage always has BTF, so its plain dump goes through the BTF writer and never prints an element count. Check that path with a queue map created without BTF that holds one element: its plain dump must fail without a "Found" line, which bpftool printed as "Found 0 elements" before, and give the reason on stderr. Signed-off-by: Maxim Skokov <skokovmaksimevg@gmail.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Quentin Monnet <qmo@kernel.org> Link: https://patch.msgid.link/20261016194825.230433-4-skokovmaksimevg@gmail.com
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions