bug fixes and add text report
diff --git a/wally/suits/io/fio.py b/wally/suits/io/fio.py
index 77d7a75..16da091 100644
--- a/wally/suits/io/fio.py
+++ b/wally/suits/io/fio.py
@@ -168,8 +168,12 @@
job_file=self.remote_task_file)
must_be_empty = node.run(cmd, timeout=exec_time + max(300, exec_time), check_timeout=1).strip()
- if must_be_empty:
- logger.error("Unexpected fio output: %r", must_be_empty)
+ for line in must_be_empty.split("\n"):
+ if line.strip():
+ if 'only root may flush block devices' in line:
+ continue
+ logger.error("Unexpected fio output: %r", must_be_empty)
+ break
# put fio output into storage
fio_out = node.get_file_content(self.remote_output_file)
diff --git a/wally/suits/io/fio_job.py b/wally/suits/io/fio_job.py
index 2d8d78a..39715ef 100644
--- a/wally/suits/io/fio_job.py
+++ b/wally/suits/io/fio_job.py
@@ -41,7 +41,7 @@
@property
def summary(self) -> str:
"""Test short summary, used mostly for file names and short image description"""
- res = "{0[oper]}{0[sync_mode]}{0[bsize]}".format(self)
+ res = "{0[oper_short]}{0[sync_mode]}{0[bsize]}".format(self)
if self['qd'] is not None:
res += "_qd" + str(self['qd'])
if self['thcount'] not in (1, None):
@@ -107,7 +107,7 @@
@property
def qd(self) -> int:
- return int(self.vals['iodepth'])
+ return int(self.vals.get('iodepth', '1'))
@property
def bsize(self) -> int:
@@ -142,6 +142,7 @@
def params(self) -> JobParams:
if self._params is None:
self._params = dict(oper=self.oper,
+ oper_short=self.op_type_short,
sync_mode=self.sync_mode,
bsize=self.bsize,
qd=self.qd,
@@ -154,7 +155,7 @@
def __eq__(self, o: object) -> bool:
if not isinstance(o, FioJobConfig):
return False
- return self.vals == cast(FioJobConfig, o).vals
+ return dict(self.vals) == dict(cast(FioJobConfig, o).vals)
def copy(self) -> 'FioJobConfig':
return copy.deepcopy(self)
diff --git a/wally/suits/io/rpc_plugin.py b/wally/suits/io/rpc_plugin.py
index 5f5cfb5..39ed5cc 100644
--- a/wally/suits/io/rpc_plugin.py
+++ b/wally/suits/io/rpc_plugin.py
@@ -14,9 +14,8 @@
# TODO: fix this in case if file is block device
-def check_file_prefilled(path, used_size_mb):
+def check_file_prefilled(path, used_size_mb, blocks_to_check=16):
used_size = used_size_mb * 1024 ** 2
- blocks_to_check = 16
try:
fstats = os.stat(path)
@@ -25,10 +24,8 @@
except EnvironmentError:
return False
- offsets = [random.randrange(used_size - 1024) for _ in range(blocks_to_check)]
- offsets.append(used_size - 1024)
- offsets.append(0)
-
+ offsets = [0, used_size - 1024] + [random.randrange(used_size - 1024) for _ in range(blocks_to_check)]
+ logger.debug(str(offsets))
with open(path, 'rb') as fd:
for offset in offsets:
fd.seek(offset)
diff --git a/wally/suits/io/verify.cfg b/wally/suits/io/verify.cfg
index 75ab2b4..58a94b0 100644
--- a/wally/suits/io/verify.cfg
+++ b/wally/suits/io/verify.cfg
@@ -1,18 +1,19 @@
[global]
-include defaults.cfg
-
-size={TEST_FILE_SIZE}
-ramp_time=0
-runtime=15
+include defaults_qd.cfg
+QD={% 1, 2, 4 %}
+runtime=30
+direct=1
# ---------------------------------------------------------------------
-# [verify_{TEST_SUMM}]
-# blocksize=4k
-# rw=randwrite
-# direct=1
[verify_{TEST_SUMM}]
blocksize=4k
rw=randwrite
direct=1
-sync=1
+iodepth={QD}
+
+# [verify_{TEST_SUMM}]
+# blocksize=4k
+# rw=randwr
+# direct=1
+# sync=1