dev-next - tests: update mirror test
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=92ee16f7c0d5d6983b90fe97d31e2884a8e5804d Commit: 92ee16f7c0d5d6983b90fe97d31e2884a8e5804d Parent: 53bad89a7b802890067e1c006775345098cfa4dc Author: Zdenek Kabelac <[email protected]> AuthorDate: Tue Mar 16 21:18:53 2021 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Wed Mar 17 00:59:50 2021 +0100
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(-)
test/shell/mirror-vgreduce-removemissing.sh +3 -8
@@ -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_ }