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

@@ -73,7 +73,7 @@ def test_cleaning_policies_in_write_back(cleaning_policy):
with TestRun.step("Run 'fio'"):
fio = fio_prepare()
for i in range(cores_count):
fio.add_job().target(core[i].system_path)
fio.add_job().target(core[i].path)
fio.run()
time.sleep(3)
core_writes_before_wait_for_cleaning = (
@@ -138,7 +138,7 @@ def test_cleaning_policies_in_write_through(cleaning_policy):
with TestRun.step("Run 'fio'"):
fio = fio_prepare()
for i in range(cores_count):
fio.add_job().target(core[i].system_path)
fio.add_job().target(core[i].path)
fio.run()
time.sleep(3)

View File

@@ -57,13 +57,13 @@ def test_concurrent_cores_flush(cache_mode):
block_size = Size(4, Unit.MebiByte)
count = int(cache_size.value / 2 / block_size.value)
dd_pid = Dd().output(core1.system_path) \
dd_pid = Dd().output(core1.path) \
.input("/dev/urandom") \
.block_size(block_size) \
.count(count) \
.run_in_background()
Dd().output(core2.system_path) \
Dd().output(core2.path) \
.input("/dev/urandom") \
.block_size(block_size) \
.count(count) \
@@ -160,7 +160,7 @@ def test_concurrent_caches_flush(cache_mode):
count = int(cache_size.value / block_size.value)
total_saturation = block_size * count
for core in cores:
Dd().output(core.system_path) \
Dd().output(core.path) \
.input("/dev/urandom") \
.block_size(block_size) \
.count(count) \

View File

@@ -363,7 +363,7 @@ def fio_prepare(core, io_mode, io_size=io_size):
.io_engine(IoEngine.libaio)
.size(io_size)
.read_write(io_mode)
.target(core.system_path)
.target(core.path)
.direct(1)
)
return fio

View File

@@ -84,14 +84,14 @@ def test_seq_cutoff_multi_core(thresholds_list, cache_mode, io_type, io_type_las
fio_job = fio.add_job(job_name=f"core_{core.core_id}")
fio_job.size(io_sizes[i])
fio_job.read_write(io_type)
fio_job.target(core.system_path)
fio_job.target(core.path)
writes_before.append(core.get_statistics().block_stats.cache.writes)
# Run random IO against the last core
fio_job = fio.add_job(job_name=f"core_{cores[-1].core_id}")
fio_job.size(io_sizes[-1])
fio_job.read_write(io_type_last)
fio_job.target(cores[-1].system_path)
fio_job.target(cores[-1].path)
writes_before.append(cores[-1].get_statistics().block_stats.cache.writes)
with TestRun.step("Running IO against all cores"):
@@ -150,7 +150,7 @@ def test_seq_cutoff_thresh(threshold_param, cls, io_dir, policy, verify_type):
.io_engine(IoEngine.libaio)
.size(io_size)
.read_write(io_dir)
.target(f"{cores[0].system_path}")
.target(f"{cores[0].path}")
.direct()
).run()
@@ -194,7 +194,7 @@ def test_seq_cutoff_thresh_fill(threshold_param, cls, io_dir):
.io_engine(IoEngine.libaio)
.size(cache.cache_device.size)
.read_write(io_dir)
.target(f"{cores[0].system_path}")
.target(f"{cores[0].path}")
.direct()
).run()
@@ -218,7 +218,7 @@ def test_seq_cutoff_thresh_fill(threshold_param, cls, io_dir):
.io_engine(IoEngine.libaio)
.size(io_size)
.read_write(io_dir)
.target(f"{cores[0].system_path}")
.target(f"{cores[0].path}")
.direct()
).run()