Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Oct 2019 18:55:40 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r353282 - head/tests/sys/cddl/zfs/tests/slog
Message-ID:  <201910071855.x97Iten2033827@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910071855.x97Iten2033827>