@@ -30,9 +30,9 @@ function setup_mount_opts()
{
if test -n "$MNTOPTS" ; then
if test -n "$MOUNT_OPTIONS" ; then
- MOUNT_OPTIONS="$MOUNT_OPTIONS,$MNTOPTS"
+ export MOUNT_OPTIONS="$MOUNT_OPTIONS,$MNTOPTS"
else
- MOUNT_OPTIONS="-o $MNTOPTS"
+ export MOUNT_OPTIONS="-o $MNTOPTS"
fi
fi
}
@@ -30,9 +30,9 @@ function setup_mount_opts()
{
if test -n "$MNTOPTS" ; then
if test -n "$EXT_MOUNT_OPTIONS" ; then
- EXT_MOUNT_OPTIONS="$EXT_MOUNT_OPTIONS,$MNTOPTS"
+ export EXT_MOUNT_OPTIONS="$EXT_MOUNT_OPTIONS,$MNTOPTS"
else
- EXT_MOUNT_OPTIONS="-o $MNTOPTS"
+ export EXT_MOUNT_OPTIONS="-o $MNTOPTS"
fi
fi
}
@@ -30,12 +30,12 @@ function setup_mount_opts()
{
export MKFS_OPTIONS="$EXT_MKFS_OPTIONS"
if test -n "$EXT_MOUNT_OPTIONS" ; then
- EXT_MOUNT_OPTIONS="-o block_validity,$EXT_MOUNT_OPTIONS"
+ export EXT_MOUNT_OPTIONS="-o block_validity,$EXT_MOUNT_OPTIONS"
else
- EXT_MOUNT_OPTIONS="-o block_validity"
+ export EXT_MOUNT_OPTIONS="-o block_validity"
fi
if test -n "$MNTOPTS" ; then
- EXT_MOUNT_OPTIONS="$EXT_MOUNT_OPTIONS,$MNTOPTS"
+ export EXT_MOUNT_OPTIONS="$EXT_MOUNT_OPTIONS,$MNTOPTS"
fi
if echo "$EXT_MOUNT_OPTIONS" | grep -q test_dummy_encryption; then
local mode='\x00\x00\x00\x00'
@@ -28,9 +28,9 @@ function setup_mount_opts()
{
if test -n "$MNTOPTS" ; then
if test -n "$F2FS_MOUNT_OPTIONS" ; then
- F2FS_MOUNT_OPTIONS="$F2FS_MOUNT_OPTIONS,$MNTOPTS"
+ export F2FS_MOUNT_OPTIONS="$F2FS_MOUNT_OPTIONS,$MNTOPTS"
else
- F2FS_MOUNT_OPTIONS="-o $MNTOPTS"
+ export F2FS_MOUNT_OPTIONS="-o $MNTOPTS"
fi
fi
}
@@ -13,6 +13,5 @@ export TEST_DEV=$LG_TST_DEV
export TEST_DIR=$LG_TST_MNT
export SCRATCH_DEV=$LG_SCR_DEV
export SCRATCH_MNT=$LG_SCR_MNT
-export EXT_MOUNT_OPTIONS=""
TESTNAME="overlayfs large"
mkdir -p /test/tmp /test/scratch
@@ -13,6 +13,5 @@ export TEST_DEV=$SM_TST_DEV
export TEST_DIR=$SM_TST_MNT
export SCRATCH_DEV=$SM_SCR_DEV
export SCRATCH_MNT=$SM_SCR_MNT
-export EXT_MOUNT_OPTIONS=""
TESTNAME="overlayfs small"
mkdir -p /test/tmp /test/scratch
@@ -92,10 +92,10 @@ function format_filesystem()
function setup_mount_opts()
{
if test -n "$MNTOPTS" ; then
- if test -n "OVERLAY_MOUNT_OPTIONS" ; then
- OVERLAY_MOUNT_OPTIONS="$OVERLAY_MOUNT_OPTIONS,$MNTOPTS"
+ if test -n "$OVERLAY_MOUNT_OPTIONS" ; then
+ export OVERLAY_MOUNT_OPTIONS="$OVERLAY_MOUNT_OPTIONS,$MNTOPTS"
else
- OVERLAY_MOUNT_OPTIONS="-o $MNTOPTS"
+ export OVERLAY_MOUNT_OPTIONS="-o $MNTOPTS"
fi
fi
}
@@ -18,9 +18,9 @@ function setup_mount_opts()
{
if test -n "$MNTOPTS" ; then
if test -n "$TMPFS_MOUNT_OPTIONS" ; then
- TMPFS_MOUNT_OPTIONS="$TMPFS_MOUNT_OPTIONS,$MNTOPTS"
+ export TMPFS_MOUNT_OPTIONS="$TMPFS_MOUNT_OPTIONS,$MNTOPTS"
else
- TMPFS_MOUNT_OPTIONS="-o $MNTOPTS"
+ export TMPFS_MOUNT_OPTIONS="-o $MNTOPTS"
fi
fi
}
@@ -30,9 +30,9 @@ function setup_mount_opts()
{
if test -n "$MNTOPTS" ; then
if test -n "$XFS_MOUNT_OPTIONS" ; then
- XFS_MOUNT_OPTIONS="$XFS_MOUNT_OPTIONS,$MNTOPTS"
+ export XFS_MOUNT_OPTIONS="$XFS_MOUNT_OPTIONS,$MNTOPTS"
else
- XFS_MOUNT_OPTIONS="-o $MNTOPTS"
+ export XFS_MOUNT_OPTIONS="-o $MNTOPTS"
fi
fi
}
When passing MNTOPTS via kvm-xfstests -m command, mount options where not exported to environment, unless the specific fs cfg file had already exported the mount options variable. Signed-off-by: Amir Goldstein <amir73il@gmail.com> --- Ted, While working on overlayfs tests, I found out that kvm-xfstests -m <mount_options> was broken for overlayfs. I decided to fix the problem in overlay/config instead of in individual cfg/* files. I made a similar fix to all other fs, although there may not be a problem with specific cfg files and although I tested the -m option only with overlayfs. This fix is based on an eariler overlay config change from March and added to the same pull request: https://github.com/tytso/xfstests-bld/pull/4 If you want to pick only this fix, there will be a very trivial merge conflict in the overlay cfg files. Please pull. Thanks, Amir. kvm-xfstests/test-appliance/files/root/fs/btrfs/config | 4 ++-- kvm-xfstests/test-appliance/files/root/fs/ext2/config | 4 ++-- kvm-xfstests/test-appliance/files/root/fs/ext4/config | 6 +++--- kvm-xfstests/test-appliance/files/root/fs/f2fs/config | 4 ++-- kvm-xfstests/test-appliance/files/root/fs/overlay/cfg/large | 1 - kvm-xfstests/test-appliance/files/root/fs/overlay/cfg/small | 1 - kvm-xfstests/test-appliance/files/root/fs/overlay/config | 6 +++--- kvm-xfstests/test-appliance/files/root/fs/tmpfs/config | 4 ++-- kvm-xfstests/test-appliance/files/root/fs/xfs/config | 4 ++-- 9 files changed, 16 insertions(+), 18 deletions(-)