]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests/bpf: convert test_cgroup_storage to test_progs
authorAlexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
Tue, 13 Aug 2024 12:45:06 +0000 (14:45 +0200)
committerMartin KaFai Lau <martin.lau@kernel.org>
Thu, 15 Aug 2024 01:10:47 +0000 (18:10 -0700)
commit37a14cfd667a22662867b986925f1ad4205c17df
tree9cc9d1b1b1e9c0af2feb49543c75228a07db6af8
parenta4ae5c31e0f28d2c737583a06d4b29ffd6bbd622
selftests/bpf: convert test_cgroup_storage to test_progs

test_cgroup_storage is currently a standalone program which is not run
when executing test_progs.

Convert it to the test_progs framework so it can be automatically executed
in CI. The conversion led to the following changes:
- converted the raw bpf program in the userspace test file into a dedicated
  test program in progs/ dir
- reduced the scope of cgroup_storage test: the content from this test
  overlaps with some other tests already present in test_progs, most
  notably netcnt and cgroup_storage_multi*. Those tests already check
  extensively local storage, per-cpu local storage, cgroups interaction,
  etc. So the new test only keep the part testing that the program return
  code (based on map content) properly leads to packet being passed or
  dropped.

Reviewed-by: Alan Maguire <alan.maguire@oracle.com>
Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
Link: https://lore.kernel.org/r/20240813-convert_cgroup_tests-v4-2-a33c03458cf6@bootlin.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
tools/testing/selftests/bpf/.gitignore
tools/testing/selftests/bpf/Makefile
tools/testing/selftests/bpf/prog_tests/cgroup_storage.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/cgroup_storage.c [new file with mode: 0644]
tools/testing/selftests/bpf/test_cgroup_storage.c [deleted file]