pyocf: Move core/cache md5() logic to volume

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
Adam Rutkowski
2022-03-23 10:45:01 +01:00
parent 16c85c1560
commit 0e8d02235a
6 changed files with 44 additions and 43 deletions

View File

@@ -201,7 +201,7 @@ def test_stop(pyocf_ctx, mode: CacheMode, cls: CacheLineSize, with_flush: bool):
assert int(stats["conf"]["dirty"]) == (cls_no if mode.lazy_write() else 0),\
"Dirty data before MD5"
md5_exported_core = core.exp_obj_md5()
md5_exported_core = front_vol.md5()
if with_flush:
cache.flush()
@@ -554,13 +554,13 @@ def check_stats_read_after_write(core, mode, cls, write_to_empty=False):
def check_md5_sums(core: Core, mode: CacheMode):
if mode.lazy_write():
assert core.device.md5() != core.exp_obj_md5(), \
assert core.device.md5() != core.get_front_volume().md5(), \
"MD5 check: core device vs exported object without flush"
core.cache.flush()
assert core.device.md5() == core.exp_obj_md5(), \
assert core.device.md5() == core.get_front_volume().md5(), \
"MD5 check: core device vs exported object after flush"
else:
assert core.device.md5() == core.exp_obj_md5(), \
assert core.device.md5() == core.get_front_volume().md5(), \
"MD5 check: core device vs exported object"