Skip to content

Commit

Permalink
ZTS: Fix incorrect is_physical_device usage
Browse files Browse the repository at this point in the history
This check isn't meant to be used for command substitution.

Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@ixsystems.com>
Closes #9844
  • Loading branch information
Ryan Moeller authored and behlendorf committed Jan 16, 2020
1 parent f12e42c commit 31712a7
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion tests/zfs-tests/include/blkdev.shlib
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ function get_device_dir #device
{
typeset device=$1

if ! is_freebsd && ! $(is_physical_device $device) ; then
if ! is_freebsd && ! is_physical_device $device; then
if [[ $device != "/" ]]; then
device=${device%/*}
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

verify_runnable "global"

if ! $(is_physical_device $DISKS) ; then
if ! is_physical_device $DISKS; then
log_unsupported "This directory cannot be run on raw files."
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

verify_runnable "global"

if ! $(is_physical_device $DISKS) ; then
if ! is_physical_device $DISKS; then
log_unsupported "This directory cannot be run on raw files."
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function cleanup

set -A datasets "$TESTPOOL" "$TESTPOOL2"

if ! $(is_physical_device $DISKS) ; then
if ! is_physical_device $DISKS; then
log_unsupported "This case cannot be run on raw files."
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

DISK=${DISKS%% *}

if ! $(is_physical_device $DISK) ; then
if ! is_physical_device $DISK; then
log_unsupported "Only partitionable physical disks can be used"
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
verify_runnable "global"
verify_disk_count "$DISKS" 2

if ! $(is_physical_device $ZFS_DISK1) ; then
if ! is_physical_device $ZFS_DISK1; then
log_unsupported "Only partitionable physical disks can be used"
fi

Expand Down
2 changes: 1 addition & 1 deletion tests/zfs-tests/tests/functional/write_dirs/setup.ksh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

verify_runnable "global"

if ! $(is_physical_device $DISKS) ; then
if ! is_physical_device $DISKS; then
log_unsupported "This directory cannot be run on raw files."
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

verify_runnable "global"

if ! $(is_physical_device $DISKS) ; then
if ! is_physical_device $DISKS; then
log_unsupported "This directory cannot be run on raw files."
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

verify_runnable "global"

if ! $(is_physical_device $DISKS) ; then
if ! is_physical_device $DISKS; then
log_unsupported "This directory cannot be run on raw files."
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

verify_runnable "global"

if ! $(is_physical_device $DISKS) ; then
if ! is_physical_device $DISKS; then
log_unsupported "This directory cannot be run on raw files."
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

verify_runnable "global"

if ! $(is_physical_device $DISKS) ; then
if ! is_physical_device $DISKS; then
log_unsupported "This directory cannot be run on raw files."
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

verify_runnable "global"

if ! $(is_physical_device $DISKS) ; then
if ! is_physical_device $DISKS; then
log_unsupported "This directory cannot be run on raw files."
fi

Expand Down

0 comments on commit 31712a7

Please sign in to comment.