mrc0mmand / rpms / lvm2

Forked from rpms/lvm2 3 years ago
Clone

Blame SOURCES/lvm2-2_03_06-tests-allow-mixed-block-sizes.patch

26e710
 test/shell/allow-mixed-block-sizes.sh | 44 +++++++++++++++++++++++++++++++++++
26e710
 1 file changed, 44 insertions(+)
26e710
 create mode 100644 test/shell/allow-mixed-block-sizes.sh
26e710
26e710
diff --git a/test/shell/allow-mixed-block-sizes.sh b/test/shell/allow-mixed-block-sizes.sh
26e710
new file mode 100644
26e710
index 0000000..1803256
26e710
--- /dev/null
26e710
+++ b/test/shell/allow-mixed-block-sizes.sh
26e710
@@ -0,0 +1,44 @@
26e710
+#!/usr/bin/env bash
26e710
+
26e710
+# Copyright (C) 2019 Red Hat, Inc. All rights reserved.
26e710
+#
26e710
+# This copyrighted material is made available to anyone wishing to use,
26e710
+# modify, copy, or redistribute it subject to the terms and conditions
26e710
+# of the GNU General Public License v.2.
26e710
+#
26e710
+# You should have received a copy of the GNU General Public License
26e710
+# along with this program; if not, write to the Free Software Foundation,
26e710
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
26e710
+
26e710
+SKIP_WITH_LVMPOLLD=1
26e710
+
26e710
+. lib/inittest
26e710
+
26e710
+dd if=/dev/zero of=loopa bs=$((1024*1024)) count=2 2> /dev/null
26e710
+dd if=/dev/zero of=loopb bs=$((1024*1024)) count=2 2> /dev/null
26e710
+LOOP1=$(losetup -f loopa --sector-size 4096 --show)
26e710
+LOOP2=$(losetup -f loopb --show)
26e710
+
26e710
+echo $LOOP1
26e710
+echo $LOOP2
26e710
+
26e710
+aux extend_filter "a|$LOOP1|"
26e710
+aux extend_filter "a|$LOOP2|"
26e710
+
26e710
+not vgcreate --config 'devices {allow_mixed_block_sizes=0 scan="/dev"}' $vg $LOOP1 $LOOP2
26e710
+vgcreate --config 'devices {allow_mixed_block_sizes=1 scan="/dev"}' $vg $LOOP1 $LOOP2
26e710
+vgs --config 'devices {allow_mixed_block_sizes=1 scan="/dev"}' $vg
26e710
+
26e710
+wipefs -a $LOOP1
26e710
+wipefs -a $LOOP2
26e710
+
26e710
+vgcreate --config 'devices {allow_mixed_block_sizes=1 scan="/dev"}' $vg $LOOP1
26e710
+vgs --config 'devices {allow_mixed_block_sizes=1 scan="/dev"}' $vg
26e710
+not vgextend --config 'devices {allow_mixed_block_sizes=0 scan="/dev"}' $vg $LOOP2
26e710
+vgextend --config 'devices {allow_mixed_block_sizes=1 scan="/dev"}' $vg $LOOP2
26e710
+
26e710
+losetup -d $LOOP1
26e710
+losetup -d $LOOP2
26e710
+rm loopa
26e710
+rm loopb
26e710
+