]> granicus.if.org Git - zfs/commitdiff
OpenZFS 6580 - zfs-tests use undefined variable WRAPPER
authorYuri Pankov <yuri.pankov@gmail.com>
Sat, 9 Apr 2016 16:36:54 +0000 (09:36 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 13 Feb 2017 18:25:39 +0000 (10:25 -0800)
Authored by: Yuri Pankov <yuri.pankov@gmail.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Approved by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Ported-by: George Melikov <mail@gmelikov.ru>
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

tests/zfs-tests/tests/functional/cache/cache.kshlib
tests/zfs-tests/tests/functional/inuse/inuse_001_pos.ksh
tests/zfs-tests/tests/functional/inuse/inuse_003_pos.ksh
tests/zfs-tests/tests/functional/inuse/inuse_005_pos.ksh
tests/zfs-tests/tests/functional/inuse/inuse_006_pos.ksh
tests/zfs-tests/tests/functional/inuse/inuse_007_pos.ksh
tests/zfs-tests/tests/functional/inuse/inuse_008_pos.ksh
tests/zfs-tests/tests/functional/inuse/inuse_009_pos.ksh
tests/zfs-tests/tests/functional/slog/slog.kshlib

index 6cdeef7d6de995a8a0a87f98787f69e903b2bd02..ef367e1dba82106d246ba31f6859292b53221913 100644 (file)
@@ -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
        #
index 1feb68124d4916665a043be8060c6c26391f8ea8..940ff0840854f8c41ebf5a297abfd825b5aa667f 100755 (executable)
@@ -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
 
index 81bf0b400dd4b208b980e754c93679a50b71cd19..2e75a33abe5b885874a0d661fff646fd7b27c7d6 100755 (executable)
@@ -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"
index dadb1914dd6e22e9e5a8e0463104ccaf8f8a852c..5330ab2bd9e2f84fe2a3bee21befbbc5cff4a7b6 100755 (executable)
@@ -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
index d79e3189c34bfe582e51ee841b374270d4b79cdc..3e1450e9c3a10ddd1cba07d93b18a6561d2d7b57 100755 (executable)
@@ -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
index cb50689c5b018479a9823b06077e9eaf53ced7d1..22673b7457f4b9668bd8e78ec1fa6b2b31daf93e 100755 (executable)
@@ -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
index 80dad47d55d8836120fd188935bb00f36df4f536..fecb68455ea87cf5486a890f021d7fd6c940a06f 100755 (executable)
@@ -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
index a5b1fe25ef20ff4b0dcb80955f1b1d21cb281c37..c408b7028a399a313d24c840b5a1edf39d307c4b 100755 (executable)
@@ -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
index 0aca19aa25ffa97a51e4f100d053ef21afe1bf51..e7d65c14807573377180779e83ea52631d273031 100644 (file)
@@ -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
        #