public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: mornfall@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2/test Makefile.in test-utils.sh
Date: Thu, 06 May 2010 18:54:00 -0000	[thread overview]
Message-ID: <20100506185453.2064.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	mornfall@sourceware.org	2010-05-06 18:54:52

Modified files:
	test           : Makefile.in test-utils.sh 

Log message:
	Add some basic provisions for automated testing of dmeventd.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/Makefile.in.diff?cvsroot=lvm2&r1=1.39&r2=1.40
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/test-utils.sh.diff?cvsroot=lvm2&r1=1.38&r2=1.39

--- LVM2/test/Makefile.in	2010/04/30 14:33:39	1.39
+++ LVM2/test/Makefile.in	2010/05/06 18:54:51	1.40
@@ -78,7 +78,11 @@
 	echo 'abs_top_srcdir=$(abs_top_builddir)' >> $@-t
 	echo 'PATH=$$abs_top_builddir/test/bin:$$PATH' >> $@-t
 	LDLPATH="\$$abs_top_builddir/libdm"; \
+	LDLPATH="$$LDLPATH:\$$abs_top_builddir/tools"; \
 	LDLPATH="$$LDLPATH:\$$abs_top_builddir/daemons/dmeventd"; \
+	LDLPATH="$$LDLPATH:\$$abs_top_builddir/daemons/dmeventd/plugins/lvm2"; \
+	LDLPATH="$$LDLPATH:\$$abs_top_builddir/daemons/dmeventd/plugins/mirror"; \
+	LDLPATH="$$LDLPATH:\$$abs_top_builddir/daemons/dmeventd/plugins/snapshot"; \
 	echo "export LD_LIBRARY_PATH=\"$$LDLPATH\"" >> $@-t
 	echo 'abs_srcdir=$(abs_srcdir)' >> $@-t
 	echo 'abs_builddir=$(abs_builddir)' >> $@-t
@@ -99,6 +103,7 @@
 	done
 	ln -s "$(abs_top_builddir)/tools/dmsetup" bin/dmsetup
 	ln -s "$(abs_top_builddir)/daemons/clvmd/clvmd" bin/clvmd
+	ln -s "$(abs_top_builddir)/daemons/dmeventd/dmeventd" bin/dmeventd
 	touch $@
 
 lvm-wrapper: Makefile
--- LVM2/test/test-utils.sh	2010/04/20 18:18:59	1.38
+++ LVM2/test/test-utils.sh	2010/05/06 18:54:52	1.39
@@ -72,6 +72,22 @@
 	LOCAL_CLVMD="$!"
 }
 
+prepare_dmeventd() {
+	if pgrep dmeventd ; then
+		echo "Cannot test dmeventd with real dmeventd ($(pgrep clvmd)) running."
+		exit 200
+	fi
+
+	# skip if we don't have our own dmeventd...
+	(which dmeventd | grep $abs_builddir) || exit 200
+
+	trap_teardown
+
+	dmeventd -d &
+	LOCAL_DMEVENTD="$!"
+	strace -p $LOCAL_DMEVENTD &
+}
+
 prepare_testroot() {
 	OLDPWD="`pwd`"
 	PREFIX="LVMTEST$$"
@@ -127,6 +143,8 @@
 		kill -9 "$LOCAL_CLVMD" || true
 	}
 
+	test -n "$LOCAL_DMEVENTD" && kill -9 "$LOCAL_DMEVENTD"
+
 	teardown_devs
 
 	test -n "$TESTDIR" && {


                 reply	other threads:[~2010-05-06 18:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20100506185453.2064.qmail@sourceware.org \
    --to=mornfall@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).