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

Fix various problems in tests

- PPC uses 64k page, some caculations are wrong in tests
- file utility is buggy on PPC and cannot detect swap, use blkid instead
- read ahead is quietly rounded down according to page size
(for now use some common divisor value in test)
This commit is contained in:
Milan Broz 2009-06-06 16:40:39 +00:00
parent a908d0030c
commit 2d37634918
3 changed files with 15 additions and 6 deletions

View File

@ -112,6 +112,6 @@ not pvcreate --uuid $uuid2 --restorefile $backupfile $dev2
# pvcreate wipes swap signature when forced
dd if=/dev/zero of=$dev1 bs=1024 count=64
mkswap $dev1
file -s $dev1 | grep "swap file"
blkid -c /dev/null $dev1 | grep "swap"
pvcreate -f $dev1
file -s $dev1 | not grep "swap file"
blkid -c /dev/null $dev1 | not grep "swap"

View File

@ -10,6 +10,7 @@
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
test_description='Test pvcreate option values'
PAGESIZE=$(getconf PAGESIZE)
. ./test-utils.sh
@ -101,11 +102,19 @@ check_pv_field_ $dev1 pe_start 512.00K
pvcreate --metadatasize 100k --dataalignment 100k $dev1
check_pv_field_ $dev1 pe_start 200.00K
# metadata area start is aligned according to pagesize
# pagesize should be 64k or 4k ...
if [ $PAGESIZE -eq 65536 ] ; then
pv_align="192.50K"
else
pv_align="133.00K"
fi
pvcreate --metadatasize 128k --dataalignment 3.5k $dev1
check_pv_field_ $dev1 pe_start 133.00K
check_pv_field_ $dev1 pe_start $pv_align
pvcreate --metadatasize 128k --metadatacopies 2 --dataalignment 3.5k $dev1
check_pv_field_ $dev1 pe_start 133.00K
check_pv_field_ $dev1 pe_start $pv_align
#COMM 'pv with LVM1 compatible data alignment can be convereted'
#compatible == LVM1_PE_ALIGN == 64k

View File

@ -39,8 +39,8 @@ lvdisplay "$vg"/"$lv"
lvchange -r auto "$vg"/"$lv" 2>&1 | grep auto
check_lvs_ lv_read_ahead auto
check_lvs_ lv_kernel_read_ahead 5120
lvchange -r 400 "$vg/$lv"
check_lvs_ lv_read_ahead 400
lvchange -r 640 "$vg/$lv"
check_lvs_ lv_read_ahead 640
lvremove -ff "$vg"
#COMM "read ahead is properly inherited from underlying PV"