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 <mail@gmelikov.ru> Reviewed-by: John Wren Kennedy <john.kennedy@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Paul Dagnelie <pcd@delphix.com> Closes #14767
This commit is contained in:
parent
719534ca8e
commit
d4657835c8
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
function cleanup
|
function cleanup
|
||||||
{
|
{
|
||||||
|
rm $BACKDIR/copy
|
||||||
log_must_busy zfs destroy -r $vol
|
log_must_busy zfs destroy -r $vol
|
||||||
cleanup_pool $POOL2
|
cleanup_pool $POOL2
|
||||||
}
|
}
|
||||||
@ -60,7 +61,9 @@ log_must eval "zfs recv -d $POOL2 <$BACKDIR/full"
|
|||||||
|
|
||||||
verify_stream_size $BACKDIR/full $vol
|
verify_stream_size $BACKDIR/full $vol
|
||||||
verify_stream_size $BACKDIR/full $vol2
|
verify_stream_size $BACKDIR/full $vol2
|
||||||
md5=$(dd if=$voldev2 bs=1024k count=$megs 2>/dev/null | md5digest)
|
block_device_wait $voldev2
|
||||||
|
log_must dd if=$voldev2 of=$BACKDIR/copy bs=1024k count=$megs
|
||||||
|
md5=$(md5digest $BACKDIR/copy)
|
||||||
[[ $md5 = $md5_1 ]] || log_fail "md5 mismatch: $md5 != $md5_1"
|
[[ $md5 = $md5_1 ]] || log_fail "md5 mismatch: $md5 != $md5_1"
|
||||||
|
|
||||||
# Repeat, for an incremental send
|
# Repeat, for an incremental send
|
||||||
@ -72,7 +75,9 @@ log_must eval "zfs recv -d $POOL2 <$BACKDIR/inc"
|
|||||||
|
|
||||||
verify_stream_size $BACKDIR/inc $vol 90 $vol@snap
|
verify_stream_size $BACKDIR/inc $vol 90 $vol@snap
|
||||||
verify_stream_size $BACKDIR/inc $vol2 90 $vol2@snap
|
verify_stream_size $BACKDIR/inc $vol2 90 $vol2@snap
|
||||||
md5=$(dd skip=$megs if=$voldev2 bs=1024k count=$megs 2>/dev/null | md5digest)
|
block_device_wait $voldev2
|
||||||
|
log_must dd skip=$megs if=$voldev2 of=$BACKDIR/copy bs=1024k count=$megs
|
||||||
|
md5=$(md5digest $BACKDIR/copy)
|
||||||
[[ $md5 = $md5_2 ]] || log_fail "md5 mismatch: $md5 != $md5_2"
|
[[ $md5 = $md5_2 ]] || log_fail "md5 mismatch: $md5 != $md5_2"
|
||||||
|
|
||||||
log_pass "Verify compressed send works with volumes"
|
log_pass "Verify compressed send works with volumes"
|
||||||
|
Loading…
Reference in New Issue
Block a user