--- old/usr/src/test/zfs-tests/include/commands.cfg	Wed Aug 31 16:20:18 2016
+++ new/usr/src/test/zfs-tests/include/commands.cfg	Wed Aug 31 16:20:18 2016
@@ -10,161 +10,176 @@
 #
 
 #
-# Copyright (c) 2012, 2015 by Delphix. All rights reserved.
+# Copyright (c) 2016 by Delphix. All rights reserved.
 #
 
-export ARP="/usr/sbin/arp"
-export AWK="/usr/bin/awk"
-export BASENAME="/usr/bin/basename"
-export BC="/usr/bin/bc"
-export BUNZIP2="/usr/bin/bunzip2"
-export BZCAT="/usr/bin/bzcat"
-# bzip2, bunzip2 and bzcat prepend the contents of $BZIP2 or $BZIP to any
-# arguments. Setting BZIP2 here will lead to hard-to-diagnose unhappiness.
-export CAT="/usr/bin/cat"
-export CD="/usr/bin/cd"
-export CHGRP="/usr/bin/chgrp"
-export CHMOD="/usr/bin/chmod"
-export CHOWN="/usr/bin/chown"
-export CKSUM="/usr/bin/cksum"
-export CLRI="/usr/sbin/clri"
-export CMP="/usr/bin/cmp"
-export COMPRESS="/usr/bin/compress"
-export COREADM="/usr/bin/coreadm"
-export CP="/usr/bin/cp"
-export CPIO="/usr/bin/cpio"
-export CUT="/usr/bin/cut"
-export DATE="/usr/bin/date"
-export DD="/usr/bin/dd"
-export DEVFSADM="/usr/sbin/devfsadm"
-export DF="/usr/bin/df"
-export DIFF="/usr/bin/diff"
-export DIRCMP="/usr/bin/dircmp"
-export DIRNAME="/usr/bin/dirname"
-export DTRACE="/usr/sbin/dtrace"
-export DU="/usr/bin/du"
-export DUMPADM="/usr/sbin/dumpadm"
-export ECHO="/usr/bin/echo"
-export EGREP="/usr/bin/egrep"
-# Don't use $ENV here, because in ksh scripts it evaluates to
-# $HOME/.kshrc - likely not what you wanted.
-export FALSE="/usr/bin/false"
-export FDISK="/usr/sbin/fdisk"
-export FF="/usr/sbin/ff"
-export FGREP="/usr/bin/fgrep"
-export FILE="/usr/bin/file"
-export FIND="/usr/bin/find"
-export FIO="/usr/bin/fio"
-export FMADM="/usr/sbin/fmadm"
-export FMDUMP="/usr/sbin/fmdump"
-export FORMAT="/usr/sbin/format"
-export FSCK="/usr/sbin/fsck"
-export FSDB="/usr/sbin/fsdb"
-export FSIRAND="/usr/sbin/fsirand"
-export FSTYP="/usr/sbin/fstyp"
-export GETENT="/usr/bin/getent"
-export GETMAJOR="/usr/sbin/getmajor"
-export GNUDD="/usr/gnu/bin/dd"
-export GREP="/usr/bin/grep"
-export GROUPADD="/usr/sbin/groupadd"
-export GROUPDEL="/usr/sbin/groupdel"
-export GROUPMOD="/usr/sbin/groupmod"
-export GROUPS="/usr/bin/groups"
-export HEAD="/usr/bin/head"
-export HOSTNAME="/usr/bin/hostname"
-export ID="/usr/bin/id"
-export IOSTAT="/usr/bin/iostat"
-export ISAINFO="/usr/bin/isainfo"
-export KILL="/usr/bin/kill"
-export KSH="/usr/bin/ksh"
-export KSTAT="/usr/bin/kstat"
-export LABELIT="/usr/sbin/labelit"
-export LOCKFS="/usr/sbin/lockfs"
-export LOFIADM="/usr/sbin/lofiadm"
-export LOGNAME="/usr/bin/logname"
-export LS="/usr/bin/ls"
-export MD5SUM="/usr/bin/md5sum"
-export MDB="/usr/bin/mdb"
-export MKDIR="/usr/bin/mkdir"
-export MKFILE="/usr/sbin/mkfile"
-export MKTEMP="/usr/bin/mktemp"
-export MKNOD="/usr/sbin/mknod"
-export MODINFO="/usr/sbin/modinfo"
-export MODUNLOAD="/usr/sbin/modunload"
-export MOUNT="/usr/sbin/mount"
-export MPSTAT="/usr/bin/mpstat"
-export MV="/usr/bin/mv"
-export NAWK="/usr/bin/nawk"
-export NCHECK="/usr/sbin/ncheck"
-export NEWFS="/usr/sbin/newfs"
-export PACK="/usr/bin/pack"
-export PAGESIZE="/usr/bin/pagesize"
-export PAX="/usr/bin/pax"
-export PFEXEC="/usr/bin/pfexec"
-export PGREP="/usr/bin/pgrep"
-export PING="/usr/sbin/ping"
-export PKGINFO="/usr/bin/pkginfo"
-export PKILL="/usr/bin/pkill"
-export PPRIV="/usr/bin/ppriv"
-export PRINTF="/usr/bin/printf"
-export PRTVTOC="/usr/sbin/prtvtoc"
-export PS="/usr/bin/ps"
-export PSRINFO="/usr/sbin/psrinfo"
-export PWD="/usr/bin/pwd"
-export PYTHON="/usr/bin/python"
-export QUOTAON="/usr/sbin/quotaon"
-export READLINK="/usr/bin/readlink"
-export RCP="/usr/bin/rcp"
-export REBOOT="/usr/sbin/reboot"
-export RM="/usr/bin/rm"
-export RMDIR="/usr/bin/rmdir"
-export RSH="/usr/bin/rsh"
-export RUNAT="/usr/bin/runat"
-export SED="/usr/bin/sed"
-export SHARE="/usr/sbin/share"
-export SHUF="/usr/bin/shuf"
-export SLEEP="/usr/bin/sleep"
-export SORT="/usr/bin/sort"
-export STAT="/usr/bin/stat"
-export STRINGS="/usr/bin/strings"
-export SU="/usr/bin/su"
-export SUM="/usr/bin/sum"
-export SVCADM="/usr/sbin/svcadm"
-export SVCS="/usr/bin/svcs"
-export SWAP="/usr/sbin/swap"
-export SWAPADD="/sbin/swapadd"
-export SYNC="/usr/bin/sync"
-export TAIL="/usr/bin/tail"
-export TAR="/usr/sbin/tar"
-export TIMEOUT="/usr/bin/timeout"
-export TOUCH="/usr/bin/touch"
-export TR="/usr/bin/tr"
-export TRUNCATE="/usr/bin/truncate"
-export TRUE="/usr/bin/true"
-export TUNEFS="/usr/sbin/tunefs"
-export UFSDUMP="/usr/sbin/ufsdump"
-export UFSRESTORE="/usr/sbin/ufsrestore"
-export UMASK="/usr/bin/umask"
-export UMOUNT="/usr/sbin/umount"
-export UMOUNTALL="/usr/sbin/umountall"
-export UNAME="/usr/bin/uname"
-export UNCOMPRESS="/usr/bin/uncompress"
-export UNIQ="/usr/bin/uniq"
-export UNPACK="/usr/bin/unpack"
-export UNSHARE="/usr/sbin/unshare"
-export USERADD="/usr/sbin/useradd"
-export USERDEL="/usr/sbin/userdel"
-export USERMOD="/usr/sbin/usermod"
-export VMSTAT="/usr/bin/vmstat"
-export WAIT="/usr/bin/wait"
-export WC="/usr/bin/wc"
-export ZDB="/usr/sbin/zdb"
-export ZFS="/usr/sbin/zfs"
-export ZHACK="/usr/sbin/zhack"
-export ZINJECT="/usr/sbin/zinject"
-export ZLOGIN="/usr/sbin/zlogin"
-export ZLOOK="/usr/bin/zlook"
-export ZONEADM="/usr/sbin/zoneadm"
-export ZONECFG="/usr/sbin/zonecfg"
-export ZONENAME="/usr/bin/zonename"
-export ZPOOL="/usr/sbin/zpool"
+#
+# These variables are used by zfstest.ksh to constrain which utilities
+# may be used by the suite. The suite will create a directory which is
+# the only element of $PATH and create symlinks from that dir to the
+# binaries listed below.
+# Please keep the contents of each variable sorted for ease of reading
+# and maintenance.
+#
+export USR_BIN_FILES='awk
+    basename
+    bc
+    bunzip2
+    bzcat
+    cat
+    cd
+    chgrp
+    chmod
+    chown
+    cksum
+    cmp
+    compress
+    coreadm
+    cp
+    cpio
+    cut
+    date
+    dd
+    df
+    diff
+    dircmp
+    dirname
+    du
+    echo
+    egrep
+    expr
+    false
+    file
+    find
+    fio
+    getent
+    grep
+    head
+    hostname
+    id
+    iostat
+    isainfo
+    kill
+    ksh
+    logname
+    ls
+    md5sum
+    mdb
+    mkdir
+    mktemp
+    mpstat
+    mv
+    nawk
+    pack
+    pagesize
+    pax
+    pfexec
+    pgrep
+    pkginfo
+    pkill
+    ppriv
+    print
+    printf
+    ps
+    pwd
+    python
+    readlink
+    rm
+    rmdir
+    rsh
+    runat
+    sed
+    seq
+    shuf
+    sleep
+    sort
+    stat
+    strings
+    su
+    sudo
+    sum
+    svcs
+    sync
+    tail
+    timeout
+    touch
+    tr
+    true
+    truncate
+    umask
+    uname
+    uncompress
+    unpack
+    vmstat
+    wait
+    wc
+    xargs
+    zlook
+    zonename'
+
+export USR_SBIN_FILES='arp
+    clri
+    dtrace
+    dumpadm
+    ff
+    format
+    fsdb
+    fsirand
+    fstyp
+    getmajor
+    groupadd
+    groupdel
+    groupmod
+    labelit
+    lockfs
+    lofiadm
+    mkfile
+    mknod
+    ncheck
+    newfs
+    ping
+    prtvtoc
+    psrinfo
+    quotaon
+    share
+    svcadm
+    swap
+    tar
+    tunefs
+    ufsdump
+    ufsrestore
+    unshare
+    useradd
+    userdel
+    usermod
+    zdb
+    zhack
+    zinject
+    zoneadm
+    zonecfg'
+
+export SBIN_FILES='fdisk
+    mount
+    swapadd
+    umount
+    umountall
+    zfs
+    zpool'
+
+export ZFSTEST_FILES='chg_usr_exec
+    devname2devid
+    dir_rd_update
+    file_check
+    file_trunc
+    file_write
+    getholes
+    largest_file
+    mkbusy
+    mkfiles
+    mkholes
+    mktree
+    mmapwrite
+    randfree_file
+    readmmap
+    rename_dir
+    rm_lnkcnt_zero_file'
