Skip to content

cgroup/cgroup_regression_test: Fix umount failure

Leo Liang ltp 10 versions – New

Get series with b4
b4 am YSTiLyXItnm6UdyR@ubuntu02

Versions newest first · linked by author and title

  1. v7 Latest4 patches 0 repliesNew
  2. v6 posting 2/20 of 4 patches 0 repliesSuperseded
  3. v6 posting 1/24 patches 0 repliesSuperseded
Earlier versions · 7
VersionPostedPatchesRepliesStatus
v52 patches0 repliesSuperseded
v4 posting 2/22 patches0 repliesSuperseded
v4 posting 1/21 of 2 patches0 repliesSuperseded
v3 posting 2/22 patches0 repliesSuperseded
v3 posting 1/20 of 2 patches0 repliesSuperseded
v21 of 2 patches0 repliesSuperseded
v11 patch0 repliesSuperseded

Changes in v7 from the cover letter

- Use grep instead of "bashism [[]]" to determine if the argument starts with '/'
- Change the default TST_MNTPOINT to $PWD/mntpoint

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4lib: tst_umount: umount a mount point instead of a devicetestcases/lib/tst_test.sh+11 -71 reply
2/4doc: change the default behavior of tst_umountdoc/shell-test-api.txt+4 -41 reply
3/4cgroup/cgroup_regression_test: Fix umount failuretestcases/kernel/controllers/cgroup/cgroup_regression_test.sh+5 -51 reply
4/4Make argument to tst_umount an absolute pathtestcases/kernel/fs/quota_remount/quota_remount_test01.sh testcases/kernel/security/integrity/ima/tests/evm_overlay.sh testcases/kernel/tracing/dynamic_debug/dynamic_debug01.sh +1 more+4 -43 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchPetr VorelCyril Hrubis
1/4R-b R-b
2/4R-b R-b
3/4R-b
4/4R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v7 thread

Cover letter [LTP] [PATCH v7, 0/4] 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.

tst_umount API is ambiguous when checking for whether a device is mounted. Modify it to check an actual mount point instead of device
and reject anything that does not start with '/' as an argument.

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

Changes since v5
- Make tst_umount to only accept absolute mount point as an argument
- Modify tests that use tst_umount to pass mount point in instead of device

Changes since v6
- Use grep instead of "bashism [[]]" to determine if the argument starts with '/'
- Change the default TST_MNTPOINT to $PWD/mntpoint

Leo Yu-Chi Liang (4):
lib: tst_umount: umount a mount point instead of a device
doc: change the default behavior of tst_umount cgroup/cgroup_regression_test: Fix umount failure Make argument to tst_umount an absolute path

 doc/shell-test-api.txt                        |  8 ++++----
 .../cgroup/cgroup_regression_test.sh          | 10 +++++-----
 .../fs/quota_remount/quota_remount_test01.sh  |  2 +-
 .../integrity/ima/tests/evm_overlay.sh        |  2 +-
 .../tracing/dynamic_debug/dynamic_debug01.sh  |  2 +-
 testcases/lib/tst_test.sh                     | 20 +++++++++++--------
 6 files changed, 24 insertions(+), 20 deletions(-)
Signature · 1 line
2.17.0