On 29/07/2024 09:20, Alexis Lothoré (eBPF Foundation) wrote:
test_dev_cgroup currently loads a small bpf program allowing any access on urandom and zero devices, disabling access to any other device. It makes migrating this test to test_progs impossible, since this one manipulates extensively /dev/null.
Allow /dev/null manipulation in dev_cgroup program to make its usage in test_progs framework possible. Update test_dev_cgroup.c as well to match this change while it has not been removed.
Signed-off-by: Alexis Lothoré (eBPF Foundation) alexis.lothore@bootlin.com
tools/testing/selftests/bpf/progs/dev_cgroup.c | 4 ++-- tools/testing/selftests/bpf/test_dev_cgroup.c | 18 +++++++++---------
Not a big deal, but I found it a bit confusing that this file was modified then deleted in patch 2. Would it work having patch 1 stop building the standalone test/remove it and .gitignore entry, patch 2 updating progs/dev_cgroup.c to allow /dev/zero, /dev/urandom access, patch 3 add cgroup_dev.c test support, and patch 4 add the device type subtest? Or are there issues with doing things that way? Thanks!
Alan