From 7e59c3aa58d43315af23a137752f1f3d10ab4fd7 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 27 May 2024 18:44:09 +0200 Subject: [PATCH] tests: use single aux lvmconf Reduce log size as lvmconf can process multiple settings at once. --- test/shell/devicesfile-scan-lvs.sh | 7 +++---- test/shell/report-fields.sh | 6 +++--- test/shell/report-headings.sh | 6 +++--- test/shell/snapshot-usage.sh | 4 ++-- test/shell/udev-pvscan-vgchange.sh | 20 ++++++++++---------- 5 files changed, 21 insertions(+), 22 deletions(-) diff --git a/test/shell/devicesfile-scan-lvs.sh b/test/shell/devicesfile-scan-lvs.sh index 17de35b68..0fbfe9a1d 100644 --- a/test/shell/devicesfile-scan-lvs.sh +++ b/test/shell/devicesfile-scan-lvs.sh @@ -1,4 +1,4 @@ - +#!/usr/bin/env bash # Copyright (C) 2020 Red Hat, Inc. All rights reserved. # @@ -24,8 +24,8 @@ DFDIR="$LVM_SYSTEM_DIR/devices" mkdir -p "$DFDIR" || true DF="$DFDIR/system.devices" -aux lvmconf 'devices/use_devicesfile = 1' -aux lvmconf 'devices/scan_lvs = 1' +aux lvmconf 'devices/use_devicesfile = 1' \ + 'devices/scan_lvs = 1' rm -f "$DF" touch "$DF" @@ -59,4 +59,3 @@ not grep "IDTYPE=lvmlv_uuid" "$DF" not grep "IDNAME=LVM-" "$DF" vgremove -y $vg1 - diff --git a/test/shell/report-fields.sh b/test/shell/report-fields.sh index eb81afc98..aaed2dc51 100644 --- a/test/shell/report-fields.sh +++ b/test/shell/report-fields.sh @@ -21,9 +21,9 @@ aux prepare_pvs 1 OPTS="--nameprefixes --noheadings --rows" -aux lvmconf 'report/pvs_cols="pv_name,pv_size"' -aux lvmconf 'report/compact_output=0' -aux lvmconf 'report/compact_output_cols=""' +aux lvmconf 'report/pvs_cols="pv_name,pv_size"' \ + 'report/compact_output=0' \ + 'report/compact_output_cols=""' pvs $OPTS > out grep LVM2_PV_NAME out diff --git a/test/shell/report-headings.sh b/test/shell/report-headings.sh index 4a817f116..2f2b2a67c 100644 --- a/test/shell/report-headings.sh +++ b/test/shell/report-headings.sh @@ -17,9 +17,9 @@ SKIP_WITH_LVMPOLLD=1 aux prepare_pvs 1 -aux lvmconf 'log/prefix=""' -aux lvmconf 'report/compact_output=0' -aux lvmconf 'report/compact_output_cols=""' +aux lvmconf 'log/prefix=""' \ + 'report/compact_output=0' \ + 'report/compact_output_cols=""' OPTS="ba_start,seg_start,seg_start_pe" diff --git a/test/shell/snapshot-usage.sh b/test/shell/snapshot-usage.sh index 0f14dd6e0..d35c55712 100644 --- a/test/shell/snapshot-usage.sh +++ b/test/shell/snapshot-usage.sh @@ -78,8 +78,8 @@ lvcreate --type snapshot -s -l 100%FREE -n $lv $vg --virtualsize $TSIZE aux extend_filter_LVMTEST aux extend_devices "$DM_DEV_DIR/$vg/$lv" -aux lvmconf "devices/scan_lvs = 1" -aux lvmconf "activation/snapshot_autoextend_percent = 20" \ +aux lvmconf "devices/scan_lvs = 1" \ + "activation/snapshot_autoextend_percent = 20" \ "activation/snapshot_autoextend_threshold = 50" # Check usability with smallest (1k) extent size ($lv has 15P) diff --git a/test/shell/udev-pvscan-vgchange.sh b/test/shell/udev-pvscan-vgchange.sh index 93d7d81d6..ec28d8215 100644 --- a/test/shell/udev-pvscan-vgchange.sh +++ b/test/shell/udev-pvscan-vgchange.sh @@ -63,8 +63,8 @@ _clear_online_files aux prepare_real_devs -aux lvmconf 'devices/dir = "/dev"' -aux lvmconf 'devices/use_devicesfile = 1' +aux lvmconf 'devices/dir = "/dev"' \ + 'devices/use_devicesfile = 1' DFDIR="$LVM_SYSTEM_DIR/devices" DF="$DFDIR/system.devices" mkdir "$DFDIR" || true @@ -442,8 +442,8 @@ ls "/dev/disk/by-id/lvm-pv-uuid-$OPVID1" vgchange -an $vg10 _clear_online_files -aux lvmconf "devices/filter = [ \"a|/dev/disk/by-id/lvm-pv-uuid-$OPVID1|\", \"r|.*|\" ]" -aux lvmconf 'devices/global_filter = [ "a|.*|" ]' +aux lvmconf "devices/filter = [ \"a|/dev/disk/by-id/lvm-pv-uuid-$OPVID1|\", \"r|.*|\" ]" \ + 'devices/global_filter = [ "a|.*|" ]' pvscan --cache -aay "$dev1" @@ -452,8 +452,8 @@ check lv_field $vg10/$lv1 lv_active "active" vgchange -an $vg10 _clear_online_files -aux lvmconf 'devices/filter = [ "a|lvm-pv-uuid|", "r|.*|" ]' -aux lvmconf 'devices/global_filter = [ "a|.*|" ]' +aux lvmconf 'devices/filter = [ "a|lvm-pv-uuid|", "r|.*|" ]' \ + 'devices/global_filter = [ "a|.*|" ]' pvscan --cache -aay "$dev1" @@ -463,8 +463,8 @@ vgchange -an $vg10 vgremove -y $vg10 wipe_all -aux lvmconf 'devices/filter = [ "a|.*|" ]' -aux lvmconf 'devices/global_filter = [ "a|.*|" ]' +aux lvmconf 'devices/filter = [ "a|.*|" ]' \ + 'devices/global_filter = [ "a|.*|" ]' # # system.devices contains different product_uuid and incorrect device IDs @@ -472,8 +472,8 @@ aux lvmconf 'devices/global_filter = [ "a|.*|" ]' SYS_DIR="$PWD/test/sys" -aux lvmconf "devices/use_devicesfile = 1" \ - "devices/device_id_sysfs_dir = \"$SYS_DIR/\"" +aux lvmconf 'devices/use_devicesfile = 1' \ + 'devices/device_id_sysfs_dir = \"$SYS_DIR/\"' WWID1="naa.111" WWID2="naa.222"