linux-kernelorg-stable/tools
Mark Brown 9c02223e2d selftests/mm: generate a temporary mountpoint for cgroup filesystem
Currently if the filesystem for the cgroups version it wants to use is not
mounted charge_reserved_hugetlb.sh and hugetlb_reparenting_test.sh tests
will attempt to mount it on the hard coded path /dev/cgroup/memory,
deleting that directory when the test finishes.  This will fail if there
is not a preexisting directory at that path, and since the directory is
deleted subsequent runs of the test will fail.  Instead of relying on this
hard coded directory name use mktemp to generate a temporary directory to
use as a mountpoint, fixing both the assumption and the disruption caused
by deleting a preexisting directory.

This means that if the relevant cgroup filesystem is not already mounted
then we rely on having coreutils (which provides mktemp) installed.  I
suspect that many current users are relying on having things automounted
by default, and given that the script relies on bash it's probably not an
unreasonable requirement.

Link: https://lkml.kernel.org/r/20250404-kselftest-mm-cgroup2-detection-v1-1-3dba6d32ba8c@kernel.org
Fixes: 209376ed2a ("selftests/vm: make charge_reserved_hugetlb.sh work with existing cgroup setting")
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: Aishwarya TCV <aishwarya.tcv@arm.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Mina Almasry <almasrymina@google.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Waiman Long <longman@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-04-11 17:32:37 -07:00
..
accounting
arch perf tools changes for v6.15 2025-03-31 08:52:33 -07:00
bootconfig
bpf bpf-next-6.15 2025-03-30 12:43:03 -07:00
build perf tools changes for v6.15 2025-03-31 08:52:33 -07:00
certs
cgroup
counter
crypto
debugging
firewire
firmware
gpio
hv
iio
include tools/include: make uapi/linux/types.h usable from assembly 2025-04-06 12:55:31 -07:00
kvm/kvm_stat
laptop
leds
lib - The 7 patch series "powerpc/crash: use generic crashkernel 2025-04-01 10:06:52 -07:00
memory-model
mm
net
objtool These are objtool fixes and updates by Josh Poimboeuf, centered 2025-04-02 10:30:10 -07:00
pcmcia
perf tracing/timers: Rename the hrtimer_init event to hrtimer_setup 2025-04-05 10:30:17 +02:00
power Turbostat 2025.05.06 2025-04-06 12:32:43 -07:00
rcu
sched_ext tools/sched_ext: Sync with scx repo 2025-04-02 09:08:33 -10:00
scripts tracing tooling updates for 6.15: 2025-03-27 17:03:01 -07:00
sound
spi
testing selftests/mm: generate a temporary mountpoint for cgroup filesystem 2025-04-11 17:32:37 -07:00
thermal
time
tracing tracing tooling updates for 6.15: 2025-03-27 17:03:01 -07:00
usb
verification tracing tooling updates for 6.15: 2025-03-27 17:03:01 -07:00
virtio
wmi
workqueue
writeback
Makefile