Skip to contentSkip to conversation

cgroup/cgroup_regression_test: Fix umount failure

PATCH Superseded Leo Liang 1 participant 1 message Jul 27, 2021

v5 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

Leo Liang

author
#0 lore raw

v5 cover cgroup/cgroup_regression_test: Fix umount failure

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.

Adding a little delay between "rmdir" and "umount" could fix the problem, so use tst_umount API instead of umount in "rmdir, umount" sequence.

Changes since v1
- Use "tst_umount" instead of "sync" as suggested
- Make "tst_umount" work with argument that has terminating slash

Changes since v2
- Filter out the trailing slash instead of using mountpoint command

Changes since v3
- Filter out the trailing slash only in grep command
- Add comment in the test script

Changes since v4
- remove unnecessary stderr redirection

Leo Yu-Chi Liang (2):
lib/tst_test.sh: Make tst_umount work with argument has trailing slash cgroup/cgroup_regression_test: Fix umount failure

 .../controllers/cgroup/cgroup_regression_test.sh       | 10 +++++-----
 testcases/lib/tst_test.sh                              |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
2.17.0