Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Feb 2018 21:33:23 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r329039 - projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_clear
Message-ID:  <201802082133.w18LXN91073423@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: asomers
Date: Thu Feb  8 21:33:23 2018
New Revision: 329039
URL: https://svnweb.freebsd.org/changeset/base/329039

Log:
  Fix the zpool_clear tests when no disks are available
  
  zpool_clear_001 through 004 don't actually need disks, but setup.ksh
  uselessly creates a disk-backed pool anyway.  Delete setup.ksh.
  zpool_clear_005 needs 3 disks.  Declare it so.
  
  Sponsored by:	Spectra Logic Corp

Deleted:
  projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_clear/setup.ksh
Modified:
  projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_clear/Makefile
  projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_clear/zpool_clear_test.sh

Modified: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_clear/Makefile
==============================================================================
--- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_clear/Makefile	Thu Feb  8 21:28:10 2018	(r329038)
+++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_clear/Makefile	Thu Feb  8 21:33:23 2018	(r329039)
@@ -13,7 +13,6 @@ ${PACKAGE}FILES+=	zpool_clear_003_neg.ksh
 ${PACKAGE}FILES+=	zpool_clear_002_neg.ksh
 ${PACKAGE}FILES+=	zpool_clear.cfg
 ${PACKAGE}FILES+=	zpool_clear_001_pos.ksh
-${PACKAGE}FILES+=	setup.ksh
 ${PACKAGE}FILES+=	zpool_clear_004_pos.ksh
 ${PACKAGE}FILES+=	zpool_clear_005_pos.ksh
 

Modified: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_clear/zpool_clear_test.sh
==============================================================================
--- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_clear/zpool_clear_test.sh	Thu Feb  8 21:28:10 2018	(r329038)
+++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_clear/zpool_clear_test.sh	Thu Feb  8 21:33:23 2018	(r329039)
@@ -36,7 +36,6 @@ zpool_clear_001_pos_body()
 	. $(atf_get_srcdir)/../../../include/default.cfg
 	. $(atf_get_srcdir)/zpool_clear.cfg
 
-	ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed"
 	ksh93 $(atf_get_srcdir)/zpool_clear_001_pos.ksh || atf_fail "Testcase failed"
 }
 zpool_clear_001_pos_cleanup()
@@ -60,7 +59,6 @@ zpool_clear_002_neg_body()
 	. $(atf_get_srcdir)/../../../include/default.cfg
 	. $(atf_get_srcdir)/zpool_clear.cfg
 
-	ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed"
 	ksh93 $(atf_get_srcdir)/zpool_clear_002_neg.ksh || atf_fail "Testcase failed"
 }
 zpool_clear_002_neg_cleanup()
@@ -84,7 +82,6 @@ zpool_clear_003_neg_body()
 	. $(atf_get_srcdir)/../../../include/default.cfg
 	. $(atf_get_srcdir)/zpool_clear.cfg
 
-	ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed"
 	ksh93 $(atf_get_srcdir)/zpool_clear_003_neg.ksh || atf_fail "Testcase failed"
 }
 zpool_clear_003_neg_cleanup()
@@ -108,7 +105,6 @@ zpool_clear_004_pos_body()
 	. $(atf_get_srcdir)/zpool_clear.cfg
 
 	atf_expect_fail "https://www.illumos.org/issues/8641 zpool clear doesn't work on spare or replacing vdevs"
-	ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed"
 	ksh93 $(atf_get_srcdir)/zpool_clear_004_pos.ksh || atf_fail "Testcase failed"
 }
 zpool_clear_004_pos_cleanup()
@@ -130,7 +126,7 @@ zpool_clear_005_pos_body()
 	. $(atf_get_srcdir)/../../../include/default.cfg
 	. $(atf_get_srcdir)/zpool_clear.cfg
 
-	ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed"
+	verify_disk_count "$DISKS" 3
 	ksh93 $(atf_get_srcdir)/zpool_clear_005_pos.ksh || atf_fail "Testcase failed"
 }
 zpool_clear_005_pos_cleanup()



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