master - rpm: install lvm2-pvscan again
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=6a4a6a7cd7ef83b6283...
Commit: 6a4a6a7cd7ef83b6283284637e3b28476fbc7712
Parent: c0c318e4f2ea362a4eb0207ee7b77ef2d8425dc5
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Nov 30 13:09:09 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Nov 30 13:10:00 2018 +0100
rpm: install lvm2-pvscan again
Let's repeat history once more 13d5c78a8d5f09b91e26cd49fffa05313d2f6c82.
---
spec/packages.inc | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/spec/packages.inc b/spec/packages.inc
index a1065a6..0be4f2e 100644
--- a/spec/packages.inc
+++ b/spec/packages.inc
@@ -175,6 +175,7 @@ fi
%{_tmpfilesdir}/%{name}.conf
%{_unitdir}/blk-availability.service
%{_unitdir}/lvm2-monitor.service
+ %{_unitdir}/lvm2-pvscan@.service
%attr(555, -, -) %{_prefix}/lib/systemd/system-generators/lvm2-activation-generator
%if %{have_service lvmpolld}
%{_unitdir}/lvm2-lvmpolld.service
5 years
master - tests: extend sleep
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c0c318e4f2ea362a4eb...
Commit: c0c318e4f2ea362a4eb0207ee7b77ef2d8425dc5
Parent: 8b87ffaa8a273ee7870298d9f74f0fabbf160148
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Nov 30 12:55:05 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Nov 30 13:03:09 2018 +0100
tests: extend sleep
---
test/shell/dmeventd-restart.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/shell/dmeventd-restart.sh b/test/shell/dmeventd-restart.sh
index 65f1655..5267290 100644
--- a/test/shell/dmeventd-restart.sh
+++ b/test/shell/dmeventd-restart.sh
@@ -44,7 +44,7 @@ dmeventd -R -f &
echo $! >LOCAL_DMEVENTD
# wait longer as tries to communicate with killed daemon
-sleep 7
+sleep 9
# now dmeventd should not be running
not pgrep dmeventd
rm LOCAL_DMEVENTD
5 years
master - makefiles: clean unit-test
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=8b87ffaa8a273ee7870...
Commit: 8b87ffaa8a273ee7870298d9f74f0fabbf160148
Parent: 7fb280ceacbacf6d0fb02ba1378e2caef2c8c582
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Nov 30 12:55:22 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Nov 30 13:03:09 2018 +0100
makefiles: clean unit-test
---
test/unit/Makefile | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/test/unit/Makefile b/test/unit/Makefile
index a37a0aa..909cef2 100644
--- a/test/unit/Makefile
+++ b/test/unit/Makefile
@@ -35,7 +35,8 @@ UNIT_DEPENDS = $(UNIT_SOURCE:%.c=%.d)
UNIT_OBJECTS = $(UNIT_SOURCE:%.c=%.o)
CLEAN_TARGETS += $(UNIT_DEPENDS) $(UNIT_OBJECTS) \
$(UNIT_SOURCE:%.c=%.gcda) \
- $(UNIT_SOURCE:%.c=%.gcno)
+ $(UNIT_SOURCE:%.c=%.gcno) \
+ test/unit/unit-test
test/unit/unit-test: $(UNIT_OBJECTS) lib/liblvm-internal.a libdaemon/client/libdaemonclient.a $(INTERNAL_LIBS)
@echo " [LD] $@"
5 years
master - makefiles: ignore missing files
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=7fb280ceacbacf6d0fb...
Commit: 7fb280ceacbacf6d0fb02ba1378e2caef2c8c582
Parent: 46f946145c7cf7b56b6414055fd6f50c0bbef702
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Nov 30 12:54:34 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Nov 30 13:03:09 2018 +0100
makefiles: ignore missing files
---
Makefile.in | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 85dfeac..dd8a526 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -165,9 +165,11 @@ ifneq ("$(GENHTML)", "")
lcov:
$(RM) -rf $(LCOV_REPORTS_DIR)
$(MKDIR_P) $(LCOV_REPORTS_DIR)
- $(LCOV) --capture --directory $(top_builddir) --output-file $(LCOV_REPORTS_DIR)/out.info
- -test !-s $(LCOV_REPORTS_DIR)/out.info || \
- $(GENHTML) -o $(LCOV_REPORTS_DIR) --ignore-errors source $(LCOV_REPORTS_DIR)/out.info
+ $(LCOV) --capture --directory $(top_builddir) --ignore-errors source \
+ --output-file $(LCOV_REPORTS_DIR)/out.info
+ -test ! -s $(LCOV_REPORTS_DIR)/out.info || \
+ $(GENHTML) -o $(LCOV_REPORTS_DIR) --ignore-errors source \
+ $(LCOV_REPORTS_DIR)/out.info
endif
endif
5 years
master - configure: update
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=46f946145c7cf7b56b6...
Commit: 46f946145c7cf7b56b6414055fd6f50c0bbef702
Parent: 41afe8c5cc7cde890a031ccac1cff0bf9d72220d
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Nov 30 13:02:42 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Nov 30 13:03:09 2018 +0100
configure: update
---
configure | 23 ++---------------------
1 files changed, 2 insertions(+), 21 deletions(-)
diff --git a/configure b/configure
index 496741f..efd438c 100755
--- a/configure
+++ b/configure
@@ -728,7 +728,6 @@ DEFAULT_PID_DIR
DEFAULT_MIRROR_SEGTYPE
DEFAULT_LOCK_DIR
DEFAULT_DM_RUN_DIR
-DEFAULT_DATA_ALIGNMENT
DEFAULT_CACHE_SUBDIR
DEFAULT_BACKUP_SUBDIR
DEFAULT_ARCHIVE_SUBDIR
@@ -974,7 +973,6 @@ with_default_archive_subdir
with_default_backup_subdir
with_default_cache_subdir
with_default_locking_dir
-with_default_data_alignment
with_interface
'
ac_precious_vars='build_alias
@@ -1754,8 +1752,6 @@ Optional Packages:
default metadata cache subdir [cache]
--with-default-locking-dir=DIR
default locking directory [autodetect_lock_dir/lvm]
- --with-default-data-alignment=NUM
- set the default data alignment in MiB [1]
--with-interface=IFACE choose kernel interface (ioctl) [ioctl]
Some influential environment variables:
@@ -13591,21 +13587,6 @@ _ACEOF
################################################################################
-
-# Check whether --with-default-data-alignment was given.
-if test "${with_default_data_alignment+set}" = set; then :
- withval=$with_default_data_alignment; DEFAULT_DATA_ALIGNMENT=$withval
-else
- DEFAULT_DATA_ALIGNMENT=1
-fi
-
-
-cat >>confdefs.h <<_ACEOF
-#define DEFAULT_DATA_ALIGNMENT $DEFAULT_DATA_ALIGNMENT
-_ACEOF
-
-
-################################################################################
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kernel interface choice" >&5
$as_echo_n "checking for kernel interface choice... " >&6; }
@@ -13797,9 +13778,8 @@ _ACEOF
-
################################################################################
-ac_config_files="$ac_config_files Makefile make.tmpl libdm/make.tmpl daemons/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/dmeventd/plugins/vdo/Makefile daemons/lvmdbusd/Makefile daemons/lvmdbusd/lvmdbusd daemons/lvmdbusd/lvmdb.py daemons/lvmdbusd/lvm_shell_proxy.py daemons/lvmdbusd/path.py daemons/lvmpolld/Makefile daemons/lvmlockd/Makefile conf/Makefile conf/example.conf conf/lvmlocal.conf conf/command_profile_template.profile conf/metadata_profile_template.profile include/Makefile lib/Makefile include/lvm-version.h libdaemon/Makefile libdaemon/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/dm-tools/Makefile libdm/libdevmapper.pc man/Makefile po/Makefile scripts/blkdeactiva
te.sh scripts/blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/cmirrord_init_red_hat scripts/com.redhat.lvmdbus1.service scripts/dm_event_systemd_red_hat.service scripts/dm_event_systemd_red_hat.socket scripts/lvm2_cmirrord_systemd_red_hat.service scripts/lvm2_lvmdbusd_systemd_red_hat.service scripts/lvm2_lvmpolld_init_red_hat scripts/lvm2_lvmpolld_systemd_red_hat.service scripts/lvm2_lvmpolld_systemd_red_hat.socket scripts/lvmlockd.service scripts/lvmlocks.service scripts/lvm2_monitoring_init_red_hat scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_tmpfiles_red_hat.conf scripts/lvmdump.sh scripts/Makefile test/Makefile tools/Makefile udev/Makefile"
+ac_config_files="$ac_config_files Makefile make.tmpl libdm/make.tmpl daemons/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/dmeventd/plugins/vdo/Makefile daemons/lvmdbusd/Makefile daemons/lvmdbusd/lvmdbusd daemons/lvmdbusd/lvmdb.py daemons/lvmdbusd/lvm_shell_proxy.py daemons/lvmdbusd/path.py daemons/lvmpolld/Makefile daemons/lvmlockd/Makefile conf/Makefile conf/example.conf conf/lvmlocal.conf conf/command_profile_template.profile conf/metadata_profile_template.profile include/Makefile lib/Makefile include/lvm-version.h libdaemon/Makefile libdaemon/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/dm-tools/Makefile libdm/libdevmapper.pc man/Makefile po/Makefile scripts/lvm2-pvscan
.service scripts/blkdeactivate.sh scripts/blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/cmirrord_init_red_hat scripts/com.redhat.lvmdbus1.service scripts/dm_event_systemd_red_hat.service scripts/dm_event_systemd_red_hat.socket scripts/lvm2_cmirrord_systemd_red_hat.service scripts/lvm2_lvmdbusd_systemd_red_hat.service scripts/lvm2_lvmpolld_init_red_hat scripts/lvm2_lvmpolld_systemd_red_hat.service scripts/lvm2_lvmpolld_systemd_red_hat.socket scripts/lvmlockd.service scripts/lvmlocks.service scripts/lvm2_monitoring_init_red_hat scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_tmpfiles_red_hat.conf scripts/lvmdump.sh scripts/Makefile test/Makefile tools/Makefile udev/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -14531,6 +14511,7 @@ do
"libdm/libdevmapper.pc") CONFIG_FILES="$CONFIG_FILES libdm/libdevmapper.pc" ;;
"man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
"po/Makefile") CONFIG_FILES="$CONFIG_FILES po/Makefile" ;;
+ "scripts/lvm2-pvscan.service") CONFIG_FILES="$CONFIG_FILES scripts/lvm2-pvscan.service" ;;
"scripts/blkdeactivate.sh") CONFIG_FILES="$CONFIG_FILES scripts/blkdeactivate.sh" ;;
"scripts/blk_availability_init_red_hat") CONFIG_FILES="$CONFIG_FILES scripts/blk_availability_init_red_hat" ;;
"scripts/blk_availability_systemd_red_hat.service") CONFIG_FILES="$CONFIG_FILES scripts/blk_availability_systemd_red_hat.service" ;;
5 years
master - tests: drop use_lvmetad from unit test
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=41afe8c5cc7cde890a0...
Commit: 41afe8c5cc7cde890a031ccac1cff0bf9d72220d
Parent: e940293c336b22e018aac96217e5e67b2397dde6
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Nov 29 22:52:46 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Nov 29 23:10:09 2018 +0100
tests: drop use_lvmetad from unit test
---
test/unit/activation-generator_t.c | 26 ++++++++++++--------------
1 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/test/unit/activation-generator_t.c b/test/unit/activation-generator_t.c
index cff0968..f02da05 100644
--- a/test/unit/activation-generator_t.c
+++ b/test/unit/activation-generator_t.c
@@ -129,20 +129,19 @@ static void _test_parse_line(void *fixture)
for (i = 0; i< DM_ARRAY_SIZE(_tests); i++) {
bool r;
- struct config cfg;
+ struct config cfg = {
+ .sysinit_needed = true
+ };
struct pl_test *t = _tests + i;
- cfg.use_lvmetad = false;
- cfg.sysinit_needed = true;
-
r = _parse_line(t->input, &cfg);
if (t->success) {
if (!r)
test_fail("_parse_line('%s') failed", t->input);
- if (cfg.use_lvmetad != t->use_lvmetad)
- test_fail("_parse_line('%s') -> use_lvmetad='%s'",
- t->input, _bool(cfg.use_lvmetad));
+ //if (cfg.use_lvmetad != t->use_lvmetad)
+ // test_fail("_parse_line('%s') -> use_lvmetad='%s'",
+ // t->input, _bool(cfg.use_lvmetad));
if (cfg.sysinit_needed != t->sysinit_needed)
test_fail("_parse_line('%s') -> sysinit_needed='%s'",
@@ -207,14 +206,13 @@ static void _test_get_config(void *fixture)
bool r;
unsigned i;
- struct config cfg;
const char *path;
for (i = 0; i < DM_ARRAY_SIZE(_tests); i++) {
struct gc_test *t = _tests + i;
-
- cfg.use_lvmetad = false;
- cfg.sysinit_needed = true;
+ struct config cfg = {
+ .sysinit_needed = true
+ };
path = _fake_lvmconfig(t->output);
if (!path)
@@ -225,9 +223,9 @@ static void _test_get_config(void *fixture)
if (!r)
test_fail("_get_config() <- '%s' failed", t->output);
- if (t->use_lvmetad != cfg.use_lvmetad)
- test_fail("_get_config() <- '%s', use_lvmetad = %s",
- t->output, _bool(cfg.use_lvmetad));
+ //if (t->use_lvmetad != cfg.use_lvmetad)
+ // test_fail("_get_config() <- '%s', use_lvmetad = %s",
+ // t->output, _bool(cfg.use_lvmetad));
if (t->sysinit_needed != cfg.sysinit_needed)
test_fail("_get_config() <- '%s', sysinit = %s",
5 years
master - tests: reduce memory footprint
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e940293c336b22e018a...
Commit: e940293c336b22e018aac96217e5e67b2397dde6
Parent: 7da75f41edf15242f582d200e4e18379dc529db0
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Nov 27 12:15:52 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Nov 29 23:10:09 2018 +0100
tests: reduce memory footprint
---
.../lvconvert-raid-reshape-stripes-load-reload.sh | 30 ++++++++++++--------
1 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/test/shell/lvconvert-raid-reshape-stripes-load-reload.sh b/test/shell/lvconvert-raid-reshape-stripes-load-reload.sh
index f317b7e..61afa88 100644
--- a/test/shell/lvconvert-raid-reshape-stripes-load-reload.sh
+++ b/test/shell/lvconvert-raid-reshape-stripes-load-reload.sh
@@ -17,9 +17,7 @@ SKIP_WITH_LVMPOLLD=1
# Test reshaping under io load
-# FIXME: This test requires 3GB in /dev/shm!
-test $(aux total_mem) -gt $((4096*1024)) || skip
-
+which md5sum || skip
which mkfs.ext4 || skip
aux have_raid 1 13 2 || skip
@@ -31,6 +29,11 @@ cleanup_mounted_and_teardown()
aux teardown
}
+checksum_()
+{
+ md5sum "$1" | cut -f1 -d' '
+}
+
aux prepare_pvs 16 32
get_devs
@@ -40,23 +43,20 @@ vgcreate $SHARED -s 1M "$vg" "${DEVICES[@]}"
trap 'cleanup_mounted_and_teardown' EXIT
# Create 10-way striped raid5 (11 legs total)
-lvcreate --yes --type raid5_ls --stripesize 64K --stripes 10 -L200M -n$lv1 $vg
+lvcreate --yes --type raid5_ls --stripesize 64K --stripes 10 -L64M -n$lv1 $vg
check lv_first_seg_field $vg/$lv1 segtype "raid5_ls"
check lv_first_seg_field $vg/$lv1 stripesize "64.00k"
check lv_first_seg_field $vg/$lv1 data_stripes 10
check lv_first_seg_field $vg/$lv1 stripes 11
echo y|mkfs -t ext4 /dev/$vg/$lv1
-mkdir -p $mount_dir
-mount "$DM_DEV_DIR/$vg/$lv1" $mount_dir
-mkdir -p $mount_dir/1 $mount_dir/2
+mkdir -p "$mount_dir"
+mount "$DM_DEV_DIR/$vg/$lv1" "$mount_dir"
echo 3 >/proc/sys/vm/drop_caches
# FIXME: This is filling up ram disk. Use sane amount of data please! Rate limit the data written!
-cp -r /usr/bin $mount_dir/1 >/dev/null 2>/dev/null &
-cp -r /usr/bin $mount_dir/2 >/dev/null 2>/dev/null &
-# FIXME: should this wait for above two processes and sync then?
-sync &
+dd if=/dev/urandom of="$mount_dir/random" bs=1M count=50 conv=fdatasync
+checksum_ "$mount_dir/random" >MD5
# FIXME: wait_for_sync - is this really testing anything under load?
aux wait_for_sync $vg $lv1
@@ -80,11 +80,17 @@ done
aux delay_dev "$dev2" 0
-kill -9 %%
+kill -9 %% || true
wait
+checksum_ "$mount_dir/random" >MD5_new
+
umount $mount_dir
fsck -fn "$DM_DEV_DIR/$vg/$lv1"
+# Compare checksum is matching
+cat MD5 MD5_new
+diff MD5 MD5_new
+
vgremove -ff $vg
5 years
master - tests: updates
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=7da75f41edf15242f58...
Commit: 7da75f41edf15242f582d200e4e18379dc529db0
Parent: 217d647a468c3111738e61e02e56b6744b788a2f
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Nov 23 20:18:22 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Nov 29 23:10:09 2018 +0100
tests: updates
---
test/shell/dmsecuretest.sh | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/test/shell/dmsecuretest.sh b/test/shell/dmsecuretest.sh
index fca72bf..75ad56d 100644
--- a/test/shell/dmsecuretest.sh
+++ b/test/shell/dmsecuretest.sh
@@ -42,12 +42,11 @@ PID=$!
sleep .5
# crypt device should be loaded
-dmsetup table | tee tbl
-grep "$DMTEST" tbl
+dmsetup status "$DMTEST"
# generate core file for running&sleeping binary
gcore "$PID"
-kill "$PID"
+kill "$PID" || true
wait
cat cmdout
5 years
master - tests: requires at least 2 iterations
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=217d647a468c3111738...
Commit: 217d647a468c3111738e61e02e56b6744b788a2f
Parent: 5f87ba68d409dc8da02aa8d9c58798eb5f2d4477
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Nov 23 20:09:14 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Nov 29 23:10:09 2018 +0100
tests: requires at least 2 iterations
---
test/shell/metadata-full.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/shell/metadata-full.sh b/test/shell/metadata-full.sh
index 67333d8..a1b7d02 100644
--- a/test/shell/metadata-full.sh
+++ b/test/shell/metadata-full.sh
@@ -79,7 +79,7 @@ for i in $(seq 1 "$TEST_DEVS"); do
done
# test we hit 'out-of-metadata-space'
-test "$i" -gt 5
+test "$i" -gt 2
test "$i" -lt "$TEST_DEVS"
# should show 0
5 years
master - tests: use select with dmsetup
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=5f87ba68d409dc8da02...
Commit: 5f87ba68d409dc8da02aa8d9c58798eb5f2d4477
Parent: 74731a5277eb02347902801c4ec5b087deecc580
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Nov 23 20:08:08 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Nov 29 23:10:09 2018 +0100
tests: use select with dmsetup
Use 'dmsetup -S' to greatly simplify such loops.
---
.../lvconvert-raid-takeover-linear_to_raid4.sh | 15 ++-------------
.../lvconvert-raid-takeover-raid4_to_linear.sh | 15 ++-------------
test/shell/lvconvert-raid-takeover.sh | 15 ++-------------
3 files changed, 6 insertions(+), 39 deletions(-)
diff --git a/test/shell/lvconvert-raid-takeover-linear_to_raid4.sh b/test/shell/lvconvert-raid-takeover-linear_to_raid4.sh
index adaf8d3..6b28cad 100644
--- a/test/shell/lvconvert-raid-takeover-linear_to_raid4.sh
+++ b/test/shell/lvconvert-raid-takeover-linear_to_raid4.sh
@@ -23,19 +23,8 @@ aux prepare_vg 4 32
# FIXME: lvconvert leaks 'error' devices
detect_error_leak_()
{
- local err=""
-
- for i in $(dmsetup info -c -o name --noheadings) ; do
- case "$i" in
- "$vg*") (dmsetup table "$i" | grep "error ") && err="$err $i" ;;
- esac
- done
-
- test -z "$err" || {
- dmsetup table | grep $vg
- dmsetup ls --tree
- die "Device(s) $err should not be here."
- }
+ dmsetup table -S "name=~^$vg-" | not grep "error" || \
+ die "Device(s) with error target should not be here."
}
# Create linear LV
diff --git a/test/shell/lvconvert-raid-takeover-raid4_to_linear.sh b/test/shell/lvconvert-raid-takeover-raid4_to_linear.sh
index a581846..6201af4 100644
--- a/test/shell/lvconvert-raid-takeover-raid4_to_linear.sh
+++ b/test/shell/lvconvert-raid-takeover-raid4_to_linear.sh
@@ -23,19 +23,8 @@ aux prepare_vg 4 32
# FIXME: lvconvert leaks 'error' devices
detect_error_leak_()
{
- local err=""
-
- for i in $(dmsetup info -c -o name --noheadings) ; do
- case "$i" in
- "$vg*") (dmsetup table "$i" | grep "error ") && err="$err $i" ;;
- esac
- done
-
- test -z "$err" || {
- dmsetup table | grep $vg
- dmsetup ls --tree
- die "Device(s) $err should not be here."
- }
+ dmsetup table -S "name=~^$vg-" | not grep "error" || \
+ die "Device(s) with error target should not be here."
}
# Create 3-way striped raid4 (4 legs total)
diff --git a/test/shell/lvconvert-raid-takeover.sh b/test/shell/lvconvert-raid-takeover.sh
index d22c11b..b57cbe9 100644
--- a/test/shell/lvconvert-raid-takeover.sh
+++ b/test/shell/lvconvert-raid-takeover.sh
@@ -26,19 +26,8 @@ aux prepare_vg 8
# FIXME: lvconvert leaks 'error' devices
detect_error_leak_()
{
- local err=""
-
- for i in $(dmsetup info -c -o name --noheadings) ; do
- case "$i" in
- "$vg*") (dmsetup table "$i" | grep "error ") && err="$err $i" ;;
- esac
- done
-
- test -z "$err" || {
- dmsetup table | grep $vg
- dmsetup ls --tree
- die "Device(s) $err should not be here."
- }
+ dmsetup table -S "name=~^$vg-" | not grep "error" || \
+ die "Device(s) with error target should not be here."
}
function _lvcreate
5 years