OpenZFS 6580 - zfs-tests use undefined variable WRAPPER

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
This commit is contained in:
Yuri Pankov 2016-04-09 09:36:54 -07:00 committed by Brian Behlendorf
parent 510e66db85
commit 8b2174b9a4
9 changed files with 8 additions and 74 deletions

View 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
#

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View 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
#