mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Add more pvcreate tests to validate writing lvm2 label using --labelsector.
This commit is contained in:
parent
2b6589c0d7
commit
3ea8df93b1
@ -66,6 +66,20 @@ test_expect_success \
|
||||
pvremove -f $d2 &&
|
||||
pvremove -f $d1'
|
||||
|
||||
for i in 0 1 2 3
|
||||
do
|
||||
test_expect_success \
|
||||
"pvcreate (lvm2) succeeds writing LVM label at sector $i" \
|
||||
'pvcreate --labelsector $i $d1 &&
|
||||
dd if=$d1 bs=512 skip=$i count=1 status=noxfer 2>&1 | strings | grep -q LABELONE;
|
||||
test $? == 0 &&
|
||||
pvremove -f $d1'
|
||||
done
|
||||
|
||||
test_expect_failure \
|
||||
"pvcreate (lvm2) fails writing LVM label at sector 4" \
|
||||
'pvcreate --labelsector 4 $d1'
|
||||
|
||||
test_done
|
||||
# Local Variables:
|
||||
# indent-tabs-mode: nil
|
||||
|
Loading…
Reference in New Issue
Block a user