master - test: add checks for not 100% sync ratio after initiation of check/repair
by Heinz Mauelshagen
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c4aba47dd0ce47f9f72...
Commit: c4aba47dd0ce47f9f72ae4bd05be03e264a91ca2
Parent: 7368cf8e7df0218d61c9538fee68d0da634b5571
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Wed Oct 2 14:48:53 2019 +0200
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Wed Oct 2 15:25:30 2019 +0200
test: add checks for not 100% sync ratio after initiation of check/repair
Related: rhbz1640630
---
test/shell/lvchange-raid.sh | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/test/shell/lvchange-raid.sh b/test/shell/lvchange-raid.sh
index 1972a68..3a9ed60 100644
--- a/test/shell/lvchange-raid.sh
+++ b/test/shell/lvchange-raid.sh
@@ -139,6 +139,7 @@ run_writemostly_check() {
check lv_attr_bit health $vg/${lv}_rimage_1 "-"
}
+
# run_syncaction_check <VG> <LV>
run_syncaction_check() {
local device
@@ -183,17 +184,20 @@ run_syncaction_check() {
# "check" should find discrepancies but not change them
# 'lvs' should show results
lvchange --syncaction check $vg/$lv
+ not lv_field $vg/$lv sync_percent "100.00"
aux wait_for_sync $vg $lv
check lv_attr_bit health $vg/$lv "m"
not check lv_field $vg/$lv raid_mismatch_count "0"
# "repair" will fix discrepancies
lvchange --syncaction repair $vg/$lv
+ not lv_field $vg/$lv sync_percent "100.00"
aux wait_for_sync $vg $lv
# Final "check" should show no mismatches
# 'lvs' should show results
lvchange --syncaction check $vg/$lv
+ not lv_field $vg/$lv sync_percent "100.00"
aux wait_for_sync $vg $lv
check lv_attr_bit health $vg/$lv "-"
check lv_field $vg/$lv raid_mismatch_count "0"
4 years, 6 months