mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
test: shellcheck: use quotation marks
This commit is contained in:
parent
4c31e6d56a
commit
ca5d258376
@ -1089,9 +1089,9 @@ prepare_devs() {
|
||||
# then allocate a dedicated backing device for PV; otherwise, rollback
|
||||
# to use single backing device for device-mapper.
|
||||
if [ -n "$LVM_TEST_BACKING_DEVICE" ] && [ "$n" -le ${#BACKING_DEVICE_ARRAY[@]} ]; then
|
||||
table[i]="0 $size linear "${BACKING_DEVICE_ARRAY[i]}" $(( header_shift * 2048 ))"
|
||||
table[i]="0 $size linear ${BACKING_DEVICE_ARRAY[i]} $(( header_shift * 2048 ))"
|
||||
else
|
||||
table[i]="0 $size linear "$BACKING_DEV" $(( i * size + ( header_shift * 2048 ) ))"
|
||||
table[i]="0 $size linear $BACKING_DEV $(( i * size + ( header_shift * 2048 ) ))"
|
||||
fi
|
||||
concise[i]="$name,TEST-$name,,,${table[i]}"
|
||||
echo "${table[i]}" > "$name.table"
|
||||
|
@ -196,10 +196,10 @@ vgcreate $vg2 "$dev2"
|
||||
vgcreate $vg3 "$dev3"
|
||||
vgcreate $vg4 "$dev4"
|
||||
cp "$DF" "$ORIG"
|
||||
OPVID1=$(echo $(pvs --noheading -o uuid "$dev1") )
|
||||
OPVID2=$(echo $(pvs --noheading -o uuid "$dev2") )
|
||||
OPVID3=$(echo $(pvs --noheading -o uuid "$dev3") )
|
||||
OPVID4=$(echo $(pvs --noheading -o uuid "$dev4") )
|
||||
OPVID1="$(echo $(pvs --noheading -o uuid "$dev1") )"
|
||||
OPVID2="$(echo $(pvs --noheading -o uuid "$dev2") )"
|
||||
OPVID3="$(echo $(pvs --noheading -o uuid "$dev3") )"
|
||||
OPVID4="$(echo $(pvs --noheading -o uuid "$dev4") )"
|
||||
PVID1=${OPVID1//-/}
|
||||
PVID2=${OPVID2//-/}
|
||||
PVID3=${OPVID3//-/}
|
||||
@ -345,10 +345,10 @@ vgcreate $vg2 "$dev2"
|
||||
vgcreate $vg3 "$dev3"
|
||||
vgcreate $vg4 "$dev4"
|
||||
cp "$DF" "$ORIG"
|
||||
OPVID1=$(echo $(pvs --noheading -o uuid "$dev1") )
|
||||
OPVID2=$(echo $(pvs --noheading -o uuid "$dev2") )
|
||||
OPVID3=$(echo $(pvs --noheading -o uuid "$dev3") )
|
||||
OPVID4=$(echo $(pvs --noheading -o uuid "$dev4") )
|
||||
OPVID1="$(echo $(pvs --noheading -o uuid "$dev1") )"
|
||||
OPVID2="$(echo $(pvs --noheading -o uuid "$dev2") )"
|
||||
OPVID3="$(echo $(pvs --noheading -o uuid "$dev3") )"
|
||||
OPVID4="$(echo $(pvs --noheading -o uuid "$dev4") )"
|
||||
PVID1=${OPVID1//-/}
|
||||
PVID2=${OPVID2//-/}
|
||||
PVID3=${OPVID3//-/}
|
||||
@ -472,8 +472,8 @@ touch "$DF"
|
||||
vgcreate $vg1 "$dev1"
|
||||
vgcreate $vg4 "$dev4"
|
||||
cp "$DF" "$ORIG"
|
||||
OPVID1=$(echo $(pvs --noheading -o uuid "$dev1") )
|
||||
OPVID4=$(echo $(pvs --noheading -o uuid "$dev4") )
|
||||
OPVID1="$(echo $(pvs --noheading -o uuid "$dev1") )"
|
||||
OPVID4="$(echo $(pvs --noheading -o uuid "$dev4") )"
|
||||
PVID1=${OPVID1//-/}
|
||||
PVID4=${OPVID4//-/}
|
||||
|
||||
@ -551,7 +551,7 @@ rm "$DF"
|
||||
touch "$DF"
|
||||
vgcreate $vg2 "$dev2"
|
||||
cp "$DF" "$ORIG"
|
||||
OPVID2=$(echo $(pvs --noheading -o uuid "$dev2") )
|
||||
OPVID2="$(echo $(pvs --noheading -o uuid "$dev2") )"
|
||||
PVID2=${OPVID2//-/}
|
||||
|
||||
grep "$PVID2" "$DF" |tee out
|
||||
@ -601,10 +601,10 @@ grep "$SERIAL1" "$DF"
|
||||
grep "$SERIAL2" "$DF"
|
||||
grep "$SERIAL3" "$DF"
|
||||
grep "$SERIAL4" "$DF"
|
||||
OPVID1=$(echo $(pvs --noheading -o uuid "$dev1") )
|
||||
OPVID2=$(echo $(pvs --noheading -o uuid "$dev2") )
|
||||
OPVID3=$(echo $(pvs --noheading -o uuid "$dev3") )
|
||||
OPVID4=$(echo $(pvs --noheading -o uuid "$dev4") )
|
||||
OPVID1="$(echo $(pvs --noheading -o uuid "$dev1") )"
|
||||
OPVID2="$(echo $(pvs --noheading -o uuid "$dev2") )"
|
||||
OPVID3="$(echo $(pvs --noheading -o uuid "$dev3") )"
|
||||
OPVID4="$(echo $(pvs --noheading -o uuid "$dev4") )"
|
||||
PVID1=${OPVID1//-/}
|
||||
PVID2=${OPVID2//-/}
|
||||
PVID3=${OPVID3//-/}
|
||||
@ -665,10 +665,10 @@ vgcreate $vg2 "$dev2"
|
||||
vgcreate $vg3 "$dev3"
|
||||
vgcreate $vg4 "$dev4"
|
||||
cp "$DF" "$ORIG"
|
||||
OPVID1=$(echo $(pvs --noheading -o uuid "$dev1") )
|
||||
OPVID2=$(echo $(pvs --noheading -o uuid "$dev2") )
|
||||
OPVID3=$(echo $(pvs --noheading -o uuid "$dev3") )
|
||||
OPVID4=$(echo $(pvs --noheading -o uuid "$dev4") )
|
||||
OPVID1="$(echo $(pvs --noheading -o uuid "$dev1") )"
|
||||
OPVID2="$(echo $(pvs --noheading -o uuid "$dev2") )"
|
||||
OPVID3="$(echo $(pvs --noheading -o uuid "$dev3") )"
|
||||
OPVID4="$(echo $(pvs --noheading -o uuid "$dev4") )"
|
||||
PVID1=${OPVID1//-/}
|
||||
PVID2=${OPVID2//-/}
|
||||
PVID3=${OPVID3//-/}
|
||||
@ -730,9 +730,9 @@ vgcreate $vg1 "$dev1"
|
||||
vgcreate $vg2 "$dev2"
|
||||
vgcreate $vg3 "$dev3"
|
||||
cp "$DF" "$ORIG"
|
||||
OPVID1=$(echo $(pvs --noheading -o uuid "$dev1") )
|
||||
OPVID2=$(echo $(pvs --noheading -o uuid "$dev2") )
|
||||
OPVID3=$(echo $(pvs --noheading -o uuid "$dev3") )
|
||||
OPVID1="$(echo $(pvs --noheading -o uuid "$dev1") )"
|
||||
OPVID2="$(echo $(pvs --noheading -o uuid "$dev2") )"
|
||||
OPVID3="$(echo $(pvs --noheading -o uuid "$dev3") )"
|
||||
PVID1=${OPVID1//-/}
|
||||
PVID2=${OPVID2//-/}
|
||||
PVID3=${OPVID3//-/}
|
||||
@ -830,10 +830,10 @@ grep "$dev4" out
|
||||
grep "$dev2" out
|
||||
grep "$dev3" out
|
||||
|
||||
OPVID1=$(echo $(pvs --noheading -o uuid "$dev1") )
|
||||
OPVID2=$(echo $(pvs --noheading -o uuid "$dev2") )
|
||||
OPVID3=$(echo $(pvs --noheading -o uuid "$dev3") )
|
||||
OPVID4=$(echo $(pvs --noheading -o uuid "$dev4") )
|
||||
OPVID1="$(echo $(pvs --noheading -o uuid "$dev1") )"
|
||||
OPVID2="$(echo $(pvs --noheading -o uuid "$dev2") )"
|
||||
OPVID3="$(echo $(pvs --noheading -o uuid "$dev3") )"
|
||||
OPVID4="$(echo $(pvs --noheading -o uuid "$dev4") )"
|
||||
PVID1=${OPVID1//-/}
|
||||
PVID2=${OPVID2//-/}
|
||||
PVID3=${OPVID3//-/}
|
||||
@ -867,8 +867,8 @@ lvmdevices --adddev "$dev3"
|
||||
cat "$DF"
|
||||
cp "$DF" "$ORIG"
|
||||
|
||||
OPVID1=$(echo $(pvs --noheading -o uuid "$dev1") )
|
||||
OPVID2=$(echo $(pvs --noheading -o uuid "$dev2") )
|
||||
OPVID1="$(echo $(pvs --noheading -o uuid "$dev1") )"
|
||||
OPVID2="$(echo $(pvs --noheading -o uuid "$dev2") )"
|
||||
PVID1=${OPVID1//-/}
|
||||
PVID2=${OPVID2//-/}
|
||||
|
||||
|
@ -81,7 +81,7 @@ for i in {1..10}; do
|
||||
# wait here for a while until dmeventd dies....
|
||||
# surprisingly it's not instant and we can actually
|
||||
# obtain list of monitored devices...
|
||||
test -z $(ps -p "$pid" -o comm=) && break
|
||||
test -z "$(ps -p "$pid" -o comm=)" && break
|
||||
sleep .1
|
||||
done
|
||||
rm LOCAL_DMEVENTD debug.log*
|
||||
|
@ -47,7 +47,7 @@ not vgremove --config 'global { wait_for_locks = 0 }' $vg
|
||||
test -f "$TESTDIR/var/lock/lvm/P_global" # still running
|
||||
# First kill 'sleep' process forked from flock
|
||||
# Not using 'flock -F' since this flag is newer
|
||||
kill $(ps -o pid --no-headers --ppid "$flock_pid") || true
|
||||
kill "$(ps -o pid --no-headers --ppid "$flock_pid")" || true
|
||||
kill "$flock_pid" || true
|
||||
|
||||
vgremove -ff $vg
|
||||
|
@ -105,7 +105,7 @@ function _check_size
|
||||
local data_stripes=$3
|
||||
|
||||
# Compare size of LV with calculated one
|
||||
[ $(blockdev --getsz /dev/$vg/$lv) -eq $(_get_size $vg $lv $data_stripes) ] && echo 0 || echo 1
|
||||
[ "$(blockdev --getsz /dev/$vg/$lv)" -eq "$(_get_size $vg $lv $data_stripes)" ] && echo 0 || echo 1
|
||||
}
|
||||
|
||||
function _total_stripes
|
||||
|
@ -388,8 +388,8 @@ wait_md_create "$mddev"
|
||||
vgcreate $vg9 "$mddev"
|
||||
lvmdevices --adddev "$mddev" || true
|
||||
|
||||
PVIDMD=$(pvs "$mddev" --noheading -o uuid | tr -d - | awk '{print $1}')
|
||||
BDEVMD=$(basename "$mddev")
|
||||
PVIDMD="$(pvs "$mddev" --noheading -o uuid | tr -d - | awk '{print $1}')"
|
||||
BDEVMD="$(basename "$mddev")"
|
||||
|
||||
lvcreate -l1 -an -n $lv1 $vg9
|
||||
lvcreate -l1 -an -n $lv2 $vg9
|
||||
|
Loading…
Reference in New Issue
Block a user