1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

tests: use single aux lvmconf

Reduce log size as lvmconf can process multiple settings at once.
This commit is contained in:
Zdenek Kabelac 2024-05-27 18:44:09 +02:00
parent 9207bae33b
commit 7e59c3aa58
5 changed files with 21 additions and 22 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
# Copyright (C) 2020 Red Hat, Inc. All rights reserved. # Copyright (C) 2020 Red Hat, Inc. All rights reserved.
# #
@ -24,8 +24,8 @@ DFDIR="$LVM_SYSTEM_DIR/devices"
mkdir -p "$DFDIR" || true mkdir -p "$DFDIR" || true
DF="$DFDIR/system.devices" DF="$DFDIR/system.devices"
aux lvmconf 'devices/use_devicesfile = 1' aux lvmconf 'devices/use_devicesfile = 1' \
aux lvmconf 'devices/scan_lvs = 1' 'devices/scan_lvs = 1'
rm -f "$DF" rm -f "$DF"
touch "$DF" touch "$DF"
@ -59,4 +59,3 @@ not grep "IDTYPE=lvmlv_uuid" "$DF"
not grep "IDNAME=LVM-" "$DF" not grep "IDNAME=LVM-" "$DF"
vgremove -y $vg1 vgremove -y $vg1

View File

@ -21,9 +21,9 @@ aux prepare_pvs 1
OPTS="--nameprefixes --noheadings --rows" OPTS="--nameprefixes --noheadings --rows"
aux lvmconf 'report/pvs_cols="pv_name,pv_size"' aux lvmconf 'report/pvs_cols="pv_name,pv_size"' \
aux lvmconf 'report/compact_output=0' 'report/compact_output=0' \
aux lvmconf 'report/compact_output_cols=""' 'report/compact_output_cols=""'
pvs $OPTS > out pvs $OPTS > out
grep LVM2_PV_NAME out grep LVM2_PV_NAME out

View File

@ -17,9 +17,9 @@ SKIP_WITH_LVMPOLLD=1
aux prepare_pvs 1 aux prepare_pvs 1
aux lvmconf 'log/prefix=""' aux lvmconf 'log/prefix=""' \
aux lvmconf 'report/compact_output=0' 'report/compact_output=0' \
aux lvmconf 'report/compact_output_cols=""' 'report/compact_output_cols=""'
OPTS="ba_start,seg_start,seg_start_pe" OPTS="ba_start,seg_start,seg_start_pe"

View File

@ -78,8 +78,8 @@ lvcreate --type snapshot -s -l 100%FREE -n $lv $vg --virtualsize $TSIZE
aux extend_filter_LVMTEST aux extend_filter_LVMTEST
aux extend_devices "$DM_DEV_DIR/$vg/$lv" aux extend_devices "$DM_DEV_DIR/$vg/$lv"
aux lvmconf "devices/scan_lvs = 1" aux lvmconf "devices/scan_lvs = 1" \
aux lvmconf "activation/snapshot_autoextend_percent = 20" \ "activation/snapshot_autoextend_percent = 20" \
"activation/snapshot_autoextend_threshold = 50" "activation/snapshot_autoextend_threshold = 50"
# Check usability with smallest (1k) extent size ($lv has 15P) # Check usability with smallest (1k) extent size ($lv has 15P)

View File

@ -63,8 +63,8 @@ _clear_online_files
aux prepare_real_devs aux prepare_real_devs
aux lvmconf 'devices/dir = "/dev"' aux lvmconf 'devices/dir = "/dev"' \
aux lvmconf 'devices/use_devicesfile = 1' 'devices/use_devicesfile = 1'
DFDIR="$LVM_SYSTEM_DIR/devices" DFDIR="$LVM_SYSTEM_DIR/devices"
DF="$DFDIR/system.devices" DF="$DFDIR/system.devices"
mkdir "$DFDIR" || true mkdir "$DFDIR" || true
@ -442,8 +442,8 @@ ls "/dev/disk/by-id/lvm-pv-uuid-$OPVID1"
vgchange -an $vg10 vgchange -an $vg10
_clear_online_files _clear_online_files
aux lvmconf "devices/filter = [ \"a|/dev/disk/by-id/lvm-pv-uuid-$OPVID1|\", \"r|.*|\" ]" aux lvmconf "devices/filter = [ \"a|/dev/disk/by-id/lvm-pv-uuid-$OPVID1|\", \"r|.*|\" ]" \
aux lvmconf 'devices/global_filter = [ "a|.*|" ]' 'devices/global_filter = [ "a|.*|" ]'
pvscan --cache -aay "$dev1" pvscan --cache -aay "$dev1"
@ -452,8 +452,8 @@ check lv_field $vg10/$lv1 lv_active "active"
vgchange -an $vg10 vgchange -an $vg10
_clear_online_files _clear_online_files
aux lvmconf 'devices/filter = [ "a|lvm-pv-uuid|", "r|.*|" ]' aux lvmconf 'devices/filter = [ "a|lvm-pv-uuid|", "r|.*|" ]' \
aux lvmconf 'devices/global_filter = [ "a|.*|" ]' 'devices/global_filter = [ "a|.*|" ]'
pvscan --cache -aay "$dev1" pvscan --cache -aay "$dev1"
@ -463,8 +463,8 @@ vgchange -an $vg10
vgremove -y $vg10 vgremove -y $vg10
wipe_all wipe_all
aux lvmconf 'devices/filter = [ "a|.*|" ]' aux lvmconf 'devices/filter = [ "a|.*|" ]' \
aux lvmconf 'devices/global_filter = [ "a|.*|" ]' 'devices/global_filter = [ "a|.*|" ]'
# #
# system.devices contains different product_uuid and incorrect device IDs # 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" SYS_DIR="$PWD/test/sys"
aux lvmconf "devices/use_devicesfile = 1" \ aux lvmconf 'devices/use_devicesfile = 1' \
"devices/device_id_sysfs_dir = \"$SYS_DIR/\"" 'devices/device_id_sysfs_dir = \"$SYS_DIR/\"'
WWID1="naa.111" WWID1="naa.111"
WWID2="naa.222" WWID2="naa.222"