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:

committed by
Robert Baldyga

parent
ecbd4fbe30
commit
17f440de10
@@ -72,7 +72,7 @@ def test_acp_functional(cache_mode):
|
||||
.direct()
|
||||
.size(chunk_size)
|
||||
.block_size(Size(1, Unit.Blocks4096))
|
||||
.target(f"{core.system_path}"))
|
||||
.target(f"{core.path}"))
|
||||
for chunk in chunk_list:
|
||||
fio.add_job().offset(chunk.offset).io_size(chunk.writes_size)
|
||||
fio.run()
|
||||
|
@@ -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:
|
||||
|
@@ -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)
|
||||
|
@@ -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)
|
||||
|
||||
|
@@ -170,4 +170,4 @@ def test_flush_over_640_gibibytes_raw_device(cache_mode):
|
||||
|
||||
def check_disk_size(device: Device):
|
||||
if device.size < required_disk_size:
|
||||
pytest.skip(f"Not enough space on device {device.system_path}.")
|
||||
pytest.skip(f"Not enough space on device {device.path}.")
|
||||
|
@@ -60,7 +60,7 @@ def test_clean_stop_cache(cache_mode):
|
||||
|
||||
with TestRun.step("Write data to the exported object."):
|
||||
test_file_main = create_random_test_file("/tmp/test_file_main", Size(64, Unit.MebiByte))
|
||||
dd = Dd().output(core.system_path) \
|
||||
dd = Dd().output(core.path) \
|
||||
.input(test_file_main.full_path) \
|
||||
.block_size(bs) \
|
||||
.count(int(test_file_main.size / bs)) \
|
||||
@@ -85,7 +85,7 @@ def test_clean_stop_cache(cache_mode):
|
||||
with TestRun.step("Read data from the exported object."):
|
||||
test_file_1 = File.create_file("/tmp/test_file_1")
|
||||
dd = Dd().output(test_file_1.full_path) \
|
||||
.input(core.system_path) \
|
||||
.input(core.path) \
|
||||
.block_size(bs) \
|
||||
.count(int(test_file_main.size / bs)) \
|
||||
.oflag("direct")
|
||||
@@ -100,7 +100,7 @@ def test_clean_stop_cache(cache_mode):
|
||||
with TestRun.step("Read data from the core device."):
|
||||
test_file_2 = File.create_file("/tmp/test_file_2")
|
||||
dd = Dd().output(test_file_2.full_path) \
|
||||
.input(core_part.system_path) \
|
||||
.input(core_part.path) \
|
||||
.block_size(bs) \
|
||||
.count(int(test_file_main.size / bs)) \
|
||||
.oflag("direct")
|
||||
@@ -133,7 +133,7 @@ def test_clean_stop_cache(cache_mode):
|
||||
with TestRun.step("Read data from the core device."):
|
||||
test_file_3 = File.create_file("/tmp/test_file_2")
|
||||
dd = Dd().output(test_file_3.full_path) \
|
||||
.input(core_part.system_path) \
|
||||
.input(core_part.path) \
|
||||
.block_size(bs) \
|
||||
.count(int(test_file_main.size / bs)) \
|
||||
.oflag("direct")
|
||||
@@ -277,7 +277,7 @@ def test_clean_remove_core_without_fs(cache_mode):
|
||||
|
||||
with TestRun.step("Write data to exported object."):
|
||||
test_file_main = create_random_test_file("/tmp/test_file_main", Size(64, Unit.MebiByte))
|
||||
dd = Dd().output(core.system_path) \
|
||||
dd = Dd().output(core.path) \
|
||||
.input(test_file_main.full_path) \
|
||||
.block_size(bs) \
|
||||
.count(int(test_file_main.size / bs)) \
|
||||
@@ -302,7 +302,7 @@ def test_clean_remove_core_without_fs(cache_mode):
|
||||
with TestRun.step("Read data from the exported object."):
|
||||
test_file_1 = File.create_file("/tmp/test_file_1")
|
||||
dd = Dd().output(test_file_1.full_path) \
|
||||
.input(core.system_path) \
|
||||
.input(core.path) \
|
||||
.block_size(bs) \
|
||||
.count(int(test_file_main.size / bs)) \
|
||||
.oflag("direct")
|
||||
@@ -317,7 +317,7 @@ def test_clean_remove_core_without_fs(cache_mode):
|
||||
with TestRun.step("Read data from the core device."):
|
||||
test_file_2 = File.create_file("/tmp/test_file_2")
|
||||
dd = Dd().output(test_file_2.full_path) \
|
||||
.input(core_part.system_path) \
|
||||
.input(core_part.path) \
|
||||
.block_size(bs) \
|
||||
.count(int(test_file_main.size / bs)) \
|
||||
.oflag("direct")
|
||||
@@ -350,7 +350,7 @@ def test_clean_remove_core_without_fs(cache_mode):
|
||||
with TestRun.step("Read data from core device again."):
|
||||
test_file_3 = File.create_file("/tmp/test_file_3")
|
||||
dd = Dd().output(test_file_3.full_path) \
|
||||
.input(core_part.system_path) \
|
||||
.input(core_part.path) \
|
||||
.block_size(bs) \
|
||||
.count(int(test_file_main.size / bs)) \
|
||||
.oflag("direct")
|
||||
|
Reference in New Issue
Block a user