Fix for tests using get_metadata_size()

Since OCF has changed how metadata size is reported (OCF PR #744),
get_metadata_size() became get_metadata_size_on_device() and tests
using it are changed accordingly.

OCF version with required changes included in this commit

Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
This commit is contained in:
Krzysztof Majzerowicz-Jaszcz
2022-07-06 15:55:12 +02:00
parent ede99f4db4
commit fce070cace
5 changed files with 12 additions and 25 deletions

View File

@@ -404,13 +404,12 @@ def test_activate_neg_cache_line_size():
with TestRun.step("Create dump file with cache metadata"):
with TestRun.step("Get metadata size"):
dmesg_out = TestRun.executor.run_expect_success("dmesg").stdout
md_size = dmesg.get_metadata_size(dmesg_out)
md_size = dmesg.get_metadata_size_on_device(dmesg_out)
with TestRun.step("Dump the metadata of the cache"):
dump_file_path = "/tmp/test_activate_corrupted.dump"
md_dump = File(dump_file_path)
md_dump.remove(force=True, ignore_errors=True)
dd_count = int(md_size / Size(1, Unit.MebiByte)) + 1
(
Dd().input(active_cache_dev.path)