Skip to content

Commit c9cf9bd

Browse files
pcd1193182behlendorf
authored andcommitted
ZTS: send-c_volume is flaky
We use block_device_wait to wait for the zvol block device to actually appear, and we log the result of the dd calls by using an intermediate file. Reviewed-by: George Melikov <[email protected]> Reviewed-by: John Wren Kennedy <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Paul Dagnelie <[email protected]> Closes openzfs#14767
1 parent e2a96aa commit c9cf9bd

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/zfs-tests/tests/functional/rsend/send-c_volume.ksh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
function cleanup
3131
{
32+
rm $BACKDIR/copy
3233
log_must_busy zfs destroy -r $vol
3334
cleanup_pool $POOL2
3435
}
@@ -60,7 +61,9 @@ log_must eval "zfs recv -d $POOL2 <$BACKDIR/full"
6061

6162
verify_stream_size $BACKDIR/full $vol
6263
verify_stream_size $BACKDIR/full $vol2
63-
md5=$(dd if=$voldev2 bs=1024k count=$megs 2>/dev/null | md5digest)
64+
block_device_wait $voldev2
65+
log_must dd if=$voldev2 of=$BACKDIR/copy bs=1024k count=$megs
66+
md5=$(md5digest $BACKDIR/copy)
6467
[[ $md5 = $md5_1 ]] || log_fail "md5 mismatch: $md5 != $md5_1"
6568

6669
# Repeat, for an incremental send
@@ -72,7 +75,9 @@ log_must eval "zfs recv -d $POOL2 <$BACKDIR/inc"
7275

7376
verify_stream_size $BACKDIR/inc $vol 90 $vol@snap
7477
verify_stream_size $BACKDIR/inc $vol2 90 $vol2@snap
75-
md5=$(dd skip=$megs if=$voldev2 bs=1024k count=$megs 2>/dev/null | md5digest)
78+
block_device_wait $voldev2
79+
log_must dd skip=$megs if=$voldev2 of=$BACKDIR/copy bs=1024k count=$megs
80+
md5=$(md5digest $BACKDIR/copy)
7681
[[ $md5 = $md5_2 ]] || log_fail "md5 mismatch: $md5 != $md5_2"
7782

7883
log_pass "Verify compressed send works with volumes"

0 commit comments

Comments
 (0)