All of lore.kernel.org
 help / color / mirror / Atom feed
* LVM2/test Makefile.in test-utils.sh
@ 2010-05-06 18:54 mornfall
  2010-05-07  7:22 ` Zdenek Kabelac
  0 siblings, 1 reply; 3+ messages in thread
From: mornfall @ 2010-05-06 18:54 UTC (permalink / raw)
  To: lvm-devel

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	mornfall at 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" && {



^ permalink raw reply	[flat|nested] 3+ messages in thread

* LVM2/test Makefile.in test-utils.sh
  2010-05-06 18:54 LVM2/test Makefile.in test-utils.sh mornfall
@ 2010-05-07  7:22 ` Zdenek Kabelac
  2010-05-11 12:21   ` Petr Rockai
  0 siblings, 1 reply; 3+ messages in thread
From: Zdenek Kabelac @ 2010-05-07  7:22 UTC (permalink / raw)
  To: lvm-devel

Dne 6.5.2010 20:54, mornfall at sourceware.org napsal(a):
> CVSROOT:	/cvs/lvm2
> Module name:	LVM2
> Changes by:	mornfall at 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"; \


Oh - I've had this one in my tree for some time - but as we do not test
dmeventd - I've been not pushing it upstream - as we need a better solution.

daemons/dmeventd/plugins/mirror daemons/dmeventd/plugins/snapshot shouldn't be
here at all - these should be loaded via configurable plugin path - and we
need some more updates even on dlopen part of code (as we move plugins to
subdir of libdir.  Another thing that needs to be changed is the configurable
comunication fifo.

At this moment dmeventd is not yet ready for parallel testing.

Zdenek



^ permalink raw reply	[flat|nested] 3+ messages in thread

* LVM2/test Makefile.in test-utils.sh
  2010-05-07  7:22 ` Zdenek Kabelac
@ 2010-05-11 12:21   ` Petr Rockai
  0 siblings, 0 replies; 3+ messages in thread
From: Petr Rockai @ 2010-05-11 12:21 UTC (permalink / raw)
  To: lvm-devel

Zdenek Kabelac <zkabelac@redhat.com> writes:

> daemons/dmeventd/plugins/mirror daemons/dmeventd/plugins/snapshot shouldn't be
> here at all - these should be loaded via configurable plugin path - and we
> need some more updates even on dlopen part of code (as we move plugins to
> subdir of libdir.  Another thing that needs to be changed is the configurable
> comunication fifo.
Feel free to fix it.

> At this moment dmeventd is not yet ready for parallel testing.
Who cares? The tests skip if any dmeventd is running in the system --
the same approach as with clvmd. You can't run two clvmd tests in
parallel either... It works for what I need it for. If you need more,
patches welcome of course.

Yours,
   Petr.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-05-11 12:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-06 18:54 LVM2/test Makefile.in test-utils.sh mornfall
2010-05-07  7:22 ` Zdenek Kabelac
2010-05-11 12:21   ` Petr Rockai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.