svn commit: r353282 - head/tests/sys/cddl/zfs/tests/slog
Alan Somers
asomers at FreeBSD.org
Mon Oct 7 18:55:41 UTC 2019
Author: asomers
Date: Mon Oct 7 18:55:40 2019
New Revision: 353282
URL: https://svnweb.freebsd.org/changeset/base/353282
Log:
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
Modified:
head/tests/sys/cddl/zfs/tests/slog/slog_012_neg.ksh
Modified: head/tests/sys/cddl/zfs/tests/slog/slog_012_neg.ksh
==============================================================================
--- head/tests/sys/cddl/zfs/tests/slog/slog_012_neg.ksh Mon Oct 7 18:21:33 2019 (r353281)
+++ head/tests/sys/cddl/zfs/tests/slog/slog_012_neg.ksh Mon Oct 7 18:55:40 2019 (r353282)
@@ -74,7 +74,9 @@ function test_slog_mirror_corruption # <pooltype> <spa
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
More information about the svn-src-all
mailing list