zfs: fix the slog_012_neg test
This test attempts to corrupt a file-backed vdev by deleting it and then recreating it with truncate. But that doesn't work, because the pool already has the vdev open, and it happily hangs on to the open-but-deleted file. Fix by truncating the file without deleting it. MFC after: 2 weeks Sponsored by: Axcient
This commit is contained in:
parent
ba23dca684
commit
d253c454bb
@ -74,7 +74,9 @@ function test_slog_mirror_corruption # <pooltype> <sparetype>
|
||||
log_must $DD if=/dev/urandom of=$mntpnt/testfile.${TESTCASE_ID} count=100
|
||||
|
||||
ldev=$(random_get $LDEV)
|
||||
log_must create_vdevs $ldev
|
||||
eval `$STAT -s $ldev`
|
||||
log_must $TRUNCATE -s0 $ldev
|
||||
log_must $TRUNCATE -s $st_size $ldev
|
||||
log_must $ZPOOL scrub $TESTPOOL
|
||||
|
||||
log_must display_status $TESTPOOL
|
||||
|
Loading…
x
Reference in New Issue
Block a user