(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

selftests/bpf: Unmount the bpffs that cgroup_hierarchical_stats mounted

setup_bpffs() mounts a bpffs on /sys/fs/bpf and records in mounted_bpffs whether it did, so that cleanup_bpffs() unmounts only a bpffs that the test mounted itself. cleanup_bpffs() checks the flag the other way around. As mounting on /sys/fs/bpf succeeds even when a bpffs is already there, the test never unmounts the bpffs it mounted, and every run leaves another one stacked on /sys/fs/bpf of the mount namespace that the test_progs worker keeps running later tests in. Unmount the bpffs only when setup_bpffs() mounted it. Fixes: 88886309d2e8 ("selftests/bpf: add a selftest for cgroup hierarchical stats collection") Signed-off-by: Qiliang Yuan <odys.yuan@gmail.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Reviewed-by: Yosry Ahmed <yosry@kernel.org> Link: https://patch.msgid.link/20261009-selftests-bpf-cgroup-stats-bpffs-v2-2-f93a111da992@gmail.com


Author Qiliang Yuan Committer Alexei Starovoitov Date Commit Parent 3c824dfd
+1 -1
1 changed file
+1 -1
1 changed file