1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-31 05:47:43 +03:00

tests: use DMEVENTD_PIDFILE

Test for compiled-in pidfile location
(so we are not based on assumption /var/run or /run link exists)
This commit is contained in:
Zdenek Kabelac 2014-03-14 11:12:46 +01:00
parent ca880a4f13
commit 58e812a13f
2 changed files with 6 additions and 1 deletions

View File

@ -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 \

View File

@ -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
}