Blob Blame History Raw
From 04ca93351a4e25c35562ef705b3d96c3743609ff Mon Sep 17 00:00:00 2001
From: "Brian C. Lane" <bcl@redhat.com>
Date: Tue, 25 Jun 2019 09:37:32 -0700
Subject: [PATCH 15/42] tests: Update all the dmsetup tests to use
 ENABLE_DEVICE_MAPPER

---
 tests/t6004-dm-many-partitions.sh | 4 +++-
 tests/t6005-dm-uuid.sh            | 4 +++-
 tests/t6006-dm-512b-sectors.sh    | 3 ++-
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/tests/t6004-dm-many-partitions.sh b/tests/t6004-dm-many-partitions.sh
index b4be975..636c837 100755
--- a/tests/t6004-dm-many-partitions.sh
+++ b/tests/t6004-dm-many-partitions.sh
@@ -21,7 +21,9 @@
 
 require_root_
 require_udevadm_settle_
-(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed"
+
+test "x$ENABLE_DEVICE_MAPPER" = xyes \
+  || skip_ "no device-mapper support"
 
 ss=$sector_size_
 ns=300
diff --git a/tests/t6005-dm-uuid.sh b/tests/t6005-dm-uuid.sh
index 4266747..790c23f 100755
--- a/tests/t6005-dm-uuid.sh
+++ b/tests/t6005-dm-uuid.sh
@@ -21,7 +21,9 @@
 
 require_root_
 require_udevadm_settle_
-(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed"
+
+test "x$ENABLE_DEVICE_MAPPER" = xyes \
+  || skip_ "no device-mapper support"
 
 ss=$sector_size_
 ns=300
diff --git a/tests/t6006-dm-512b-sectors.sh b/tests/t6006-dm-512b-sectors.sh
index bf32135..c0de382 100644
--- a/tests/t6006-dm-512b-sectors.sh
+++ b/tests/t6006-dm-512b-sectors.sh
@@ -25,7 +25,8 @@ require_scsi_debug_module_
 grep '^#define USE_BLKID 1' "$CONFIG_HEADER" > /dev/null ||
   skip_ 'this system lacks a new-enough libblkid'
 
-(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed"
+test "x$ENABLE_DEVICE_MAPPER" = xyes \
+  || skip_ "no device-mapper support"
 
 # Device maps names - should be random to not conflict with existing ones on
 # the system
-- 
2.26.2