tests: Fix test_flush_over_640_gibibytes_with_fs

As crc32 is supposed to be slightly faster than md5 use it to detect DC

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
This commit is contained in:
Michal Mielewczyk 2024-10-03 08:45:02 +02:00
parent d456674c9a
commit f2f98226d8

View File

@ -83,10 +83,10 @@ def test_flush_over_640_gibibytes_with_fs(cache_mode, fs):
fio.run()
test_file_main.refresh_item()
with TestRun.step("Validate test file and read its md5 sum."):
with TestRun.step("Validate test file and read its crc32 sum."):
if test_file_main.size != file_size:
TestRun.fail("Created test file hasn't reached its target size.")
test_file_md5sum_main = test_file_main.md5sum()
test_file_crc32sum_main = test_file_main.crc32sum()
with TestRun.step("Write data to exported object."):
test_file_copy = test_file_main.copy(mnt_point + "test_file_copy")
@ -105,9 +105,9 @@ def test_flush_over_640_gibibytes_with_fs(cache_mode, fs):
if output.exit_code != 0:
TestRun.fail(f"Stopping cache with flush failed!\n{output.stderr}")
with TestRun.step("Mount core device and check md5 sum of test file copy."):
with TestRun.step("Mount core device and check crc32 sum of test file copy."):
core_dev.mount(mnt_point)
if test_file_md5sum_main != test_file_copy.md5sum():
if test_file_crc32sum_main != test_file_copy.crc32sum():
TestRun.LOGGER.error("Md5 sums should be equal.")
with TestRun.step("Delete test files."):