From 591505dc2737bcd77c587e369e1d91b0fd97325c Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Fri, 31 Jan 2020 12:00:47 -0500 Subject: ZTS: Only use ext4 on Linux And while here, add a workaround for FreeBSD to ensure dirty data is synced before taking a snapshot, by remounting read-only, then remount again read-write after the snapshot. Reviewed-by: John Kennedy Reviewed-by: George Melikov Reviewed-by: Brian Behlendorf Signed-off-by: Ryan Moeller Closes #9914 --- .../tests/functional/rsend/send-wDR_encrypted_zvol.ksh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/zfs-tests/tests/functional/rsend/send-wDR_encrypted_zvol.ksh b/tests/zfs-tests/tests/functional/rsend/send-wDR_encrypted_zvol.ksh index b2797cce7..f9cfeee21 100755 --- a/tests/zfs-tests/tests/functional/rsend/send-wDR_encrypted_zvol.ksh +++ b/tests/zfs-tests/tests/functional/rsend/send-wDR_encrypted_zvol.ksh @@ -37,8 +37,8 @@ verify_runnable "both" function cleanup { - ismounted $recvmnt ext4 && log_must umount $recvmnt - ismounted $mntpnt ext4 && log_must umount $mntpnt + ismounted $recvmnt $fstype && log_must umount $recvmnt + ismounted $mntpnt $fstype && log_must umount $mntpnt [[ -d $recvmnt ]] && log_must rm -rf $keyfile [[ -d $mntpnt ]] && log_must rm -rf $keyfile destroy_dataset $TESTPOOL/recv "-r" @@ -57,6 +57,7 @@ typeset mntpnt=$TESTDIR/$TESTVOL typeset recvdev=$ZVOL_DEVDIR/$TESTPOOL/recv typeset recvmnt=$TESTDIR/recvmnt typeset sendfile=$TESTDIR/sendfile +typeset fstype=none log_must eval "echo 'password' > $keyfile" @@ -67,8 +68,14 @@ block_device_wait if is_linux; then # ext4 only supported on Linux log_must new_fs -t ext4 $zdev + fstype=ext4 + typeset remount_ro="-o remount,ro" + typeset remount_rw="-o remount,rw" else log_must new_fs $zdev + fstype=$NEWFS_DEFAULT_FS + typeset remount_ro="-ur" + typeset remount_rw="-uw" fi log_must mkdir -p $mntpnt log_must mkdir -p $recvmnt @@ -81,7 +88,9 @@ for ((i = 1; i <= $snap_count; i++)); do done log_must sync + log_must mount $remount_ro $zdev $mntpnt log_must zfs snap $TESTPOOL/$TESTVOL@snap$i + log_must mount $remount_rw $zdev $mntpnt done log_must eval "zfs send -wDR $TESTPOOL/$TESTVOL@snap$snap_count > $sendfile" -- cgit v1.2.3