lvm2/SOURCES/0072-tests-update-for-wrapper.patch

85 lines
3.0 KiB
Diff

From 64a78a2904c0481de8c1f9894cedcbd5f6525287 Mon Sep 17 00:00:00 2001
From: Zdenek Kabelac <zkabelac@redhat.com>
Date: Tue, 7 Jun 2022 16:52:30 +0200
Subject: [PATCH 072/115] tests: update for wrapper
Update calling vdo manager since our vdo wrapper has a simple shell
arg parser so it needs args without '='
Also correct using DM_DEV_DIR for 'pvcreate'
(cherry picked from commit 4a498512077b4fe5cf6b806a91228bd23e513123)
---
test/shell/vdo-convert.sh | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/test/shell/vdo-convert.sh b/test/shell/vdo-convert.sh
index 2a2026c2e..8b03344a7 100644
--- a/test/shell/vdo-convert.sh
+++ b/test/shell/vdo-convert.sh
@@ -54,7 +54,7 @@ vgcreate $vg "$dev1"
lvcreate -L5G -n $lv1 $vg
-vdo create $VDOCONF --name "$VDONAME" --device="$DM_DEV_DIR/$vg/$lv1" --vdoLogicalSize=10G
+vdo create $VDOCONF --name "$VDONAME" --device "$DM_DEV_DIR/$vg/$lv1" --vdoSlabSize 128M --vdoLogicalSize 10G
mkfs -E nodiscard "$DM_DEV_DIR/mapper/$VDONAME"
@@ -75,7 +75,7 @@ lvremove -f $vg
# Test user can specify different VDO LV name (so the original LV is renamed)
lvcreate -y -L5G -n $lv1 $vg
-vdo create $VDOCONF --name "$VDONAME" --device="$DM_DEV_DIR/$vg/$lv1" --vdoLogicalSize=10G
+vdo create $VDOCONF --name "$VDONAME" --device "$DM_DEV_DIR/$vg/$lv1" --vdoSlabSize 128M --vdoLogicalSize 10G
lvm_import_vdo -y --name $vg/$lv2 "$DM_DEV_DIR/$vg/$lv1"
@@ -95,7 +95,7 @@ vgcreate $vg2 "$dev2"
#
# Check conversion of VDO volume on non-LV device and with >2T size
#
-vdo create $VDOCONF --name "$VDONAME" --device="$dev1" --vdoLogicalSize=3T
+vdo create $VDOCONF --name "$VDONAME" --device "$dev1" --vdoSlabSize 128M --vdoLogicalSize 3T
# Fail with an already existing volume group $vg2
not lvm_import_vdo --dry-run -y -v --name $vg2/$lv1 "$dev1" |& tee err
@@ -117,7 +117,7 @@ vgremove -f $vg
aux teardown_devs
aux prepare_devs 1 23456
-vdo create $VDOCONF --name "$VDONAME" --device="$dev1" --vdoLogicalSize=23G
+vdo create $VDOCONF --name "$VDONAME" --device "$dev1" --vdoSlabSize 128M --vdoLogicalSize 23G
mkfs -E nodiscard "$DM_DEV_DIR/mapper/$VDONAME"
@@ -137,6 +137,7 @@ aux prepare_loop 60000 || skip
test -f LOOP
LOOP=$(< LOOP)
+LOOP="${DM_DEV_DIR}/${LOOP##/dev/}"
aux extend_filter "a|$LOOP|"
aux extend_devices "$LOOP"
@@ -155,7 +156,7 @@ aux extend_devices "$LOOP"
#
# automate...
#
-vdo create $VDOCONF --name "$VDONAME" --device="$LOOP" --vdoLogicalSize=23G \
+vdo create $VDOCONF --name "$VDONAME" --device "$LOOP" --vdoSlabSize 128M --vdoLogicalSize 23G\
--blockMapCacheSize 192 \
--blockMapPeriod 2048 \
--emulate512 disabled \
@@ -173,7 +174,7 @@ vdo create $VDOCONF --name "$VDONAME" --device="$LOOP" --vdoLogicalSize=23G \
# Get VDO table line
dmsetup table "$VDONAME" | tr " " "\n" | sed -e '5,6d' -e '12d' | tee vdo-orig
-DM_DEV_DIR="" lvm_import_vdo -y --name $vg/$lv "$LOOP"
+lvm_import_vdo -y --name $vg/$lv "$LOOP"
lvs -a $vg
dmsetup table "$vg-${lv}_vpool-vpool" | tr " " "\n" | sed -e '5,6d' -e '12d' | tee new-vdo-lv
--
2.41.0