[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[lvm-devel] [PATCH] Fix 'make check' to work with the latest device-mapper



Fix 'make check' runnable with recent versions of dmsetup.

'make check' uses DM_DEV_DIR environment variable to set
a sandbox for testing.
To confirm if dmsetup command supports the variable,
it checks the error message of dmsetup when invalid value is set to
the variable.

As the message of dmsetup has recently changed, 'make check'
should test for the newe version, too.
Otherwise, it skips all tests that includes activation.

Thanks,
-- 
Jun'ichi Nomura, NEC Corporation of America
Fix 'make check' to run with recent versions of dmsetup.

'make check' uses DM_DEV_DIR environment variable to set
a sandbox for testing.
To confirm if dmsetup command supports the variable,
it checks the error message of dmsetup when invalid value is set to
the variable.

As the message of dmsetup has recently changed, 'make check'
should test for the newe version, too.
Otherwise, it skips all tests that includes activation.

Index: LVM2.work/test/lvm-utils.sh
===================================================================
--- LVM2.work.orig/test/lvm-utils.sh
+++ LVM2.work/test/lvm-utils.sh
@@ -65,7 +65,8 @@ dmsetup_has_dm_devdir_support_()
   # Detect support for the envvar.  If it's supported, the
   # following command will fail with the expected diagnostic.
   out=$(DM_DEV_DIR=j dmsetup version 2>&1)
-  test "$?:$out" = "1:Invalid DM_DEV_DIR envvar value."
+  test "$?:$out" = "1:Invalid DM_DEV_DIR envvar value." -o \
+       "$?:$out" = "1:Invalid DM_DEV_DIR environment variable value."
 }
 
 # set up private /dev and /etc

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]