kernel_samsung_a53x/tools/testing/selftests/vm
Waiman Long c4a6fc0b7c selftests/vm: make charge_reserved_hugetlb.sh work with existing cgroup setting
[ 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>
2024-11-08 11:26:12 +01:00
..
charge_reserved_hugetlb.sh selftests/vm: make charge_reserved_hugetlb.sh work with existing cgroup setting 2024-11-08 11:26:12 +01:00
compaction_test.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
config Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gup_benchmark.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hmm-tests.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hugepage-mmap.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hugepage-shm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hugetlb_reparenting_test.sh selftests/vm: make charge_reserved_hugetlb.sh work with existing cgroup setting 2024-11-08 11:26:12 +01:00
khugepaged.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
map_fixed_noreplace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
map_hugetlb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
map_populate.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mlock-random-test.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mlock2-tests.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mlock2.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mremap_dontunmap.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
on-fault-limit.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pkey-helpers.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pkey-powerpc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pkey-x86.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
protection_keys.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
run_vmtests Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
test_hmm.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
test_vmalloc.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
thuge-gen.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
transhuge-stress.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
userfaultfd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
va_128TBswitch.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
virtual_address_range.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
write_hugetlb_memory.sh selftests/vm: make charge_reserved_hugetlb.sh work with existing cgroup setting 2024-11-08 11:26:12 +01:00
write_to_hugetlbfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00