1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

shellcheck: tests fixes

Correcting some shell problems.
This commit is contained in:
Zdenek Kabelac 2021-09-21 16:59:21 +02:00
parent 130993bab1
commit 5bd99d55b0
4 changed files with 4 additions and 6 deletions

View File

@ -623,7 +623,7 @@ vgremove -ff $vg
# Repeat many of the tests above using bitmap mode
_prepare_vg
lvcreate --type raid1 -m1 --raidintegrity y --raidintegritymode bitmap -n $lv1 -l 8 $vg "$dev1 "$dev2"
lvcreate --type raid1 -m1 --raidintegrity y --raidintegritymode bitmap -n $lv1 -l 8 $vg "$dev1" "$dev2"
_wait_recalc $vg/${lv1}_rimage_0
_wait_recalc $vg/${lv1}_rimage_1
_wait_recalc $vg/$lv1

View File

@ -31,11 +31,11 @@ vgcreate $SHARED -s 64K "$vg" "${DEVICES[@]}"
# Size 0 is not valid
invalid lvcreate -L4M --chunksize 128 --poolmetadatasize 0 -T $vg/pool1 2>out
lvcreate -Zn -L4M --chunksize 128 --poolmetadatasize 16k -T $vg/pool1 2>&1 >out
lvcreate -Zn -L4M --chunksize 128 --poolmetadatasize 16k -T $vg/pool1 >out 2>&1
grep -i "minimal" out
# FIXME: metadata allocation fails, if PV doesn't have at least 16GB
# i.e. pool metadata device cannot be multisegment
lvcreate -Zn -L4M --chunksize 64k --poolmetadatasize 17G -T $vg/pool2 2>&1 >out
lvcreate -Zn -L4M --chunksize 64k --poolmetadatasize 17G -T $vg/pool2 >out 2>&1
grep "maximum" out
check lv_field $vg/pool1_tmeta size "2.00m"
check lv_field $vg/pool2_tmeta size "<15.88g"

View File

@ -1,4 +1,3 @@
#!/usr/bin/env bash
# Copyright (C) 2014 Red Hat, Inc. All rights reserved.
@ -141,4 +140,3 @@ check pv_field "$dev1" ba_start 384.00k --units k
check pv_field "$dev1" ba_size 256.00k --units k
check pv_field "$dev1" pe_start 640.00k --units k
pvremove "$dev1"

View File

@ -53,7 +53,7 @@ test_pvmove_resume() {
# errors, based on the fact pvmove is killed -9
# Restart clvmd
kill "$(< LOCAL_CLVMD)"
for i in {1 100} ; do
for i in {1..100} ; do
test $i -eq 100 && die "Shutdown of clvmd is too slow."
test -e "$CLVMD_PIDFILE" || break
sleep .1