]> www.infradead.org Git - users/dwmw2/linux.git/commit
selftests/bpf: convert test_dev_cgroup to test_progs
authorAlexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
Wed, 31 Jul 2024 06:37:26 +0000 (08:37 +0200)
committerMartin KaFai Lau <martin.lau@kernel.org>
Wed, 31 Jul 2024 17:00:20 +0000 (10:00 -0700)
commitd83d8230e415ecf727f6b88c0ae55193f149d650
treeef2628ac31ff5f2d28aa67d3cc064f2a553412e4
parentba6a9018502eecb94e67001deeb48406fa71f916
selftests/bpf: convert test_dev_cgroup to test_progs

test_dev_cgroup is defined as a standalone test program, and so is not
executed in CI.

Convert it to test_progs framework so it is tested automatically in CI, and
remove the old test. In order to be able to run it in test_progs, /dev/null
must remain usable, so change the new test to test operations on devices
1:3 as valid, and operations on devices 1:5 (/dev/zero) as invalid.

Reviewed-by: Alan Maguire <alan.maguire@oracle.com>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Signed-off-by: Alexis Lothoré (eBPF Foundation) <alexis.lothore@bootlin.com>
Link: https://lore.kernel.org/r/20240731-convert_dev_cgroup-v4-2-849425d90de6@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_dev.c [new file with mode: 0644]
tools/testing/selftests/bpf/test_dev_cgroup.c [deleted file]