Skip to contentSkip to conversation

master - tests: skip test for non dirty cache

PATCH Zdenek Kabelac 1 participant 1 message Jul 13, 2017

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=8a2448a4ed60deae8919e90edd6f4e94e450d19a
Commit:        8a2448a4ed60deae8919e90edd6f4e94e450d19a
Parent:        e682af78789b34bbcb1706c16f629dfd93915bf9
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Fri Jul 14 00:42:40 2017 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Fri Jul 14 00:42:40 2017 +0200

tests: skip test for non dirty cache

Seems some cache LV can't be made dirty easily with older cache policy implementations....

---
 test/shell/lvconvert-cache-abort.sh |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
test/shell/lvconvert-cache-abort.sh +6 -1
index 701a41d..e771947 100644
@@ -40,7 +40,12 @@ done
 # Delay dev to ensure we have some time to 'capture' interrupt in flush
 aux delay_dev "$dev1" 100 0 "$(get first_extent_sector "$dev1"):"
 
-lvdisplay --maps $vg
+# TODO, how to make writeback cache dirty
+test "$(get lv_field $vg/$lv1 cache_dirty_blocks)" -gt 0 || {
+	lvdisplay --maps $vg
+	skip "Cannot make a dirty writeback cache LV."
+}
+
 sync
 dd if=/dev/zero of="$DM_DEV_DIR/$vg/$lv1" bs=4k count=100 conv=fdatasync