From owner-svn-src-projects@freebsd.org Tue Feb 13 17:56:02 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 D893AF15B06 for ; Tue, 13 Feb 2018 17:56:01 +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 8568087398; Tue, 13 Feb 2018 17:56:01 +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 806A2241F4; Tue, 13 Feb 2018 17:56:01 +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 w1DHu1R4007950; Tue, 13 Feb 2018 17:56:01 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1DHu07Q007942; Tue, 13 Feb 2018 17:56:00 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201802131756.w1DHu07Q007942@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:56:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r329234 - in projects/zfsd/head/tests/sys/cddl/zfs: bin include tests/clean_mirror tests/cli_root/zfs_upgrade tests/devices tests/largest_pool tests/scrub_mirror X-SVN-Group: projects X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in projects/zfsd/head/tests/sys/cddl/zfs: bin include tests/clean_mirror tests/cli_root/zfs_upgrade tests/devices tests/largest_pool tests/scrub_mirror X-SVN-Commit-Revision: 329234 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:56:02 -0000 Author: asomers Date: Tue Feb 13 17:56:00 2018 New Revision: 329234 URL: https://svnweb.freebsd.org/changeset/base/329234 Log: Use native df(1) in the ZFS test suite Eliminate the weird Illumos partial-compatibility wrapper. tests/sys/cddl/zfs/bin/Makefile tests/sys/cddl/zfs/bin/df.ksh Delete the compatibility wrapper tests/sys/cddl/zfs/include/libtest.kshlib tests/sys/cddl/zfs/tests/clean_mirror/cleanup.ksh tests/sys/cddl/zfs/tests/cli_root/zfs_upgrade/zfs_upgrade.kshlib tests/sys/cddl/zfs/tests/cli_root/zfs_upgrade/zfs_upgrade_005_pos.ksh tests/sys/cddl/zfs/tests/devices/devices_common.kshlib tests/sys/cddl/zfs/tests/largest_pool/largest_pool_001_pos.ksh tests/sys/cddl/zfs/tests/scrub_mirror/cleanup.ksh Adjust usage of df Sponsored by: Spectra Logic Corp Deleted: projects/zfsd/head/tests/sys/cddl/zfs/bin/df.ksh Modified: projects/zfsd/head/tests/sys/cddl/zfs/bin/Makefile projects/zfsd/head/tests/sys/cddl/zfs/include/libtest.kshlib projects/zfsd/head/tests/sys/cddl/zfs/tests/clean_mirror/cleanup.ksh projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_upgrade/zfs_upgrade.kshlib projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_upgrade/zfs_upgrade_005_pos.ksh projects/zfsd/head/tests/sys/cddl/zfs/tests/devices/devices_common.kshlib projects/zfsd/head/tests/sys/cddl/zfs/tests/largest_pool/largest_pool_001_pos.ksh projects/zfsd/head/tests/sys/cddl/zfs/tests/scrub_mirror/cleanup.ksh Modified: projects/zfsd/head/tests/sys/cddl/zfs/bin/Makefile ============================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/bin/Makefile Tue Feb 13 17:52:00 2018 (r329233) +++ projects/zfsd/head/tests/sys/cddl/zfs/bin/Makefile Tue Feb 13 17:56:00 2018 (r329234) @@ -8,7 +8,6 @@ BINDIR= ${TESTSBASE}/sys/cddl/zfs/bin SCRIPTSDIR= ${TESTSBASE}/sys/cddl/zfs/bin SCRIPTS+= bsddisks.ksh -SCRIPTS+= df.ksh SCRIPTS+= dircmp.ksh SCRIPTS+= dumpadm.ksh SCRIPTS+= ff.ksh Modified: projects/zfsd/head/tests/sys/cddl/zfs/include/libtest.kshlib ============================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/include/libtest.kshlib Tue Feb 13 17:52:00 2018 (r329233) +++ projects/zfsd/head/tests/sys/cddl/zfs/include/libtest.kshlib Tue Feb 13 17:56:00 2018 (r329234) @@ -2756,11 +2756,7 @@ function get_fstype log_fail "Usage: get_fstype " fi - # - # $ df -n / - # / : ufs - # - $DF -n $dir | $AWK '{print $3}' + $DF -T $dir | $AWK '{print $2}' } # @@ -2936,8 +2932,7 @@ function pool_prop_exist # function is_zfsroot { - $DF -n / | $GREP zfs > /dev/null 2>&1 - return $? + $DF -T / | $GREP -q zfs } # Modified: projects/zfsd/head/tests/sys/cddl/zfs/tests/clean_mirror/cleanup.ksh ============================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/clean_mirror/cleanup.ksh Tue Feb 13 17:52:00 2018 (r329233) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/clean_mirror/cleanup.ksh Tue Feb 13 17:56:00 2018 (r329234) @@ -31,7 +31,7 @@ verify_runnable "global" -$DF -F zfs -h | $GREP "$TESTFS " >/dev/null +$DF -t zfs -h | $GREP "$TESTFS " >/dev/null [[ $? == 0 ]] && log_must $ZFS umount -f $TESTDIR destroy_pool $TESTPOOL Modified: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_upgrade/zfs_upgrade.kshlib ============================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_upgrade/zfs_upgrade.kshlib Tue Feb 13 17:52:00 2018 (r329233) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_upgrade/zfs_upgrade.kshlib Tue Feb 13 17:56:00 2018 (r329234) @@ -137,7 +137,7 @@ function default_check_zfs_upgrade #rootfs typeset newv typeset -i df_ret - $DF -F zfs / > /dev/null 2>&1 + $DF -t zfs / > /dev/null 2>&1 df_ret=$? for newv in "" $ZFS_VERSION; do Modified: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_upgrade/zfs_upgrade_005_pos.ksh ============================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_upgrade/zfs_upgrade_005_pos.ksh Tue Feb 13 17:52:00 2018 (r329233) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_upgrade/zfs_upgrade_005_pos.ksh Tue Feb 13 17:56:00 2018 (r329234) @@ -90,7 +90,7 @@ function setup_datasets log_assert "Executing 'zfs upgrade [-V version] -a' command succeeds." -$DF -F zfs / > /dev/null 2>&1 +$DF -t zfs / > /dev/null 2>&1 if (( $? == 0 )) ; then log_unsupported "This case should not run on ZFS root system" fi Modified: projects/zfsd/head/tests/sys/cddl/zfs/tests/devices/devices_common.kshlib ============================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/devices/devices_common.kshlib Tue Feb 13 17:52:00 2018 (r329233) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/devices/devices_common.kshlib Tue Feb 13 17:56:00 2018 (r329234) @@ -42,7 +42,7 @@ function create_dev_file case $filetype in b) - devtype=$($DF -n / | $AWK '{print $3}') + devtype=$($DF -T / | $AWK '{print $2}') case $devtype in zfs) rootpool=$($DF / | \ @@ -62,7 +62,7 @@ function create_dev_file # Get the existing block device file in current system. # And bring out the first one. # - devstr=$($DF -lhF ufs | \ + devstr=$($DF -lht ufs | \ $GREP "^/dev/dsk" | \ $AWK '{print $1}') devstr=$($ECHO "$devstr" | \ Modified: projects/zfsd/head/tests/sys/cddl/zfs/tests/largest_pool/largest_pool_001_pos.ksh ============================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/largest_pool/largest_pool_001_pos.ksh Tue Feb 13 17:52:00 2018 (r329233) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/largest_pool/largest_pool_001_pos.ksh Tue Feb 13 17:56:00 2018 (r329234) @@ -79,7 +79,7 @@ function parse_expected_output $AWK '{print $2}' | $GREP $CHKUNIT" log_note "Detect the file system in this test machine." - log_must eval "$DF -F zfs -h > $TMPDIR/j.${TESTCASE_ID}" + log_must eval "$DF -t zfs -h > $TMPDIR/j.${TESTCASE_ID}" log_must eval "$GREP $TESTPOOL $TMPDIR/j.${TESTCASE_ID} | \ $AWK '{print $2}' | $GREP $CHKUNIT" Modified: projects/zfsd/head/tests/sys/cddl/zfs/tests/scrub_mirror/cleanup.ksh ============================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/scrub_mirror/cleanup.ksh Tue Feb 13 17:52:00 2018 (r329233) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/scrub_mirror/cleanup.ksh Tue Feb 13 17:56:00 2018 (r329234) @@ -31,7 +31,7 @@ verify_runnable "global" -$DF -F zfs -h | $GREP "$TESTFS " >/dev/null +$DF -t zfs -h | $GREP "$TESTFS " >/dev/null [[ $? == 0 ]] && log_must $ZFS umount -f $TESTDIR destroy_pool $TESTPOOL