mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
tests: fixed cache target reacts faster
After kernel fixed in 4.6 cache target reacts promptly and switches to Fail-ed state when disk error is detected. Handle both cases in test...
This commit is contained in:
parent
bc5376b151
commit
c577984630
@ -101,13 +101,15 @@ sync
|
||||
# Seriously damage cache metadata
|
||||
aux error_dev "$dev1" 2054:2
|
||||
|
||||
# Here we usually for the 1st. notice needs_check
|
||||
check lv_attr_bit state $vg/$lv1 "c"
|
||||
|
||||
sleep .1
|
||||
|
||||
# And now cache is finaly Failed
|
||||
check lv_attr_bit health $vg/$lv1 "F"
|
||||
# On fixed kernel we get instant Fail here
|
||||
get lv_field $vg/$lv1 lv_attr | tee out
|
||||
grep "Cwi-a-C-F-" out || {
|
||||
# while on older unfixed we just notice needs_check
|
||||
grep "Cwi-c-C---" out
|
||||
sleep .1
|
||||
# And now cache is finaly Failed
|
||||
check lv_attr_bit health $vg/$lv1 "F"
|
||||
}
|
||||
check lv_field $vg/$lv1 lv_health_status "failed"
|
||||
|
||||
aux disable_dev "$dev1"
|
||||
|
Loading…
Reference in New Issue
Block a user