Skip to contentSkip to conversation

master - tests: crypt test cannot run on ramdisk

PATCH Zdenek Kabelac 1 participant 1 message May 12, 2018

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=842b3074b7b186815ee8a200598f2e97f08c54af
Commit:        842b3074b7b186815ee8a200598f2e97f08c54af
Parent:        6f48741062710fec2eb5c58dd8d4364194bdbf44
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Sat May 12 16:00:55 2018 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Sat May 12 17:48:31 2018 +0200

tests: crypt test cannot run on ramdisk

This test can't use brd (ramdisk) as backend since for some weird reason lsblk is not listing these device.

TODO: test could be probably rewritten to avoid using lsblk somehow??

---
 test/shell/fsadm-crypt.sh |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
test/shell/fsadm-crypt.sh +6 -1
index 634fef3..68959e3 100644
@@ -14,6 +14,10 @@ test_description='Exercise fsadm filesystem resize on crypt devices'
 SKIP_WITH_LVMLOCKD=1
 SKIP_WITH_LVMPOLLD=1
 
+# FIXME: cannot use brd (ramdisk)  - lsblk is NOT listing it
+# so lsblk usage should be replaced
+export LVM_TEST_PREFER_BRD=0
+
 . lib/inittest
 
 aux prepare_vg 1 300
@@ -119,7 +123,8 @@ check_missing()
 }
 
 get_crypt_kname() {
-	lsblk -r -n -o KNAME,NAME | grep "$1" | cut -d ' ' -f 1
+	lsblk -r -n -o KNAME,NAME | tee out
+	grep "$1" out | cut -d ' ' -f 1
 }