* [LTP] [PATCH] cpuset_memory: Fix hugetlb mntpoint
@ 2026-03-24 10:40 Martin Doucha
2026-03-24 11:47 ` Andrea Cervesato via ltp
2026-03-26 13:00 ` Petr Vorel
0 siblings, 2 replies; 3+ messages in thread
From: Martin Doucha @ 2026-03-24 10:40 UTC (permalink / raw)
To: ltp
The cpuset_memory test tries to mount hugetlb filesystem on a hardcoded
directory in the root filesystem. This doesn't work on distros with
read-only root. Change the mountpoint to the common temp directory
instead.
Signed-off-by: Martin Doucha <mdoucha@suse.cz>
---
Tested on SLE-Micro 6.
.../cpuset/cpuset_memory_test/cpuset_memory_testset.sh | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_testset.sh b/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_testset.sh
index d63950f8e..581df5c32 100755
--- a/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_testset.sh
+++ b/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_testset.sh
@@ -44,6 +44,7 @@ HUGEPAGESIZE=$(awk '/Hugepagesize/{ print $2 }' /proc/meminfo)
HUGEPAGESIZE=$((${HUGEPAGESIZE:-0} * 1024))
MEMORY_RESULT="$CPUSET_TMP/memory_result"
+HUGETLB_MNTPOINT="$CPUSET_TMP/hugetlb"
# simple_getresult
# $1 - cpuset_memory_test's pid
@@ -181,8 +182,8 @@ test6()
return 0
fi
- mkdir /hugetlb
- mount -t hugetlbfs none /hugetlb
+ mkdir "$HUGETLB_MNTPOINT"
+ mount -t hugetlbfs none "$HUGETLB_MNTPOINT"
save_nr_hugepages=$(cat /proc/sys/vm/nr_hugepages)
echo $((2*$nr_mems)) > /proc/sys/vm/nr_hugepages
@@ -190,8 +191,8 @@ test6()
cpuset_memory_test --shm --hugepage -s $HUGEPAGESIZE --key=7 >"$MEMORY_RESULT" &
simple_getresult $! "$CPUSET/0"
- umount /hugetlb
- rmdir /hugetlb
+ umount "$HUGETLB_MNTPOINT"
+ rmdir "$HUGETLB_MNTPOINT"
echo $save_nr_hugepages > /proc/sys/vm/nr_hugepages
if [ $(cat /proc/sys/vm/nr_hugepages) -ne $save_nr_hugepages ]; then
--
2.52.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-26 13:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-24 10:40 [LTP] [PATCH] cpuset_memory: Fix hugetlb mntpoint Martin Doucha
2026-03-24 11:47 ` Andrea Cervesato via ltp
2026-03-26 13:00 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox