Skip to contentSkip to conversation

LVM2/test/shell dmeventd-restart.sh pvcreate-o ...

PATCH [email protected] 1 participant 1 message Mar 20, 2012

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2012-03-20 10:48:59

Modified files:
test/shell : dmeventd-restart.sh pvcreate-operation-md.sh

Log message:
Update test for dmevent restart

Actually restart was failing for different reason - so pass in proper location of dmeventd for restart from lvm command and avoid using the one from /sbin location.

Update pv create test with "" around path.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/shell/dmeventd-restart.sh.diff?cvsroot=lvm2&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/shell/pvcreate-operation-md.sh.diff?cvsroot=lvm2&r1=1.2&r2=1.3

test/shell/dmeventd-restart.sh +10 -12
@@ -11,15 +11,8 @@
 
 . lib/test
 
-which mkfs.ext2 || skip
-
 aux prepare_dmeventd
 
-# Currently dmeventd doesn't support any other location
-# for dmeventd restart, so FIXME in dmeventd
-# and update this check
-test -x /sbin/dmeventd || skip
-
 aux prepare_vg 5
 
 lvcreate -m 3 --ig -L 1 -n 4way $vg
@@ -28,9 +21,8 @@
 lvchange --monitor y $vg/3way
 
 dmeventd -R -f &
-echo "$!" > LOCAL_DMEVENTD
-
-sleep 1 # wait a bit, so we talk to the new dmeventd later
+echo $! >LOCAL_DMEVENTD
+sleep 2 # wait a bit, so we talk to the new dmeventd later
 
 lvchange --monitor y --verbose $vg/3way 2>&1 | tee lvchange.out
 grep 'already monitored' lvchange.out
@@ -40,9 +32,15 @@
 # now try what happens if no dmeventd is running
 kill -9 $(cat LOCAL_DMEVENTD)
 dmeventd -R -f &
-sleep 3
+sleep 1
+# now dmeventd should not be running
+pgrep dmeventd
+rm LOCAL_DMEVENTD
+
+# set dmeventd path
+aux lvmconf "dmeventd/executable=\"$abs_top_builddir/test/lib/dmeventd\""
 lvchange --monitor y --verbose $vg/3way 2>&1 | tee lvchange.out
-not grep 'already monitored' lvchange.out
 pgrep dmeventd >LOCAL_DMEVENTD
+not grep 'already monitored' lvchange.out
 
 vgremove -ff $vg
test/shell/pvcreate-operation-md.sh +22 -22

117 lines not on this page · raw message