diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2023-09-19 13:09:04 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-09-22 00:21:59 +0300 |
commit | 6cb66eca36f3c6b37447ca79c6d7fc6db339c23e (patch) | |
tree | 55bbcddaa818a1377371192a07b7e58131500e9c /scripts/gdb/linux/utils.py | |
parent | 577c06af8188d1f6919ef7b62fc1b78fb1b86eb7 (diff) | |
download | linux-6cb66eca36f3c6b37447ca79c6d7fc6db339c23e.tar.xz |
selftests/bpf: Unmount the cgroup2 work directory
test_progs -t bind_perm,bpf_obj_pinning/mounted-str-rel fails when
the selftests directory is mounted under /mnt, which is a reasonable
thing to do when sharing the selftests residing on the host with a
virtual machine, e.g., using 9p.
The reason is that cgroup2 is mounted at /mnt and not unmounted,
causing subsequent tests that need to access the selftests directory
to fail.
Fix by unmounting it. The kernel maintains a mount stack, so this
reveals what was mounted there before. Introduce cgroup_workdir_mounted
in order to maintain idempotency. Make it thread-local in order to
support test_progs -j.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Link: https://lore.kernel.org/r/20230919101336.2223655-3-iii@linux.ibm.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions