From 4df024c40c63ff254cd22e1e7da3a7d36f42ccd1 Mon Sep 17 00:00:00 2001 From: Peter Rajnoha Date: Mon, 11 Jan 2010 15:48:49 +0000 Subject: [PATCH] Define {DM, LVM}_UDEV_DISABLE_CHECKING=1 env. variables for tests. We need to disable udev checking for our tests since they use their own location for device nodes and symlinks. --- WHATS_NEW_DM | 1 + configure.in | 1 + test/Makefile.in | 7 +++++++ 3 files changed, 9 insertions(+) diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index 0070fe614..1aa657453 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -1,5 +1,6 @@ Version 1.02.41 - ==================================== + Define {DM, LVM}_UDEV_DISABLE_CHECKING=1 env. variables for tests. Enable udev_sync and udev_rules in lvm.conf by default while running tests. Add support to disable udev checking: DM_UDEV_DISABLE_CHECKING=1 env. variable. Add dm_tree_add_dev_with_udev_flags to provide wider support for udev flags. diff --git a/configure.in b/configure.in index 834fd6eea..8db301cc6 100644 --- a/configure.in +++ b/configure.in @@ -1130,6 +1130,7 @@ AC_SUBST(SNAPSHOTS) AC_SUBST(STATICDIR) AC_SUBST(STATIC_LINK) AC_SUBST(UDEV_RULES) +AC_SUBST(UDEV_SYNC) AC_SUBST([LIB_PTHREAD]) AC_SUBST(interface) AC_SUBST(kerneldir) diff --git a/test/Makefile.in b/test/Makefile.in index 75366fd42..0f2b3a22e 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -30,6 +30,11 @@ SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) T = $(wildcard $(srcdir)/t-*.sh) +ifeq ("@UDEV_SYNC@", "yes") +dm_udev_disable_checking = 1 +lvm_udev_disable_checking = 1 +endif + ifeq ("@APPLIB@", "yes") T += $(srcdir)/lvm2app.sh all: api/vgtest @@ -56,6 +61,8 @@ init.sh: $(srcdir)/Makefile.in $(srcdir)/test-utils.sh .bin-dir-stamp bin/not bi echo 'abs_srcdir=$(abs_srcdir)' >> $@-t echo 'abs_builddir=$(abs_builddir)' >> $@-t echo 'export PATH' >> $@-t + echo 'export DM_UDEV_DISABLE_CHECKING=$(dm_udev_disable_checking)' >> $@-t + echo 'export LVM_UDEV_DISABLE_CHECKING=$(lvm_udev_disable_checking)' >> $@-t chmod a-w $@-t mv $@-t $@ if test "$(srcdir)" != "."; then cp $(srcdir)/test-utils.sh \