summaryrefslogtreecommitdiff
path: root/test/shell/lvcreate-repair.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/shell/lvcreate-repair.sh')
-rw-r--r--test/shell/lvcreate-repair.sh19
1 files changed, 12 insertions, 7 deletions
diff --git a/test/shell/lvcreate-repair.sh b/test/shell/lvcreate-repair.sh
index 8971536..07263a3 100644
--- a/test/shell/lvcreate-repair.sh
+++ b/test/shell/lvcreate-repair.sh
@@ -1,4 +1,5 @@
-#!/bin/sh
+#!/usr/bin/env bash
+
# Copyright (C) 2011-2012 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing to use,
@@ -7,9 +8,11 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+SKIP_WITH_LVMPOLLD=1
-. lib/test
+. lib/inittest
aux prepare_vg 3
@@ -19,7 +22,7 @@ for i in "$dev1" "$dev2" "$dev3" ; do
if test "$i" = "$j" ; then continue ; fi
vgremove -ff $vg
- vgcreate $vg "$dev1" "$dev2" "$dev3"
+ vgcreate $SHARED $vg "$dev1" "$dev2" "$dev3"
# exit 1
lvcreate -l1 -n $lv1 $vg "$dev1"
@@ -29,7 +32,7 @@ for i in "$dev1" "$dev2" "$dev3" ; do
vgreduce --removemissing --force $vg
# check if reduced device was removed
- test "$i" = "$dev1" && dm_table | not egrep "$vg-$lv1: *[^ ]+"
+ test "$i" = "$dev1" && dm_table | not grep -E "$vg-$lv1: *[^ ]+"
lvcreate -l1 -n $lv2 $vg
@@ -45,7 +48,7 @@ for i in "$dev1" "$dev2" "$dev3" ; do
done
vgremove -ff $vg
-vgcreate $vg "$dev1" "$dev2" "$dev3"
+vgcreate $SHARED $vg "$dev1" "$dev2" "$dev3"
# use tricky 'dd'
for i in "$dev1" "$dev2" "$dev3" ; do
@@ -85,7 +88,6 @@ dd if=backup_i of="$dev1" bs=256K count=1
# dirty game
dd if=/dev/zero of="$dev3" bs=256K count=1
-aux notify_lvmetad "$dev3" # udev be watching you
vgreduce --removemissing --force $vg
@@ -97,3 +99,6 @@ vgreduce --removemissing --force $vg
# Failed to activate new LV.
should lvcreate -l1 $vg "$dev1"
+should not dmsetup remove ${vg}-lvol0
+
+vgremove -ff $vg