diff --git a/man/man8/zfs-project.8 b/man/man8/zfs-project.8 index f264a110f..0edaad082 100644 --- a/man/man8/zfs-project.8 +++ b/man/man8/zfs-project.8 @@ -104,7 +104,7 @@ target directory's project ID or the one specified with .Fl p . .Bl -tag -width "-p id" .It Fl 0 -Delimit filenames with a NUL byte instead of newline. +Delimit filenames with a NUL byte instead of newline, don't output diagnoses. .It Fl d Check the directory project ID and inherit flag, not its children. .It Fl p Ar id diff --git a/tests/zfs-tests/include/commands.cfg b/tests/zfs-tests/include/commands.cfg index ca7628855..13fee6752 100644 --- a/tests/zfs-tests/include/commands.cfg +++ b/tests/zfs-tests/include/commands.cfg @@ -109,8 +109,7 @@ export SYSTEM_FILES_COMMON='arp vmstat wait wc - which - xargs' + which' export SYSTEM_FILES_FREEBSD='chflags compress diff --git a/tests/zfs-tests/tests/functional/alloc_class/alloc_class_012_pos.ksh b/tests/zfs-tests/tests/functional/alloc_class/alloc_class_012_pos.ksh index 2bce471a7..efb6c4754 100755 --- a/tests/zfs-tests/tests/functional/alloc_class/alloc_class_012_pos.ksh +++ b/tests/zfs-tests/tests/functional/alloc_class/alloc_class_012_pos.ksh @@ -33,7 +33,7 @@ function file_in_special_vdev # { typeset dataset="$1" typeset inum="$2" - typeset num_normal=$(echo $ZPOOL_DISKS | wc -w | xargs) + typeset num_normal=$(echo $ZPOOL_DISKS | wc -w) zdb -dddddd $dataset $inum | awk -v d=$num_normal '{ # find DVAs from string "offset level dva" only for L0 (data) blocks diff --git a/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_object_range_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_object_range_pos.ksh index 61c031a0c..1e63ac7d2 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_object_range_pos.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_object_range_pos.ksh @@ -142,8 +142,8 @@ log_must test "\n$actual\n" == "\n$expected\n" # Specifying individual object IDs works objects="$start1 $end1 $start2 $end2" expected="$objects" -actual=$(get_object_list $TESTPOOL/$TESTFS $objects | awk '{print $1}' | xargs) -log_must test "$actual" == "$expected" +actual=$(get_object_list $TESTPOOL/$TESTFS $objects | awk '{print $1}' | tr '\n' ' ') +log_must test "${actual% }" == "$expected" # Get all objects in the meta-objset to test m (spacemap) and z (zap) flags all_mos_objects=$(get_object_list $TESTPOOL 0:-1) diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add.kshlib b/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add.kshlib index 272d0834c..c64b4a35a 100644 --- a/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add.kshlib +++ b/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add.kshlib @@ -57,7 +57,7 @@ function find_mnttab_dev if is_freebsd; then # FreeBSD doesn't have a mnttab file. mount -p | awk -v dir="^${DEV_DSKDIR}" \ - '$1 ~ dir { print $1 }' | xargs + '$1 ~ dir { print $1 }' return 0 elif is_linux; then typeset mnttab="/etc/mtab" diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_events/zpool_events_clear.ksh b/tests/zfs-tests/tests/functional/cli_root/zpool_events/zpool_events_clear.ksh index 054d39be3..fe5559148 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zpool_events/zpool_events_clear.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zpool_events/zpool_events_clear.ksh @@ -43,7 +43,7 @@ for i in `seq 1 $EVENTS_NUM`; do done # wait a bit to allow the kernel module to process new events zpool_events_settle -EVENTS_NUM=$(zpool events -H | wc -l | xargs) +EVENTS_NUM=$(zpool events -H | wc -l) # 3. Verify 'zpool events -c' successfully clear new events CLEAR_OUTPUT=$(zpool events -c) diff --git a/tests/zfs-tests/tests/functional/mv_files/mv_files_common.kshlib b/tests/zfs-tests/tests/functional/mv_files/mv_files_common.kshlib index 6b925501b..a64aa6806 100644 --- a/tests/zfs-tests/tests/functional/mv_files/mv_files_common.kshlib +++ b/tests/zfs-tests/tests/functional/mv_files/mv_files_common.kshlib @@ -152,8 +152,7 @@ function generate_files # function mv_files { - find $1 -type f -print | xargs -I "{}" \ - mv {} $2 > /dev/null 2>&1 + find $1 -type f -exec mv {} $2 \; > /dev/null 2>&1 } # @@ -165,8 +164,7 @@ function mv_files function count_files { typeset -i file_num - file_num=`find $1 -type f -print | \ - wc -l` + file_num=$(find $1 -type f -print | wc -l) (( file_num != $2 )) && \ log_fail "The file number of target directory"\ "$2 is not equal to that of the source "\ diff --git a/tests/zfs-tests/tests/functional/projectquota/projecttree_002_pos.ksh b/tests/zfs-tests/tests/functional/projectquota/projecttree_002_pos.ksh index d61019242..9942a88cb 100755 --- a/tests/zfs-tests/tests/functional/projectquota/projecttree_002_pos.ksh +++ b/tests/zfs-tests/tests/functional/projectquota/projecttree_002_pos.ksh @@ -109,8 +109,7 @@ log_must eval "zfs project -cr $PRJDIR/a1/a2 | grep a3 | grep 'not set'" log_must eval "zfs project -cr $PRJDIR/a1/a2 | grep d4 | grep 'not set'" log_must eval "zfs project $PRJDIR/a1/a2/a3/d4 | grep '0 \-'" -log_must eval \ - "zfs project -cr -0 $PRJDIR/a1/a2 | xargs -0 zfs project -s -p $PRJID2" +log_must eval "zfs project -s -p $PRJID2 $(zfs project -cr0 $PRJDIR/a1/a2 | tr '\0' '\t')" log_mustnot eval "zfs project -cr $PRJDIR/a1/a2 | grep a3 | grep 'not set'" log_mustnot eval "zfs project -cr $PRJDIR/a1/a2 | grep d4 | grep 'not set'"