[LTP] [PATCH] cgroup_regression_test: Use unique names for hierarchies in each test
Avinesh Kumar
akumar@suse.de
Thu Jul 10 10:17:09 CEST 2025
Recently we started having failures where mounting cgroup in quick
succession after umount of same named hierarchy fails with EBUSY
cgroup_regression_test 1 TPASS: no kernel bug was found
mount: /tmp/LTP_cgroup_regression_test.ZFwS3JkX4c/cgroup: cgroup already mounted or mount point busy.
dmesg(1) may have more information after failed mount system call.
cgroup_regression_test 2 TFAIL: Failed to mount cgroup filesystem
Updating test to use unique names for cgroup hierarchies in each
subtest.
Suggested-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Avinesh Kumar <akumar@suse.de>
---
.../controllers/cgroup/cgroup_regression_test.sh | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh b/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh
index 276231fe8..c1bf4810f 100755
--- a/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh
+++ b/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh
@@ -93,7 +93,7 @@ test1()
cgroup_regression_fork_processes &
sleep 1
- mount -t cgroup -o none,name=foo cgroup cgroup/
+ mount -t cgroup -o none,name=foo1 cgroup cgroup/
if [ $? -ne 0 ]; then
tst_res TFAIL "failed to mount cgroup filesystem"
kill -TERM $!
@@ -118,7 +118,7 @@ test2()
local val1
local val2
- mount -t cgroup -o none,name=foo cgroup cgroup/
+ mount -t cgroup -o none,name=foo2 cgroup cgroup/
if [ $? -ne 0 ]; then
tst_res TFAIL "Failed to mount cgroup filesystem"
return
@@ -204,7 +204,7 @@ test4()
return
fi
- mount -t cgroup -o none,name=foo cgroup cgroup/
+ mount -t cgroup -o none,name=foo4 cgroup cgroup/
mkdir cgroup/0
rmdir cgroup/0
tst_umount $PWD/cgroup
@@ -309,7 +309,7 @@ test_7_2()
{
local subsys=$1
- mount -t cgroup -o none,name=foo cgroup cgroup/
+ mount -t cgroup -o none,name=foo72 cgroup cgroup/
if [ $? -ne 0 ]; then
tst_res TFAIL "failed to mount cgroup"
return
@@ -370,7 +370,7 @@ test7()
#---------------------------------------------------------------------------
test8()
{
- mount -t cgroup -o none,name=foo cgroup cgroup/
+ mount -t cgroup -o none,name=foo8 cgroup cgroup/
if [ $? -ne 0 ]; then
tst_res TFAIL "failed to mount cgroup filesystem"
return
--
2.43.0
More information about the ltp
mailing list