[xfstests-bld PATCH 1/2] test-appliance: fix specifying f2fs mount options in config file

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



From: Eric Biggers <ebiggers@xxxxxxxxxx>

setup_mount_opts() is supposed to prepend "-o " to the mount options,
but it failed to do so in the case where mount options are specified in
a config file rather than on the command line.  Fix it.

Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>
---
 kvm-xfstests/test-appliance/files/root/fs/f2fs/config | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/kvm-xfstests/test-appliance/files/root/fs/f2fs/config b/kvm-xfstests/test-appliance/files/root/fs/f2fs/config
index b0c2196..94c402b 100644
--- a/kvm-xfstests/test-appliance/files/root/fs/f2fs/config
+++ b/kvm-xfstests/test-appliance/files/root/fs/f2fs/config
@@ -31,12 +31,9 @@ function format_filesystem()
 function setup_mount_opts()
 {
     if test -n "$MNTOPTS" ; then
-	if test -n "$F2FS_MOUNT_OPTIONS" ; then
-	    export F2FS_MOUNT_OPTIONS="$F2FS_MOUNT_OPTIONS,$MNTOPTS"
-	else
-	    export F2FS_MOUNT_OPTIONS="-o $MNTOPTS"
-	fi
+	F2FS_MOUNT_OPTIONS+="${F2FS_MOUNT_OPTIONS:+,}$MNTOPTS"
     fi
+    export F2FS_MOUNT_OPTIONS="${F2FS_MOUNT_OPTIONS:+-o }$F2FS_MOUNT_OPTIONS"
 }
 
 function get_mkfs_opts()
-- 
2.17.0.484.g0c8726318c-goog

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux