mirror of
git://sourceware.org/git/lvm2.git
synced 2025-02-18 21:58:06 +03:00
tests: skip tests that require blkid BLOCK_SIZE
Recent commit 84bd394cf9aaa581b4bf980f764544dda26a0305 "writecache: use block size 4096 when no fs is found" changed the default writecache block size from 512 to 4096 when no file system is detected. The fs block size detection requires the libblkid BLOCK_SIZE feature, so skip tests on systems without this. Otherwise, 4096 writecache added to 512 xfs leads fs io or mount failures.
This commit is contained in:
parent
39f497b9d8
commit
a47e20a092
@ -118,6 +118,14 @@ mkdir -p "$mount_dir"
|
||||
|
||||
aux prepare_devs 6 70 # want 64M of usable space from each dev
|
||||
|
||||
# Tests with fs block sizes require a libblkid version that shows BLOCK_SIZE
|
||||
vgcreate $vg "$dev1"
|
||||
lvcreate -n $lv1 -L50 $vg
|
||||
mkfs.xfs -f "$DM_DEV_DIR/$vg/$lv1"
|
||||
blkid -c /dev/null "$DM_DEV_DIR/$vg/$lv1" | grep BLOCK_SIZE || skip
|
||||
lvchange -an $vg
|
||||
vgremove -ff $vg
|
||||
|
||||
# generate random data
|
||||
dd if=/dev/urandom of=pattern bs=512K count=1
|
||||
|
||||
|
@ -159,6 +159,14 @@ _run_test() {
|
||||
aux prepare_scsi_debug_dev 256 sector_size=512 physblk_exp=3
|
||||
aux prepare_devs 2 64
|
||||
|
||||
# Tests with fs block sizes require a libblkid version that shows BLOCK_SIZE
|
||||
vgcreate $vg "$dev1"
|
||||
lvcreate -n $lv1 -L50 $vg
|
||||
mkfs.xfs -f "$DM_DEV_DIR/$vg/$lv1"
|
||||
blkid -c /dev/null "$DM_DEV_DIR/$vg/$lv1" | grep BLOCK_SIZE || skip
|
||||
lvchange -an $vg
|
||||
vgremove -ff $vg
|
||||
|
||||
# loopa/loopb have LBS 512 PBS 512
|
||||
which fallocate || skip
|
||||
fallocate -l 64M loopa
|
||||
|
@ -25,6 +25,14 @@ check sysfs "$(< SCSI_DEBUG_DEV)" queue/logical_block_size "512"
|
||||
check sysfs "$(< SCSI_DEBUG_DEV)" queue/physical_block_size "512"
|
||||
aux prepare_devs 2 64
|
||||
|
||||
# Tests with fs block sizes require a libblkid version that shows BLOCK_SIZE
|
||||
vgcreate $vg "$dev1"
|
||||
lvcreate -n $lv1 -L50 $vg
|
||||
mkfs.xfs -f "$DM_DEV_DIR/$vg/$lv1"
|
||||
blkid -c /dev/null "$DM_DEV_DIR/$vg/$lv1" | grep BLOCK_SIZE || skip
|
||||
lvchange -an $vg
|
||||
vgremove -ff $vg
|
||||
|
||||
# scsi_debug devices with 512 LBS and 4K PBS
|
||||
#aux prepare_scsi_debug_dev 256 sector_size=512 physblk_exp=3
|
||||
#check sysfs "$(< SCSI_DEBUG_DEV)" queue/logical_block_size "512"
|
||||
|
Loading…
x
Reference in New Issue
Block a user