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

test: coverage

Improve a bit code coverage.
Use lvm shell to reduce a bit CPU time.
This commit is contained in:
Zdenek Kabelac 2012-10-13 21:57:33 +02:00
parent 920352da70
commit a6f53b5c0d
2 changed files with 15 additions and 6 deletions

View File

@ -28,15 +28,23 @@ vgcreate -c n $vg $(cat DEVICES)
lvcreate -l 5 -i5 -I256 -n $lv $vg
# test *scan and *display tools
cat <<EOF | lvm
pvscan
vgscan
lvscan
lvmdiskscan
vgdisplay --units k
lvdisplay --units g
vgdisplay --units k $vg
lvdisplay --units g $vg
pvdisplay -c "$dev1"
pvdisplay -s "$dev1"
vgdisplay -c $vg
vgdisplay -s $vg
lvdisplay -c $vg
EOF
for i in h b s k m g t p e H B S K M G T P E; do
pvdisplay --units $i "$dev1"
done
echo pvdisplay --units $i "$dev1"
done | lvm
# test vgexport vgimport tools
vgchange -an $vg
@ -53,8 +61,8 @@ done
for i in pr "p rw" an ay "-monitor y" "-monitor n" \
-resync -refresh "-addtag MYTAG" "-deltag MYETAG"; do
lvchange -$i $vg/$lv
done
echo lvchange -$i $vg/$lv
done | lvm
pvck "$dev1"
vgck $vg

View File

@ -162,6 +162,7 @@ check vg_field $vg lv_count 6
lvremove -ff $vg
check vg_field $vg lv_count 0
lvdisplay $vg
# Fail cases
# Too small pool size (1 extent 64KB) for given chunk size