All of lore.kernel.org
 help / color / mirror / Atom feed
* master - tests: use DMEVENTD_PIDFILE
@ 2014-03-14 10:17 Zdenek Kabelac
  0 siblings, 0 replies; only message in thread
From: Zdenek Kabelac @ 2014-03-14 10:17 UTC (permalink / raw)
  To: lvm-devel

Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=58e812a13ff725d9ca8958fe04b92fef320bce31
Commit:        58e812a13ff725d9ca8958fe04b92fef320bce31
Parent:        ca880a4f130a0d6111613e23f926c344217581a2
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Fri Mar 14 11:12:46 2014 +0100
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Fri Mar 14 11:16:24 2014 +0100

tests: use DMEVENTD_PIDFILE

Test for compiled-in pidfile location
(so we are not based on assumption /var/run or /run link exists)
---
 test/Makefile.in |    1 +
 test/lib/aux.sh  |    6 +++++-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/test/Makefile.in b/test/Makefile.in
index bf1913a..9335abd 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -136,6 +136,7 @@ lib/paths: $(srcdir)/Makefile.in .lib-dir-stamp
 	echo 'export DM_UDEV_SYNCHRONISATION=$(dm_udev_synchronisation)' >> $@-t
 	echo 'export THIN=@THIN@' >> $@-t
 	echo 'export LVMETAD_PIDFILE=@LVMETAD_PIDFILE@' >> $@-t
+	echo 'export DMEVENTD_PIDFILE=@DMEVENTD_PIDFILE@' >> $@-t
 	mv $@-t $@
 
 LIB = lib/not lib/should lib/harness \
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 7d13e8d..bd292bb 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -68,7 +68,11 @@ prepare_dmeventd() {
 	echo $! > LOCAL_DMEVENTD
 
 	# FIXME wait for pipe in /var/run instead
-	while ! test -e "/run/dmeventd.pid"; do echo -n .; sleep .2; done # wait for the socket
+	for i in $(seq 1 100) ; do
+		test $i -eq 100 && die "Startup of dmeventd is too slow."
+		test -e "${DMEVENTD_PIDFILE}" && break
+		sleep .2
+	done
 	echo ok
 }
 



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-03-14 10:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-14 10:17 master - tests: use DMEVENTD_PIDFILE Zdenek Kabelac

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.