aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Elling <[email protected]>2019-06-07 10:12:42 -0700
committerBrian Behlendorf <[email protected]>2019-06-10 09:21:08 -0700
commit4cb1b541d42ae0e1f07851f3ea571935b5641624 (patch)
tree9cbe938c85c7a106bda01497a899a033d86b0c77
parentbef70afaa6fe349022a90ecc395838359ec2e7aa (diff)
Block_device_wait does not return an error code
Reviewed by: John Kennedy <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Richard Elling <[email protected]> Closes #8839
-rw-r--r--tests/zfs-tests/include/blkdev.shlib3
-rwxr-xr-xtests/zfs-tests/tests/functional/rsend/send-wDR_encrypted_zvol.ksh4
-rwxr-xr-xtests/zfs-tests/tests/functional/slog/slog_replay_volume.ksh4
-rwxr-xr-xtests/zfs-tests/tests/functional/snapshot/snapshot_009_pos.ksh2
-rwxr-xr-xtests/zfs-tests/tests/functional/snapshot/snapshot_010_pos.ksh4
5 files changed, 10 insertions, 7 deletions
diff --git a/tests/zfs-tests/include/blkdev.shlib b/tests/zfs-tests/include/blkdev.shlib
index 9cac7184f..e9d584af4 100644
--- a/tests/zfs-tests/include/blkdev.shlib
+++ b/tests/zfs-tests/include/blkdev.shlib
@@ -56,6 +56,9 @@ function scan_scsi_hosts
#
# Wait for newly created block devices to have their minors created.
#
+# Note: there is no meaningful return code if udevadm fails. Consumers
+# should not expect a return code (do not call as argument to log_must)
+#
function block_device_wait
{
if is_linux; then
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 49b846e9c..443887bfa 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
@@ -62,7 +62,7 @@ log_must eval "echo 'password' > $keyfile"
log_must zfs create -o dedup=on -o encryption=on -o keyformat=passphrase \
-o keylocation=file://$keyfile -V 128M $TESTPOOL/$TESTVOL
-log_must block_device_wait
+block_device_wait
log_must eval "echo 'y' | newfs -t ext4 -v $zdev"
log_must mkdir -p $mntpnt
@@ -82,7 +82,7 @@ done
log_must eval "zfs send -wDR $TESTPOOL/$TESTVOL@snap$snap_count > $sendfile"
log_must eval "zfs recv $TESTPOOL/recv < $sendfile"
log_must zfs load-key $TESTPOOL/recv
-log_must block_device_wait
+block_device_wait
log_must mount $recvdev $recvmnt
diff --git a/tests/zfs-tests/tests/functional/slog/slog_replay_volume.ksh b/tests/zfs-tests/tests/functional/slog/slog_replay_volume.ksh
index 2cdcb38dc..c8a3cbbf4 100755
--- a/tests/zfs-tests/tests/functional/slog/slog_replay_volume.ksh
+++ b/tests/zfs-tests/tests/functional/slog/slog_replay_volume.ksh
@@ -86,7 +86,7 @@ log_must zfs create -V 128M $TESTPOOL/$TESTVOL
log_must zfs set compression=on $TESTPOOL/$TESTVOL
log_must zfs set sync=always $TESTPOOL/$TESTVOL
log_must mkdir -p $TESTDIR
-log_must block_device_wait
+block_device_wait
echo "y" | newfs -t ext4 -v $VOLUME
log_must mkdir -p $MNTPNT
log_must mount -o discard $VOLUME $MNTPNT
@@ -149,7 +149,7 @@ log_must zpool export $TESTPOOL
# `zpool import -f` because we can't write a frozen pool's labels!
#
log_must zpool import -f $TESTPOOL
-log_must block_device_wait
+block_device_wait
log_must mount $VOLUME $MNTPNT
#
diff --git a/tests/zfs-tests/tests/functional/snapshot/snapshot_009_pos.ksh b/tests/zfs-tests/tests/functional/snapshot/snapshot_009_pos.ksh
index 6607d4ca4..1ee7e33c2 100755
--- a/tests/zfs-tests/tests/functional/snapshot/snapshot_009_pos.ksh
+++ b/tests/zfs-tests/tests/functional/snapshot/snapshot_009_pos.ksh
@@ -88,7 +88,7 @@ else
fi
log_must zfs snapshot -r $snappool
-log_must block_device_wait
+block_device_wait
#verify the snapshot -r results
for snap in $snappool $snapfs $snapvol $snapctr $snapctrvol \
diff --git a/tests/zfs-tests/tests/functional/snapshot/snapshot_010_pos.ksh b/tests/zfs-tests/tests/functional/snapshot/snapshot_010_pos.ksh
index 0f876ad6d..128b443c6 100755
--- a/tests/zfs-tests/tests/functional/snapshot/snapshot_010_pos.ksh
+++ b/tests/zfs-tests/tests/functional/snapshot/snapshot_010_pos.ksh
@@ -83,7 +83,7 @@ else
fi
log_must zfs snapshot -r $snappool
-log_must block_device_wait
+block_device_wait
#select the $TESTCTR as destroy point, $TESTCTR is a child of $TESTPOOL
log_must zfs destroy -r $snapctr
@@ -92,7 +92,7 @@ for snap in $snapctr $snapctrvol $snapctrclone $snapctrfs; do
log_fail "The snapshot $snap is not destroyed correctly."
done
-for snap in $snappool $snapfs $snapvol $ctrfs@$TESTSNAP1;do
+for snap in $snappool $snapfs $snapvol $ctrfs@$TESTSNAP1; do
! snapexists $snap && \
log_fail "The snapshot $snap should be not destroyed."
done