diff options
author | Ryan Moeller <[email protected]> | 2019-10-11 12:49:48 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-10-11 09:49:48 -0700 |
commit | 767f65cf73e98fdec25f67e3717694a4a7561d08 (patch) | |
tree | fd30b1a2c477eb3bca05299cf3e3844d139bd2f1 /tests/zfs-tests | |
parent | 715c996d3b5e45897ff165f2e6610e1b57da47e4 (diff) |
Fix some style nits in tests
Mostly whitespace changes, no functional changes intended.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: John Kennedy <[email protected]>
Signed-off-by: Ryan Moeller <[email protected]>
Closes #9447
Diffstat (limited to 'tests/zfs-tests')
7 files changed, 15 insertions, 17 deletions
diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs/zfs_002_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs/zfs_002_pos.ksh index b21b6c657..92382aa11 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zfs/zfs_002_pos.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zfs/zfs_002_pos.ksh @@ -62,7 +62,7 @@ log_assert "With ZFS_ABORT set, all zfs commands can abort and generate a " \ "core file." log_onexit cleanup -#preparation work for testing +# Preparation work for testing corepath=$TESTDIR/core if [[ -d $corepath ]]; then rm -rf $corepath diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_006_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_006_pos.ksh index 5d3d7cf0d..7dac6798d 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_006_pos.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_006_pos.ksh @@ -55,7 +55,7 @@ function get_estimate_size typeset snapshot=$1 typeset option=$2 typeset base_snapshot=${3:-""} - if [[ -z $3 ]];then + if [[ -z $3 ]]; then typeset total_size=$(zfs send $option $snapshot 2>&1 | tail -1) else typeset total_size=$(zfs send $option $base_snapshot $snapshot \ diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_unmount/zfs_unmount_008_neg.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_unmount/zfs_unmount_008_neg.ksh index e83e8d516..afec9d896 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zfs_unmount/zfs_unmount_008_neg.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zfs_unmount/zfs_unmount_008_neg.ksh @@ -95,15 +95,14 @@ for arg in ${badargs[@]}; do log_mustnot eval "zfs unmount $arg $fs >/dev/null 2>&1" done - -#Testing invalid datasets +# Testing invalid datasets for ds in $snap $vol "blah"; do for opt in "" "-f"; do log_mustnot eval "zfs unmount $opt $ds >/dev/null 2>&1" done done -#Testing invalid mountpoint +# Testing invalid mountpoint dir=foodir.$$ file=foo.$$ fs1=$TESTPOOL/fs.$$ @@ -119,20 +118,20 @@ for mpt in "./$dir" "./$file" "/tmp"; do done cd $curpath -#Testing null argument and too many arguments +# Testing null argument and too many arguments for opt in "" "-f"; do log_mustnot eval "zfs unmount $opt >/dev/null 2>&1" log_mustnot eval "zfs unmount $opt $fs $fs1 >/dev/null 2>&1" done -#Testing already unmounted filesystem +# Testing already unmounted filesystem log_must zfs unmount $fs1 for opt in "" "-f"; do log_mustnot eval "zfs unmount $opt $fs1 >/dev/null 2>&1" log_mustnot eval "zfs unmount /tmp/$dir >/dev/null 2>&1" done -#Testing legacy mounted filesystem +# Testing legacy mounted filesystem log_must zfs set mountpoint=legacy $fs1 if is_linux; then log_must mount -t zfs $fs1 /tmp/$dir diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create.shlib b/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create.shlib index 3f3f44729..31244f4ec 100644 --- a/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create.shlib +++ b/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create.shlib @@ -45,7 +45,7 @@ function create_pool_test typeset vdevs eval "typeset -a diskarray=($3)" - for vdevs in "${diskarray[@]}";do + for vdevs in "${diskarray[@]}"; do create_pool $pool $keywd $vdevs log_must poolexists $pool destroy_pool $pool diff --git a/tests/zfs-tests/tests/functional/history/history_001_pos.ksh b/tests/zfs-tests/tests/functional/history/history_001_pos.ksh index e22aaa33d..f33265185 100755 --- a/tests/zfs-tests/tests/functional/history/history_001_pos.ksh +++ b/tests/zfs-tests/tests/functional/history/history_001_pos.ksh @@ -115,7 +115,7 @@ import_dir=$TEST_BASE_DIR/import_dir.$$ log_must mkdir $import_dir log_must cp $STF_SUITE/tests/functional/history/zfs-pool-v4.dat.Z $import_dir log_must uncompress $import_dir/zfs-pool-v4.dat.Z -upgrade_pool=$(zpool import -d $import_dir | grep "pool:" | awk '{print $2}') +upgrade_pool=$(zpool import -d $import_dir | awk '/pool:/ { print $2 }') log_must zpool import -d $import_dir $upgrade_pool run_and_verify -p "$upgrade_pool" "zpool upgrade $upgrade_pool" diff --git a/tests/zfs-tests/tests/functional/history/history_common.kshlib b/tests/zfs-tests/tests/functional/history/history_common.kshlib index d97e015fc..b82c60cbb 100644 --- a/tests/zfs-tests/tests/functional/history/history_common.kshlib +++ b/tests/zfs-tests/tests/functional/history/history_common.kshlib @@ -110,7 +110,7 @@ function verify_long fi typeset suffix="" - if [ is_linux ]; then + if is_linux; then suffix=":linux" fi diff --git a/tests/zfs-tests/tests/functional/inheritance/inherit_001_pos.ksh b/tests/zfs-tests/tests/functional/inheritance/inherit_001_pos.ksh index 76bd05ce5..b1c24fa3a 100755 --- a/tests/zfs-tests/tests/functional/inheritance/inherit_001_pos.ksh +++ b/tests/zfs-tests/tests/functional/inheritance/inherit_001_pos.ksh @@ -401,18 +401,17 @@ set -A local_val "off" "on" "off" \ # # Add system specific values # - -if ! is_linux; then +if is_linux; then + prop+=("acltype" "") + def_val+=("off") + local_val+=("off") +else prop+=("aclmode" "" \ "mountpoint" "") def_val+=("discard" \ "") local_val+=("groupmask" \ "$TESTDIR") -else - prop+=("acltype" "") - def_val+=("off") - local_val+=("off") fi |