Index: projects/zfsd/head/tests/sys/cddl/zfs/bin/fstyp.ksh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/bin/fstyp.ksh (revision 292366) +++ projects/zfsd/head/tests/sys/cddl/zfs/bin/fstyp.ksh (nonexistent) @@ -1,4 +0,0 @@ -#!/usr/local/bin/ksh93 - -echo zfs -exit 0 Index: projects/zfsd/head/tests/sys/cddl/zfs/bin/Makefile =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/bin/Makefile (revision 292366) +++ projects/zfsd/head/tests/sys/cddl/zfs/bin/Makefile (revision 292367) @@ -1,61 +1,60 @@ # $FreeBSD$ .include MAN= 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 SCRIPTS+= fmadm.ksh SCRIPTS+= fmdump.ksh SCRIPTS+= format.ksh -SCRIPTS+= fstyp.ksh SCRIPTS+= groupadd.ksh SCRIPTS+= groupdel.ksh SCRIPTS+= groupmod.ksh SCRIPTS+= groupshow.ksh SCRIPTS+= svcs.ksh SCRIPTS+= swap.ksh SCRIPTS+= testenv.ksh SCRIPTS+= useradd.ksh SCRIPTS+= userdel.ksh SCRIPTS+= usermod.ksh SCRIPTS+= zfs.ksh SCRIPTS+= zfs_crypto.ksh SCRIPTS+= zfs_version.ksh SCRIPTS+= zlogin.ksh SCRIPTS+= zoneadm.ksh SCRIPTS+= zonecfg.ksh SCRIPTS+= zpool.ksh SCRIPTS+= zpool_bsd.ksh SCRIPTS+= zpool_smi.ksh SCRIPTS+= zpool_version.ksh PROGS+= chg_usr_exec # Not ported to FreeBSD # PROGRS+= devname2devid PROGS+= dir_rd_update PROGS+= file_check PROGS+= file_trunc PROGS+= file_write PROGS+= largest_file PROGS+= mktree PROGS+= mmapwrite PROGS+= randfree_file PROGS+= readmmap PROGS+= rename_dir PROGS+= rm_lnkcnt_zero_file .for p in ${PROGS} SRCS.$p= $p.c .endfor LDADD.mmapwrite+= -lpthread LDADD.rm_lnkcnt_zero_file+= -lpthread .include Index: projects/zfsd/head/tests/sys/cddl/zfs/include/commands.txt =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/include/commands.txt (revision 292366) +++ projects/zfsd/head/tests/sys/cddl/zfs/include/commands.txt (revision 292367) @@ -1,189 +1,189 @@ # # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # #!/usr/local/bin/ksh93 -p # # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # #ident "@(#)commands.txt 1.8 09/01/13 SMI" # # All the commands in this file are converted into environment variables # with the same name as the command e.g. # # /bin/df becomes export DF="/bin/df" # finally an export CMDS="aggregation of all the environment variables" # is created for checking in the execution environment. # # comments are ignored in this file, as are whitespace lines # General Solaris Commands /usr/bin/awk /usr/sbin/arp /usr/bin/basename /bin/cat /usr/bin/cd /usr/bin/chgrp /bin/chmod /usr/sbin/chown /usr/bin/cksum /sbin/clri /usr/bin/cmp /usr/bin/compress /usr/bin/uncompress #/usr/bin/coreadm /bin/cp /usr/bin/cpio /usr/bin/cut /bin/date /bin/dd #/usr/sbin/devfsadm %%STFSUITEDIR%%/bin/df /usr/bin/diff %%STFSUITEDIR%%/bin/dircmp /usr/bin/dirname /usr/bin/du #%%STFSUITEDIR%%/bin/dumpadm /bin/echo /usr/bin/egrep /usr/bin/env #%%STFSUITEDIR%%/bin/ff /usr/bin/fgrep /usr/bin/file /usr/bin/find #%%STFSUITEDIR%%/bin/fmadm #%%STFSUITEDIR%%/bin/fmdump #%%STFSUITEDIR%%/bin/format /sbin/fsck /sbin/fsdb /sbin/fsirand /usr/bin/fsync -#%%STFSUITEDIR%%/bin/fstyp +/usr/sbin/fstyp /usr/bin/id #/usr/bin/isainfo #/usr/sbin/iscsiadm #/usr/sbin/iscsitadm /usr/bin/getent /bin/getfacl /usr/bin/getconf /sbin/sha1 /sbin/gpart /usr/bin/grep /usr/bin/groups %%STFSUITEDIR%%/bin/groupadd %%STFSUITEDIR%%/bin/groupdel %%STFSUITEDIR%%/bin/groupmod %%STFSUITEDIR%%/bin/groupshow /usr/bin/head /bin/hostname /bin/kill /usr/local/bin/ksh93 #/usr/sbin/labelit #/usr/sbin/lockfs #/usr/sbin/lofiadm /bin/ls /usr/bin/logname #/usr/bin/mdb /sbin/mdconfig #/usr/sbin/metaclear #/usr/sbin/metadb #/usr/sbin/metainit #/usr/sbin/metastat /bin/mkdir /usr/local/sbin/mkfile /sbin/mknod #/usr/sbin/modinfo #/usr/sbin/modunload /sbin/mount /bin/mv #/usr/sbin/ncheck /sbin/newfs /usr/bin/nawk #/usr/bin/pack /usr/bin/pagesize /bin/pax /sbin/ping /usr/bin/printf #/usr/sbin/prtvtoc #/usr/bin/pfexec /bin/pgrep #/usr/bin/pkginfo /bin/pkill /bin/ps #/usr/sbin/psrinfo /bin/pwd /usr/sbin/quotaon /bin/rcp /sbin/reboot /bin/rm /bin/rmdir /usr/bin/rsh #/usr/bin/runat /usr/bin/sed #/usr/sbin/share /bin/sleep /usr/bin/su /usr/bin/sum #%%STFSUITEDIR%%/bin/svcs #/usr/sbin/svcadm #%%STFSUITEDIR%%/bin/swap #/sbin/swapadd /usr/bin/sort /usr/bin/strings /bin/sync /usr/bin/tar /usr/bin/tail /usr/bin/touch /usr/bin/tr /usr/bin/true /sbin/tunefs #/usr/sbin/ufsdump #/usr/sbin/ufsrestore /usr/bin/umask /sbin/umount /usr/bin/uname /usr/bin/uniq #/usr/sbin/unshare #/usr/bin/unpack %%STFSUITEDIR%%/bin/useradd %%STFSUITEDIR%%/bin/userdel %%STFSUITEDIR%%/bin/usermod /usr/bin/wait /usr/bin/wc #%%STFSUITEDIR%%/bin/zoneadm #%%STFSUITEDIR%%/bin/zonecfg #%%STFSUITEDIR%%/bin/zlogin #/usr/bin/zonename /sbin/swapon /sbin/swapoff /sbin/swapctl /usr/bin/xargs /sbin/zfsd # ZFS Commands /usr/sbin/zdb /sbin/zfs /sbin/zpool /usr/bin/zinject # Test framework commands #/opt/SUNWstc-runwattr/bin/runwattr %%STFSUITEDIR%%/bin/bsddisks Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/utils_test/utils_test_007_pos.ksh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/utils_test/utils_test_007_pos.ksh (revision 292366) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/utils_test/utils_test_007_pos.ksh (revision 292367) @@ -1,85 +1,83 @@ #!/usr/local/bin/ksh93 -p # # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "@(#)utils_test_007_pos.ksh 1.4 09/01/12 SMI" # . $STF_SUITE/include/libtest.kshlib . $STF_SUITE/tests/utils_test/utils_test.kshlib ################################################################################ # # __stc_assertion_start # # ID: utils_test_007_pos # # DESCRIPTION: -# Ensure that the fstyp(1M) utility succeeds on a ZFS file system. +# Ensure that the fstyp(8) utility succeeds on a ZFS file system. # # STRATEGY: # 1. Populate a ZFS file system with some files. -# 2. Run fstyp(1M) against the device. -# 3. Ensure it fails. +# 2. Run fstyp(8) against the device. +# 3. Ensure it passes # # TESTABILITY: explicit # # TEST_AUTOMATION_LEVEL: automated # # CODING_STATUS: COMPLETED (2005-07-04) # # __stc_assertion_end # ################################################################################ verify_runnable "global" function cleanup { ismounted $TESTPOOL/$TESTFS (( $? != 0 )) && \ log_must $ZFS mount $TESTPOOL/$TESTFS $RM -rf $TESTDIR/* } log_onexit cleanup -log_assert "Ensure that the fstyp(1M) utility succeeds on a ZFS file system." +log_assert "Ensure that the fstyp(8) utility succeeds on a ZFS file system." test_requires FSTYP populate_dir $TESTDIR/$TESTFILE $NUM_FILES $WRITE_COUNT $BLOCKSZ $DATA log_must $ZFS unmount $TESTDIR -if ! $(is_physical_device $DISK); then - log_must $FSTYP $DISK -elif [[ $WRAPPER == "smi" ]]; then - log_must $FSTYP /dev/rdsk/${DISK}s2 -else - log_must $FSTYP /dev/rdsk/${DISK}s0 -fi +log_must $FSTYP $DISK +detected_filesystem=$( $FSTYP $DISK ) +if [ "$detected_filesystem" != "zfs" ]; then + log_fail "fstyp(8) detected $detected_filesystem instead of zfs" +fi -log_pass "fstyp(1M) returned successfully." +log_pass "fstyp(8) returned successfully."