public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: zkabelac@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2/test/lib aux.sh
Date: Fri, 23 Mar 2012 09:41:00 -0000	[thread overview]
Message-ID: <20120323094120.17694.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2012-03-23 09:41:20

Modified files:
	test/lib       : aux.sh 

Log message:
	Improve teardown_devs
	
	Try to avoid start of dmeventd during vgremove if the code has any bug
	inside.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/aux.sh.diff?cvsroot=lvm2&r1=1.47&r2=1.48

--- LVM2/test/lib/aux.sh	2012/03/20 10:51:57	1.47
+++ LVM2/test/lib/aux.sh	2012/03/23 09:41:20	1.48
@@ -102,11 +102,6 @@
 		fi
 	fi
 
-	if test "$stray" -eq 0; then
-		dmsetup table | not egrep -q "$vg|$vg1|$vg2|$vg3|$vg4" || \
-			vgremove -ff $vg $vg1 $vg2 $vg3 $vg4 &>/dev/null || rm -f debug.log
-	fi
-
 	# Remove devices, start with closed (sorted by open count)
 	local remfail=no
 	local need_udev_wait=0
@@ -166,7 +161,14 @@
 teardown() {
 	echo -n "## teardown..."
 
-	test -f LOCAL_CLVMD && {
+	dmsetup table | not egrep -q "$vg|$vg1|$vg2|$vg3|$vg4" || {
+		# Avoid activation of dmeventd if there is no pid
+		cfg=$(test -s LOCAL_DMEVENTD || echo "--config 'activation { monitoring = 0 }'")
+		vgremove -ff $cfg  \
+			$vg $vg1 $vg2 $vg3 $vg4 &>/dev/null || rm -f debug.log
+	}
+
+	test -s LOCAL_CLVMD && {
 		kill -INT "$(cat LOCAL_CLVMD)"
 		test -z "$LVM_VALGRIND_CLVMD" || sleep 1
 		sleep .1
@@ -176,8 +178,8 @@
 	echo -n .
 
 	pgrep dmeventd || true
-	test -f LOCAL_DMEVENTD && kill -9 $(cat LOCAL_DMEVENTD) || true
-	test -f LOCAL_LVMETAD && kill -9 $(cat LOCAL_LVMETAD) || true
+	test ! -s LOCAL_DMEVENTD || kill -9 "$(cat LOCAL_DMEVENTD)" || true
+	test ! -s LOCAL_LVMETAD || kill -9 "$(cat LOCAL_LVMETAD)" || true
 
 	echo -n .
 


             reply	other threads:[~2012-03-23  9:41 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-23  9:41 zkabelac [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-03-16 19:08 zkabelac
2012-03-16 13:44 zkabelac
2012-03-16 12:57 zkabelac
2012-03-16 12:56 zkabelac
2012-03-06  2:54 agk
2012-01-26 18:25 zkabelac
2011-12-12  0:01 mornfall
2011-11-10 12:44 zkabelac
2011-10-23 15:43 zkabelac
2011-10-23 15:40 zkabelac
2011-09-24 21:15 zkabelac
2011-07-08 10:05 zkabelac
2011-06-30  9:17 agk
2011-06-30  9:08 zkabelac
2011-06-30  8:50 mbroz
2011-06-30  1:17 agk
2011-06-29 18:14 agk
2011-06-29 17:37 agk
2011-06-29 17:33 agk
2011-06-29 12:37 agk
2011-06-29 12:33 agk
2011-06-28  0:38 agk
2011-06-28  0:11 agk
2011-03-04 14:19 mbroz
2011-03-01 23:44 mbroz
2011-03-01 22:28 mbroz
2011-01-28 16:10 zkabelac
2011-01-13 14:57 zkabelac
2011-01-12 16:07 mornfall
2011-01-07 13:04 mornfall
2011-01-07 13:03 mornfall
2011-01-05  0:25 mornfall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120323094120.17694.qmail@sourceware.org \
    --to=zkabelac@sourceware.org \
    --cc=lvm-devel@redhat.com \
    --cc=lvm2-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).