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:
parent
d456674c9a
commit
f2f98226d8
@ -83,10 +83,10 @@ def test_flush_over_640_gibibytes_with_fs(cache_mode, fs):
|
|||||||
fio.run()
|
fio.run()
|
||||||
test_file_main.refresh_item()
|
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:
|
if test_file_main.size != file_size:
|
||||||
TestRun.fail("Created test file hasn't reached its target 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."):
|
with TestRun.step("Write data to exported object."):
|
||||||
test_file_copy = test_file_main.copy(mnt_point + "test_file_copy")
|
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:
|
if output.exit_code != 0:
|
||||||
TestRun.fail(f"Stopping cache with flush failed!\n{output.stderr}")
|
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)
|
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.")
|
TestRun.LOGGER.error("Md5 sums should be equal.")
|
||||||
|
|
||||||
with TestRun.step("Delete test files."):
|
with TestRun.step("Delete test files."):
|
||||||
|
Loading…
Reference in New Issue
Block a user