From 3ed79d8dfe8b75830d8fd6925d7cef5ef1ebd8f2 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 26 Mar 2021 11:16:32 +0100 Subject: [PATCH] tests: move setting of dmeventd pid Added comment the 'lvs' already initiates dmeventd Note: we don't have any query mechanism to check if dmeventd is already running except access of socket which basically starts dmeventd if it's not running. --- test/shell/dmeventd-restart.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/shell/dmeventd-restart.sh b/test/shell/dmeventd-restart.sh index 151f1d51a..0def8c1fa 100644 --- a/test/shell/dmeventd-restart.sh +++ b/test/shell/dmeventd-restart.sh @@ -41,7 +41,7 @@ test -e LOCAL_CLVMD || grep 'already monitored' lvchange.out # now try what happens if no dmeventd is running kill -9 "$(< LOCAL_DMEVENTD)" -rm LOCAL_DMEVENTD +rm LOCAL_DMEVENTD debug.log* dmeventd -R -f & echo $! >LOCAL_DMEVENTD @@ -52,11 +52,12 @@ sleep 9 not pgrep dmeventd rm LOCAL_DMEVENTD +# First lvs restarts 'dmeventd' (initiate a socket connection to a daemon) check lv_field $vg/3way seg_monitor "not monitored" +pgrep -o dmeventd >LOCAL_DMEVENTD check lv_field $vg/4way seg_monitor "not monitored" lvchange --monitor y --verbose $vg/3way 2>&1 | tee lvchange.out -pgrep -o dmeventd >LOCAL_DMEVENTD test -e LOCAL_CLVMD || not grep 'already monitored' lvchange.out lvchange --monitor y --verbose $vg/$lv2 2>&1 | tee lvchange.out