* [LTP] [PATCH] cgroup_regression_test: Use unique names for hierarchies in each test
@ 2025-07-10 8:17 Avinesh Kumar
2025-07-10 8:24 ` Avinesh Kumar
0 siblings, 1 reply; 10+ messages in thread
From: Avinesh Kumar @ 2025-07-10 8:17 UTC (permalink / raw)
To: ltp; +Cc: mkoutny
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
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [LTP] [PATCH] cgroup_regression_test: Use unique names for hierarchies in each test
2025-07-10 8:17 [LTP] [PATCH] cgroup_regression_test: Use unique names for hierarchies in each test Avinesh Kumar
@ 2025-07-10 8:24 ` Avinesh Kumar
2025-07-10 8:47 ` Andrea Cervesato via ltp
0 siblings, 1 reply; 10+ messages in thread
From: Avinesh Kumar @ 2025-07-10 8:24 UTC (permalink / raw)
To: ltp; +Cc: mkoutny
I forgot to mention that I also tried to use
tst_umount() helper routine, but that did not help as umount does not
really report any failures here.
On Thursday, July 10, 2025 10:17:09 AM CEST Avinesh Kumar wrote:
> 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
>
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [LTP] [PATCH] cgroup_regression_test: Use unique names for hierarchies in each test
2025-07-10 8:24 ` Avinesh Kumar
@ 2025-07-10 8:47 ` Andrea Cervesato via ltp
2025-07-10 9:00 ` Cyril Hrubis
0 siblings, 1 reply; 10+ messages in thread
From: Andrea Cervesato via ltp @ 2025-07-10 8:47 UTC (permalink / raw)
To: Avinesh Kumar, ltp; +Cc: mkoutny
On 7/10/25 10:24 AM, Avinesh Kumar wrote:
> I forgot to mention that I also tried to use
> tst_umount() helper routine, but that did not help as umount does not
> really report any failures here.
The solution doesn't really convince me. If it's true that a util-linux
upgrade to v2.41 is causing this issue, we should probably research why
this is happening in there and (eventually) fix it. Or, if it's not a
library bug, we should fix tst_umount() in order to recognize when a
cgroups folder hasn't been fully unmounted.
@Cyril WDYT ?
- Andrea
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [LTP] [PATCH] cgroup_regression_test: Use unique names for hierarchies in each test
2025-07-10 8:47 ` Andrea Cervesato via ltp
@ 2025-07-10 9:00 ` Cyril Hrubis
2025-07-11 10:36 ` Andrea Cervesato via ltp
0 siblings, 1 reply; 10+ messages in thread
From: Cyril Hrubis @ 2025-07-10 9:00 UTC (permalink / raw)
To: Andrea Cervesato; +Cc: mkoutny, ltp
Hi!
> > I forgot to mention that I also tried to use
> > tst_umount() helper routine, but that did not help as umount does not
> > really report any failures here.
>
> The solution doesn't really convince me. If it's true that a util-linux
> upgrade to v2.41 is causing this issue, we should probably research why
> this is happening in there and (eventually) fix it. Or, if it's not a
> library bug, we should fix tst_umount() in order to recognize when a
> cgroups folder hasn't been fully unmounted.
>
> @Cyril WDYT ?
This indeed looks like a workaround for a bug either in the test or in
the system.
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [LTP] [PATCH] cgroup_regression_test: Use unique names for hierarchies in each test
2025-07-10 9:00 ` Cyril Hrubis
@ 2025-07-11 10:36 ` Andrea Cervesato via ltp
[not found] ` <mqkxe24qlrcpb5jxgigbiarxxgemqjw3rmgnsprn55ubghrrda@etaozcz2nemy>
0 siblings, 1 reply; 10+ messages in thread
From: Andrea Cervesato via ltp @ 2025-07-11 10:36 UTC (permalink / raw)
To: Cyril Hrubis; +Cc: mkoutny, ltp
On 7/10/25 11:00 AM, Cyril Hrubis wrote:
> Hi!
>>> I forgot to mention that I also tried to use
>>> tst_umount() helper routine, but that did not help as umount does not
>>> really report any failures here.
>> The solution doesn't really convince me. If it's true that a util-linux
>> upgrade to v2.41 is causing this issue, we should probably research why
>> this is happening in there and (eventually) fix it. Or, if it's not a
>> library bug, we should fix tst_umount() in order to recognize when a
>> cgroups folder hasn't been fully unmounted.
>>
>> @Cyril WDYT ?
> This indeed looks like a workaround for a bug either in the test or in
> the system.
>
Perhaps, by placing sync before every new test which is going to mount a
new cgroup folder we fix the issue as well.
I'm wondering if we should dig into it a big deeper...
- Andrea
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2025-07-30 11:48 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-10 8:17 [LTP] [PATCH] cgroup_regression_test: Use unique names for hierarchies in each test Avinesh Kumar
2025-07-10 8:24 ` Avinesh Kumar
2025-07-10 8:47 ` Andrea Cervesato via ltp
2025-07-10 9:00 ` Cyril Hrubis
2025-07-11 10:36 ` Andrea Cervesato via ltp
[not found] ` <mqkxe24qlrcpb5jxgigbiarxxgemqjw3rmgnsprn55ubghrrda@etaozcz2nemy>
2025-07-11 12:41 ` Andrea Cervesato via ltp
[not found] ` <svs6pl6jmibp7uylvofkia5smvu2cuezfvnawlgkmjiulbrpfm@w7s7dlxxltap>
2025-07-14 11:56 ` Andrea Cervesato via ltp
2025-07-30 11:32 ` Avinesh Kumar
2025-07-30 11:43 ` Martin Doucha
2025-07-30 11:48 ` Michal Koutný via ltp
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.