Skip to contentSkip to conversation

master - tests: update removal test

PATCH Zdenek Kabelac 1 participant 1 message Sep 21, 2015

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=47f623d64b6432fbb3533cb72132c947eeb01941
Commit:        47f623d64b6432fbb3533cb72132c947eeb01941
Parent:        7e63364529e563cf7609875f6aca10303c03883e
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Mon Sep 21 22:44:43 2015 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Tue Sep 22 00:08:45 2015 +0200

tests: update removal test

Test is currently checking a very non-standard use case. Make it a more resistent against being blocked in kernel.

---
 test/shell/snapshot-remove-dmsetup.sh |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
test/shell/snapshot-remove-dmsetup.sh +9 -1
index b5aad1f..610d3c2 100644
@@ -34,11 +34,19 @@ mkfs.ext2 "$DM_DEV_DIR/$vg1/snap"
 mkdir mnt
 mount -o errors=remount-ro "$DM_DEV_DIR/$vg1/snap" mnt
 
+sync
+
 # intetionally suspend layer bellow
 dmsetup suspend $vg-$lv1
 
 # now this should pass without blocking
-dmsetup suspend --noflush --nolockfs $vg1-snap
+#dmsetup suspend --noflush --nolockfs $vg1-snap &
+dmsetup suspend $vg1-snap &
+
+sleep .5
+
+dmsetup info --noheadings -c -o suspended $vg1-snap | tee out
+should grep -i suspend out
 
 # unlock device below
 dmsetup resume $vg-$lv1