c4a6fc0b7c
[ Upstream commit 209376ed2a8431ccb4c40fdcef11194fc1e749b0 ] The hugetlb cgroup reservation test charge_reserved_hugetlb.sh assume that no cgroup filesystems are mounted before running the test. That is not true in many cases. As a result, the test fails to run. Fix that by querying the current cgroup mount setting and using the existing cgroup setup instead before attempting to freshly mount a cgroup filesystem. Similar change is also made for hugetlb_reparenting_test.sh as well, though it still has problem if cgroup v2 isn't used. The patched test scripts were run on a centos 8 based system to verify that they ran properly. Link: https://lkml.kernel.org/r/20220106201359.1646575-1-longman@redhat.com Fixes: 29750f71a9b4 ("hugetlb_cgroup: add hugetlb_cgroup reservation tests") Signed-off-by: Waiman Long <longman@redhat.com> Acked-by: Mina Almasry <almasrymina@google.com> Cc: Shuah Khan <shuah@kernel.org> Cc: Mike Kravetz <mike.kravetz@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Stable-dep-of: bbe246f875d0 ("selftests/mm: fix awk usage in charge_reserved_hugetlb.sh and hugetlb_reparenting_test.sh that may cause error") Signed-off-by: Sasha Levin <sashal@kernel.org> |
||
---|---|---|
.. | ||
charge_reserved_hugetlb.sh | ||
compaction_test.c | ||
config | ||
gup_benchmark.c | ||
hmm-tests.c | ||
hugepage-mmap.c | ||
hugepage-shm.c | ||
hugetlb_reparenting_test.sh | ||
khugepaged.c | ||
Makefile | ||
map_fixed_noreplace.c | ||
map_hugetlb.c | ||
map_populate.c | ||
mlock-random-test.c | ||
mlock2-tests.c | ||
mlock2.h | ||
mremap_dontunmap.c | ||
on-fault-limit.c | ||
pkey-helpers.h | ||
pkey-powerpc.h | ||
pkey-x86.h | ||
protection_keys.c | ||
run_vmtests | ||
test_hmm.sh | ||
test_vmalloc.sh | ||
thuge-gen.c | ||
transhuge-stress.c | ||
userfaultfd.c | ||
va_128TBswitch.c | ||
virtual_address_range.c | ||
write_hugetlb_memory.sh | ||
write_to_hugetlbfs.c |