Skip to contentSkip to conversation

main - tests: prohibit 4K brd device with integrity

PATCH Zdenek Kabelac 1 participant 1 message Mar 20, 2021

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=94c4af232c6118191ac2c81a4130e6f83823f510
Commit:        94c4af232c6118191ac2c81a4130e6f83823f510
Parent:        179f59a0ca7d4d5f779f86d990ebd336c9b13f0e
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Sat Mar 20 09:54:30 2021 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Sat Mar 20 10:52:24 2021 +0100

tests: prohibit 4K brd device with integrity

Older kernels hit these errors:

device-mapper: integrity: Bio not aligned on 8 sectors: 0x8ffc, 0x4

---
 test/shell/integrity-blocksize-2.sh | 2 ++
 test/shell/integrity-dmeventd.sh    | 4 +++-
 test/shell/integrity-misc.sh        | 4 +++-
 test/shell/integrity-syncaction.sh  | 4 +++-
 test/shell/integrity.sh             | 4 +++-
 5 files changed, 14 insertions(+), 4 deletions(-)
test/shell/integrity-blocksize-2.sh +2 -0
index 3f6eb9242..ae0e72ec6 100644
@@ -15,6 +15,8 @@ SKIP_WITH_LVMPOLLD=1
 . lib/inittest
 
 aux have_integrity 1 5 0 || skip
+# Avoid 4K ramdisk devices on older kernels
+aux kernel_at_least  5 10 || export LVM_TEST_PREFER_BRD=0
 
 mnt="mnt"
 mkdir -p $mnt
test/shell/integrity-dmeventd.sh +3 -1
index e82b92142..9049eb0f7 100644
@@ -14,8 +14,10 @@ SKIP_WITH_LVMPOLLD=1
 
 . lib/inittest
 
-aux have_integrity 1 5 0 || skip
 which mkfs.xfs || skip
+aux have_integrity 1 5 0 || skip
+# Avoid 4K ramdisk devices on older kernels
+aux kernel_at_least  5 10 || export LVM_TEST_PREFER_BRD=0
 
 mnt="mnt"
 mkdir -p $mnt
test/shell/integrity-misc.sh +3 -1
index 4ebf42213..e6c108a0f 100644
@@ -14,8 +14,10 @@ SKIP_WITH_LVMPOLLD=1
 
 . lib/inittest
 
-aux have_integrity 1 5 0 || skip
 which mkfs.xfs || skip
+aux have_integrity 1 5 0 || skip
+# Avoid 4K ramdisk devices on older kernels
+aux kernel_at_least  5 10 || export LVM_TEST_PREFER_BRD=0
 
 mnt="mnt"
 mkdir -p $mnt
test/shell/integrity-syncaction.sh +3 -1
index a1d96fb0e..e404f6b6d 100644
@@ -14,9 +14,11 @@ SKIP_WITH_LVMPOLLD=1
 
 . lib/inittest
 
-aux have_integrity 1 5 0 || skip
 which mkfs.xfs || skip
 which xfs_growfs || skip
+aux have_integrity 1 5 0 || skip
+# Avoid 4K ramdisk devices on older kernels
+aux kernel_at_least  5 10 || export LVM_TEST_PREFER_BRD=0
 
 mnt="mnt"
 mkdir -p $mnt
test/shell/integrity.sh +3 -1
index ffac50902..80ff919b2 100644
@@ -14,9 +14,11 @@ SKIP_WITH_LVMPOLLD=1
 
 . lib/inittest
 
-aux have_integrity 1 5 0 || skip
 which mkfs.xfs || skip
 which xfs_growfs || skip
+aux have_integrity 1 5 0 || skip
+# Avoid 4K ramdisk devices on older kernels
+aux kernel_at_least  5 10 || export LVM_TEST_PREFER_BRD=0
 
 mnt="mnt"
 mkdir -p $mnt