Update TF and functional tests API

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Slawomir Jankowski
2020-12-07 16:52:36 +01:00
committed by Robert Baldyga
parent ecbd4fbe30
commit 17f440de10
56 changed files with 209 additions and 210 deletions

View File

@@ -88,8 +88,8 @@ def test_recovery_all_options(cache_mode, cache_line_size, cleaning_policy, file
core.unmount()
TestRun.LOGGER.info(f"Number of dirty blocks in cache: {cache.get_dirty_blocks()}")
power_cycle_dut()
cache_device.system_path = cache_device_link.get_target()
core_device.system_path = core_device_link.get_target()
cache_device.path = cache_device_link.get_target()
core_device.path = core_device_link.get_target()
with TestRun.step("Try to start cache without load and force option."):
try:

View File

@@ -56,12 +56,12 @@ def test_recovery_flush_reset_raw(cache_mode):
cache.set_seq_cutoff_policy(SeqCutOffPolicy.never)
with TestRun.step("Copy file to CAS."):
copy_file(source=source_file.full_path, target=core.system_path, size=test_file_size,
copy_file(source=source_file.full_path, target=core.path, size=test_file_size,
direct="oflag")
with TestRun.step("Sync and flush buffers."):
os_utils.sync()
output = TestRun.executor.run(f"hdparm -f {core.system_path}")
output = TestRun.executor.run(f"hdparm -f {core.path}")
if output.exit_code != 0:
raise CmdException("Error during hdparm", output)
@@ -70,8 +70,8 @@ def test_recovery_flush_reset_raw(cache_mode):
with TestRun.step("Hard reset DUT during data flushing."):
power_cycle_dut(wait_for_flush_begin=True, core_device=core_device)
cache_device.system_path = cache_device_link.get_target()
core_device.system_path = core_device_link.get_target()
cache_device.path = cache_device_link.get_target()
core_device.path = core_device_link.get_target()
with TestRun.step("Copy file from core and check if current md5sum is different than "
"before restart."):
@@ -155,8 +155,8 @@ def test_recovery_flush_reset_fs(cache_mode, fs):
with TestRun.step("Hard reset DUT during data flushing."):
power_cycle_dut(True, core_device)
cache_device.system_path = cache_device_link.get_target()
core_device.system_path = core_device_link.get_target()
cache_device.path = cache_device_link.get_target()
core_device.path = core_device_link.get_target()
with TestRun.step("Load cache."):
cache = casadm.load_cache(cache_device)

View File

@@ -131,7 +131,7 @@ def test_recovery_unplug_cache_raw(cache_mode, cls):
core = cache.add_core(core_device)
with TestRun.step("Copy file to CAS."):
copy_file(source=source_file.full_path, target=core.system_path,
copy_file(source=source_file.full_path, target=core.path,
size=test_file_size, direct="oflag")
TestRun.LOGGER.info(str(core.get_statistics()))
@@ -156,7 +156,7 @@ def test_recovery_unplug_cache_raw(cache_mode, cls):
cache.stop()
with TestRun.step("Copy file from core device and check md5sum."):
copy_file(source=core_device.system_path, target=target_file.full_path,
copy_file(source=core_device.path, target=target_file.full_path,
size=test_file_size, direct="iflag")
compare_files(source_file, target_file)