summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuri Pankov <[email protected]>2016-04-09 09:36:54 -0700
committerBrian Behlendorf <[email protected]>2017-02-13 10:25:39 -0800
commit8b2174b9a492d620d7bef45e5fb661b9f18c51a9 (patch)
tree015b299e22b18f8728beac4864ed7ae41946dcb1
parent510e66db854633aed7a05ee865c140384b2dec87 (diff)
OpenZFS 6580 - zfs-tests use undefined variable WRAPPER
Authored by: Yuri Pankov <[email protected]> Reviewed by: John Kennedy <[email protected]> Approved by: Matthew Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Ported-by: George Melikov <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/6580 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/9498083 Closes #5789 Porting notes: - deleted in ZoL: functional/utils_test/utils_test_007_pos.ksh
-rw-r--r--tests/zfs-tests/tests/functional/cache/cache.kshlib7
-rwxr-xr-xtests/zfs-tests/tests/functional/inuse/inuse_001_pos.ksh7
-rwxr-xr-xtests/zfs-tests/tests/functional/inuse/inuse_003_pos.ksh11
-rwxr-xr-xtests/zfs-tests/tests/functional/inuse/inuse_005_pos.ksh10
-rwxr-xr-xtests/zfs-tests/tests/functional/inuse/inuse_006_pos.ksh10
-rwxr-xr-xtests/zfs-tests/tests/functional/inuse/inuse_007_pos.ksh10
-rwxr-xr-xtests/zfs-tests/tests/functional/inuse/inuse_008_pos.ksh10
-rwxr-xr-xtests/zfs-tests/tests/functional/inuse/inuse_009_pos.ksh10
-rw-r--r--tests/zfs-tests/tests/functional/slog/slog.kshlib7
9 files changed, 8 insertions, 74 deletions
diff --git a/tests/zfs-tests/tests/functional/cache/cache.kshlib b/tests/zfs-tests/tests/functional/cache/cache.kshlib
index 6cdeef7d6..ef367e1db 100644
--- a/tests/zfs-tests/tests/functional/cache/cache.kshlib
+++ b/tests/zfs-tests/tests/functional/cache/cache.kshlib
@@ -88,13 +88,6 @@ function verify_cache_device
"<status> [type]"
fi
- if [[ $WRAPPER == *"smi"* ]]; then
- $ECHO $device | $EGREP "^c[0-F]+([td][0-F]+)+$" > /dev/null 2>&1
- if (( $? == 0 )); then
- device=${device}s2
- fi
- fi
-
#
# Get all the cache devices and status table like below
#
diff --git a/tests/zfs-tests/tests/functional/inuse/inuse_001_pos.ksh b/tests/zfs-tests/tests/functional/inuse/inuse_001_pos.ksh
index 1feb68124..940ff0840 100755
--- a/tests/zfs-tests/tests/functional/inuse/inuse_001_pos.ksh
+++ b/tests/zfs-tests/tests/functional/inuse/inuse_001_pos.ksh
@@ -67,12 +67,7 @@ PREVDUMPDEV=`$DUMPADM | $GREP "Dump device" | $AWK '{print $3}'`
log_note "Zero $FS_DISK0 and place free space in to slice 0"
log_must cleanup_devices $FS_DISK0
-if [[ $WRAPPER == *"smi"* ]]; then
- diskslice="${DEV_DSKDIR}/${FS_DISK0}${SLICE_PREFIX}${SLICE2}"
-else
- diskslice="${DEV_DSKDIR}/${FS_DISK0}${SLICE_PREFIX}${SLICE0}"
-fi
-
+diskslice="${DEV_DSKDIR}/${FS_DISK0}${SLICE0}"
log_note "Configuring $diskslice as dump device"
log_must $DUMPADM -d $diskslice > /dev/null
diff --git a/tests/zfs-tests/tests/functional/inuse/inuse_003_pos.ksh b/tests/zfs-tests/tests/functional/inuse/inuse_003_pos.ksh
index 81bf0b400..2e75a33ab 100755
--- a/tests/zfs-tests/tests/functional/inuse/inuse_003_pos.ksh
+++ b/tests/zfs-tests/tests/functional/inuse/inuse_003_pos.ksh
@@ -101,16 +101,9 @@ typeset cwd=""
for num in 0 1 2; do
eval typeset slice=\${FS_SIDE$num}
- disk=${slice%${SLICE_PREFIX}*}
+ disk=${slice%s*}
slice=${slice##*${SLICE_PREFIX}}
- if [[ $WRAPPER == *"smi"* && $disk == ${saved_disk} ]]; then
- cyl=$(get_endslice $disk ${saved_slice})
- log_must set_partition $slice "$cyl" $FS_SIZE $disk
- else
- log_must set_partition $slice "" $FS_SIZE $disk
- fi
- saved_disk=$disk
- saved_slice=$slice
+ log_must set_partition $slice "" $FS_SIZE $disk
done
log_note "Make a ufs filesystem on source $rawdisk1"
diff --git a/tests/zfs-tests/tests/functional/inuse/inuse_005_pos.ksh b/tests/zfs-tests/tests/functional/inuse/inuse_005_pos.ksh
index dadb1914d..5330ab2bd 100755
--- a/tests/zfs-tests/tests/functional/inuse/inuse_005_pos.ksh
+++ b/tests/zfs-tests/tests/functional/inuse/inuse_005_pos.ksh
@@ -82,15 +82,7 @@ while (( i < ${#vdevs[*]} )); do
eval typeset slice=\${FS_SIDE$num}
disk=${slice%${SLICE_PREFIX}*}
slice=${slice##*${SLICE_PREFIX}}
- if [[ $WRAPPER == *"smi"* && \
- $disk == ${saved_disk} ]]; then
- cyl=$(get_endslice $disk ${saved_slice})
- log_must set_partition $slice "$cyl" $FS_SIZE $disk
- else
- log_must set_partition $slice "" $FS_SIZE $disk
- fi
- saved_disk=$disk
- saved_slice=$slice
+ log_must set_partition $slice "" $FS_SIZE $disk
done
if [[ -n $SINGLE_DISK && -n ${vdevs[i]} ]]; then
diff --git a/tests/zfs-tests/tests/functional/inuse/inuse_006_pos.ksh b/tests/zfs-tests/tests/functional/inuse/inuse_006_pos.ksh
index d79e3189c..3e1450e9c 100755
--- a/tests/zfs-tests/tests/functional/inuse/inuse_006_pos.ksh
+++ b/tests/zfs-tests/tests/functional/inuse/inuse_006_pos.ksh
@@ -85,15 +85,7 @@ while (( i < ${#vdevs[*]} )); do
eval typeset slice=\${FS_SIDE$num}
disk=${slice%${SLICE_PREFIX}*}
slice=${slice##*${SLICE_PREFIX}}
- if [[ $WRAPPER == *"smi"* && \
- $disk == ${saved_disk} ]]; then
- cyl=$(get_endslice $disk ${saved_slice})
- log_must set_partition $slice "$cyl" $FS_SIZE $disk
- else
- log_must set_partition $slice "" $FS_SIZE $disk
- fi
- saved_disk=$disk
- saved_slice=$slice
+ log_must set_partition $slice "" $FS_SIZE $disk
done
if [[ -n $SINGLE_DISK && -n ${vdevs[i]} ]]; then
diff --git a/tests/zfs-tests/tests/functional/inuse/inuse_007_pos.ksh b/tests/zfs-tests/tests/functional/inuse/inuse_007_pos.ksh
index cb50689c5..22673b745 100755
--- a/tests/zfs-tests/tests/functional/inuse/inuse_007_pos.ksh
+++ b/tests/zfs-tests/tests/functional/inuse/inuse_007_pos.ksh
@@ -90,15 +90,7 @@ while (( i < ${#vdevs[*]} )); do
eval typeset slice=\${FS_SIDE$num}
disk=${slice%${SLICE_PREFIX}*}
slice=${slice##*${SLICE_PREFIX}}
- if [[ $WRAPPER == *"smi"* && \
- $disk == ${saved_disk} ]]; then
- cyl=$(get_endslice $disk ${saved_slice})
- log_must set_partition $slice "$cyl" $FS_SIZE $disk
- else
- log_must set_partition $slice "" $FS_SIZE $disk
- fi
- saved_disk=$disk
- saved_slice=$slice
+ log_must set_partition $slice "" $FS_SIZE $disk
done
if [[ -n $SINGLE_DISK && -n ${vdevs[i]} ]]; then
diff --git a/tests/zfs-tests/tests/functional/inuse/inuse_008_pos.ksh b/tests/zfs-tests/tests/functional/inuse/inuse_008_pos.ksh
index 80dad47d5..fecb68455 100755
--- a/tests/zfs-tests/tests/functional/inuse/inuse_008_pos.ksh
+++ b/tests/zfs-tests/tests/functional/inuse/inuse_008_pos.ksh
@@ -83,15 +83,7 @@ for num in 0 1 2 3 ; do
eval typeset slice=\${FS_SIDE$num}
disk=${slice%${SLICE_PREFIX}*}
slice=${slice##*${SLICE_PREFIX}}
- if [[ $WRAPPER == *"smi"* && \
- $disk == ${saved_disk} ]]; then
- cyl=$(get_endslice $disk ${saved_slice})
- log_must set_partition $slice "$cyl" $FS_SIZE $disk
- else
- log_must set_partition $slice "" $FS_SIZE $disk
- fi
- saved_disk=$disk
- saved_slice=$slice
+ log_must set_partition $slice "" $FS_SIZE $disk
done
while (( i < ${#vdevs[*]} )); do
diff --git a/tests/zfs-tests/tests/functional/inuse/inuse_009_pos.ksh b/tests/zfs-tests/tests/functional/inuse/inuse_009_pos.ksh
index a5b1fe25e..c408b7028 100755
--- a/tests/zfs-tests/tests/functional/inuse/inuse_009_pos.ksh
+++ b/tests/zfs-tests/tests/functional/inuse/inuse_009_pos.ksh
@@ -82,15 +82,7 @@ while (( i < ${#vdevs[*]} )); do
eval typeset slice=\${FS_SIDE$num}
disk=${slice%${SLICE_PREFIX}*}
slice=${slice##*${SLICE_PREFIX}}
- if [[ $WRAPPER == *"smi"* && \
- $disk == ${saved_disk} ]]; then
- cyl=$(get_endslice $disk ${saved_slice})
- log_must set_partition $slice "$cyl" $FS_SIZE $disk
- else
- log_must set_partition $slice "" $FS_SIZE $disk
- fi
- saved_disk=$disk
- saved_slice=$slice
+ log_must set_partition $slice "" $FS_SIZE $disk
done
if [[ -n $SINGLE_DISK && -n ${vdevs[i]} ]]; then
diff --git a/tests/zfs-tests/tests/functional/slog/slog.kshlib b/tests/zfs-tests/tests/functional/slog/slog.kshlib
index 0aca19aa2..e7d65c148 100644
--- a/tests/zfs-tests/tests/functional/slog/slog.kshlib
+++ b/tests/zfs-tests/tests/functional/slog/slog.kshlib
@@ -90,13 +90,6 @@ function verify_slog_device
"<status> [type]"
fi
- if [[ $WRAPPER == *"smi"* ]]; then
- $ECHO $device | $EGREP "^c[0-F]+([td][0-F]+)+$" > /dev/null 2>&1
- if (( $? == 0 )); then
- device=${device}s2
- fi
- fi
-
#
# Get all the slog devices and status table like below
#