]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/bpf: add get_next_key boundary test for cgroup_storage
authorWeiming Shi <bestswngs@gmail.com>
Fri, 3 Apr 2026 13:29:51 +0000 (21:29 +0800)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 6 Apr 2026 01:45:05 +0000 (18:45 -0700)
commit262b857da6bee528420514690895ed7d2c65077e
tree315465f33f330ac4aa8ef2009651b978dccbb505
parent5828b9e5b272ecff7cf5d345128d3de7324117f7
selftests/bpf: add get_next_key boundary test for cgroup_storage

Verify that bpf_map__get_next_key() correctly returns -ENOENT when
called on the last (and only) key in a cgroup_storage map. Before the
fix in the previous patch, this would succeed with bogus key data
instead of failing.

Suggested-by: Paul Chaignon <paul.chaignon@gmail.com>
Signed-off-by: Weiming Shi <bestswngs@gmail.com>
Acked-by: Paul Chaignon <paul.chaignon@gmail.com>
Link: https://lore.kernel.org/r/20260403132951.43533-3-bestswngs@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/cgroup_storage.c