Make argument to tst_umount an absolute path
PATCH v7 4/4 Make argument to tst_umount an absolute path
tst_umount only takes mount point as an argument, so modify the argument to an absolute path for tst_umount.
df01.sh uses tst_umount as clean up function,
modify its default TST_MNTPOINT to $PWD/mntpoint in tst_test.sh
--- testcases/kernel/fs/quota_remount/quota_remount_test01.sh | 2 +- testcases/kernel/security/integrity/ima/tests/evm_overlay.sh | 2 +- testcases/kernel/tracing/dynamic_debug/dynamic_debug01.sh | 2 +- testcases/lib/tst_test.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
testcases/kernel/fs/quota_remount/quota_remount_test01.sh +1 -1
@@ -32,7 +32,7 @@ do_setup() do_clean() { [ "$mounted" ] || return - tst_umount $MNTDIR + tst_umount $PWD/$MNTDIR mounted= }
testcases/kernel/security/integrity/ima/tests/evm_overlay.sh +1 -1
@@ -83,7 +83,7 @@ cleanup() { [ -n "$mounted" ] || return 0 - tst_umount $TST_DEVICE + tst_umount $TST_MNTPOINT TST_DEVICE="$device_backup" TST_FS_TYPE="$fs_type_backup"
testcases/kernel/tracing/dynamic_debug/dynamic_debug01.sh +1 -1
@@ -38,7 +38,7 @@ mount_debugfs() if ! grep -q debugfs /proc/filesystems ; then tst_res TCONF "debugfs not supported" fi - DEBUGFS_PATH="./tst_debug" + DEBUGFS_PATH="$PWD/tst_debug" mkdir "$DEBUGFS_PATH" if mount -t debugfs xxx "$DEBUGFS_PATH" ; then tst_res TINFO "debugfs mounted at $DEBUGFS_PATH"
testcases/lib/tst_test.sh +1 -1
@@ -632,7 +632,7 @@ tst_run() cd "$TST_TMPDIR" fi - TST_MNTPOINT="${TST_MNTPOINT:-mntpoint}" + TST_MNTPOINT="${TST_MNTPOINT:-$PWD/mntpoint}" if [ "$TST_NEEDS_DEVICE" = 1 ]; then TST_DEVICE=$(tst_device acquire)
Signature · 1 line
2.17.0
PATCH v7 4/4 Make argument to tst_umount an absolute path
Hi Leo,
Also evm_overlay.sh needs to be fixed, I'll change it before merge:
+++ testcases/kernel/security/integrity/ima/tests/evm_overlay.sh @@ -34,7 +34,7 @@ setup()
TST_FS_TYPE="overlay"
mntpoint_backup="$TST_MNTPOINT"
- TST_MNTPOINT="$merged"
+ TST_MNTPOINT="$PWD/$merged"
params_backup="$TST_MNT_PARAMS"
TST_MNT_PARAMS="-o lowerdir=$lower,upperdir=$upper,workdir=$work"
for whole patchset.
Kind regards,
Petr
PATCH v7 4/4 Make argument to tst_umount an absolute path
In reply to Leo LiangHi!
testcases/kernel/fs/quota_remount/quota_remount_test01.sh do_setup() · line 35
Quoted 3 lines
testcases/kernel/fs/quota_remount/quota_remount_test01.sh +1
-1[ "$mounted" ] || return - tst_umount $MNTDIR + tst_umount $PWD/$MNTDIR
I guess that we should have the $PWD/$MNTDIR inside of double quotes just to be extra careful.
Other than that with the chage proposed by Peter:
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH v7 4/4 Make argument to tst_umount an absolute path
Hi Cyril, Leo,
Quoted 7 lines
Hi!
testcases/kernel/fs/quota_remount/quota_remount_test01.sh do_setup() · line 35
Quoted 3 lines
testcases/kernel/fs/quota_remount/quota_remount_test01.sh +1
-1[ "$mounted" ] || return - tst_umount $MNTDIR + tst_umount $PWD/$MNTDIRI guess that we should have the $PWD/$MNTDIR inside of double quotes just to be extra careful.
Thanks for catching problems, updated and merged.
I also post yet additional update of docs (TST_MNTPOINT should be full path).
Kind regards,
Petr