From owner-svn-src-projects@freebsd.org Tue Feb 13 17:58:03 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BAC3F15D73 for ; Tue, 13 Feb 2018 17:58:03 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E5F287533; Tue, 13 Feb 2018 17:58:03 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4939C241FA; Tue, 13 Feb 2018 17:58:03 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1DHw3Fq008059; Tue, 13 Feb 2018 17:58:03 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1DHw36x008058; Tue, 13 Feb 2018 17:58:03 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201802131758.w1DHw36x008058@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 13 Feb 2018 17:58:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r329235 - projects/zfsd/head/tests/sys/cddl/zfs/tests/rootpool X-SVN-Group: projects X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: projects/zfsd/head/tests/sys/cddl/zfs/tests/rootpool X-SVN-Commit-Revision: 329235 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Feb 2018 17:58:03 -0000 Author: asomers Date: Tue Feb 13 17:58:02 2018 New Revision: 329235 URL: https://svnweb.freebsd.org/changeset/base/329235 Log: Eliminate the "is_zfs_root" kyua config variable. If the user forgets to set it, then certain tests will misbehave. Better to detect a ZFS root filesystem automatically. tests/sys/cddl/zfs/tests/rootpool/rootpool_test.sh Automatically skip if there's no ZFS root filesystem Sponsored by: Spectra Logic Corp Modified: projects/zfsd/head/tests/sys/cddl/zfs/tests/rootpool/rootpool_test.sh Modified: projects/zfsd/head/tests/sys/cddl/zfs/tests/rootpool/rootpool_test.sh ============================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/rootpool/rootpool_test.sh Tue Feb 13 17:56:00 2018 (r329234) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/rootpool/rootpool_test.sh Tue Feb 13 17:58:02 2018 (r329235) @@ -28,12 +28,16 @@ atf_test_case rootpool_001_pos cleanup rootpool_001_pos_head() { atf_set "descr" "rootpool's bootfs property must be equal to " - atf_set "require.config" is_zfs_root } rootpool_001_pos_body() { . $(atf_get_srcdir)/../../include/default.cfg + if ! is_zfsroot ; then + atf_skip "This test requires a ZFS root filesystem." + fi + + ksh93 $(atf_get_srcdir)/setup.ksh ksh93 $(atf_get_srcdir)/rootpool_001_pos.ksh || atf_fail "Testcase failed" } rootpool_001_pos_cleanup() @@ -48,13 +52,16 @@ atf_test_case rootpool_002_neg cleanup rootpool_002_neg_head() { atf_set "descr" "zpool/zfs destory should return error" - atf_set "require.config" is_zfs_root atf_set "require.progs" zfs zpool } rootpool_002_neg_body() { . $(atf_get_srcdir)/../../include/default.cfg + if ! is_zfsroot ; then + atf_skip "This test requires a ZFS root filesystem." + fi + ksh93 $(atf_get_srcdir)/rootpool_002_neg.ksh || atf_fail "Testcase failed" } rootpool_002_neg_cleanup() @@ -69,12 +76,15 @@ atf_test_case rootpool_007_neg cleanup rootpool_007_neg_head() { atf_set "descr" "the zfs rootfs's compression property can not set to gzip and gzip[1-9]" - atf_set "require.config" is_zfs_root atf_set "require.progs" zfs } rootpool_007_neg_body() { . $(atf_get_srcdir)/../../include/default.cfg + + if ! is_zfsroot ; then + atf_skip "This test requires a ZFS root filesystem." + fi ksh93 $(atf_get_srcdir)/rootpool_007_neg.ksh || atf_fail "Testcase failed" }