From: Leo Liang <ycliang@andestech.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3, 2/2] cgroup/cgroup_regression_test: Fix umount failure
Date: Fri, 16 Jul 2021 22:02:39 +0800 [thread overview]
Message-ID: <20210716140235.GA22205@andestech.com> (raw)
The test sequence
mount -t cgroup -o <controllers> <path>
mkdir <path>/<dir>
rmdir <path>/<dir>
umount <path>
mount -t cgroup -o <controllers> <path>
would easily fail at the last mount with -EBUSY on certain platform.
The reason is that this test sequence would have the chance of
missing a release code path when doing rmdir and umount.
Adding a little delay between "rmdir" and "umount" could fix the problem,
so use tst_umount API instead of umount in "rmdir, umount" sequence.
Fixes: #839
Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
---
.../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 1f7f3820e..056166f11 100755
--- a/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh
+++ b/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh
@@ -145,7 +145,7 @@ test2()
fi
rmdir cgroup/0 cgroup/1
- umount cgroup/
+ tst_umount cgroup/
}
#---------------------------------------------------------------------------
@@ -193,7 +193,7 @@ test3()
wait $pid2 2>/dev/null
rmdir $cpu_subsys_path/0 2> /dev/null
- umount cgroup/ 2> /dev/null
+ tst_umount cgroup/ 2> /dev/null
check_kernel_bug
}
@@ -222,7 +222,7 @@ test4()
mount -t cgroup -o none,name=foo cgroup cgroup/
mkdir cgroup/0
rmdir cgroup/0
- umount cgroup/
+ tst_umount cgroup/
if dmesg | grep -q "MAX_LOCKDEP_SUBCLASSES too low"; then
tst_res TFAIL "lockdep BUG was found"
@@ -254,7 +254,7 @@ test5()
mount -t cgroup none cgroup 2> /dev/null
mkdir cgroup/0
rmdir cgroup/0
- umount cgroup/ 2> /dev/null
+ tst_umount cgroup/ 2> /dev/null
check_kernel_bug
}
@@ -290,7 +290,7 @@ test6()
mount -t cgroup -o ns xxx cgroup/ > /dev/null 2>&1
rmdir cgroup/[1-9]* > /dev/null 2>&1
- umount cgroup/
+ tst_umount cgroup/
check_kernel_bug
}
--
2.17.0
next reply other threads:[~2021-07-16 14:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-16 14:02 Leo Liang [this message]
2021-07-19 5:24 ` [LTP] [PATCH v3, 2/2] cgroup/cgroup_regression_test: Fix umount failure xuyang2018.jy
2021-07-19 5:59 ` Petr Vorel
2021-07-19 8:20 ` Leo Liang
2021-07-19 6:48 ` Petr Vorel
2021-07-19 8:35 ` Leo Liang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210716140235.GA22205@andestech.com \
--to=ycliang@andestech.com \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.