From 92ee16f7c0d5d6983b90fe97d31e2884a8e5804d Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Tue, 16 Mar 2021 21:18:53 +0100 Subject: [PATCH] tests: update mirror test Log results of uniq. Remove few unneeded lvs calls. --- test/shell/mirror-vgreduce-removemissing.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/test/shell/mirror-vgreduce-removemissing.sh b/test/shell/mirror-vgreduce-removemissing.sh index f2f7c1973..ff7eea51f 100644 --- a/test/shell/mirror-vgreduce-removemissing.sh +++ b/test/shell/mirror-vgreduce-removemissing.sh @@ -44,7 +44,7 @@ mimages_are_on_ () local i echo "Check if mirror images of $lv are on PVs" "${list_pvs[@]}" - printf "%s\n" "${list_pvs[@]}" | sort | uniq > out1 + printf "%s\n" "${list_pvs[@]}" | sort | uniq | tee out1 get lv_field_lv_ "$vg" lv_name -a | grep "${lv}_mimage_" | tee lvs_log test -s lvs_log || return 1 @@ -53,14 +53,9 @@ mimages_are_on_ () mimages+=( "$i" ) done < lvs_log - for i in "${mimages[@]}"; do - echo "Checking $vg/$i" - lvs -a -o+devices "$vg/$i" - done - for i in "${mimages[@]}"; do get lv_devices "$vg/$i" - done | sort | uniq > out2 + done | sort | uniq | tee out2 diff --ignore-blank-lines out1 out2 } @@ -116,7 +111,7 @@ prepare_lvs_() check_and_cleanup_lvs_() { - lvs -a -o+devices $vg + lvs -a -o+lv_uuid,devices $vg prepare_lvs_ }