cgroup_hierarchical_stats mounts a bpffs on /sys/fs/bpf to pin its
iterators, and unmounts it in the end if the test mounted it itself.

It mounts a bpffs even when one is already there, and its cleanup checks
the other way around whether it did, so it never unmounts it. Each run
leaves another bpffs stacked on /sys/fs/bpf, and while the test runs,
tests running in parallel lose what they pinned, which makes
bpftool_maps_access and bpftool_metadata fail now and then.

Patch 1 makes the cleanup unmount the bpffs that the test mounted,
patch 2 stops mounting one over an existing bpffs.

Signed-off-by: Qiliang Yuan <[email protected]>
---
Qiliang Yuan (2):
      selftests/bpf: Unmount the bpffs that cgroup_hierarchical_stats mounted
      selftests/bpf: Don't stack a bpffs in cgroup_hierarchical_stats

 .../bpf/prog_tests/cgroup_hierarchical_stats.c      | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)
---
base-commit: e1d84a37cba984388988d2f1ddc84561413f0db2
change-id: 20261008-selftests-bpf-cgroup-stats-bpffs-4534db24d15c

Best regards,
-- 
Qiliang Yuan <[email protected]>


Reply via email to