From 77c758db876d93022e8f2bb4fd4c1acbbf7e76ac Mon Sep 17 00:00:00 2001 From: Vincent Fu Date: Tue, 13 Dec 2022 21:34:20 +0000 Subject: [PATCH] t/run-fio-tests: relax acceptance criteria for t0008 t0008 runs a 50/50 seq read/write job on a 32M file. Since a random number generator determines whether fio issues a read or a write command, the read/write ratio will not be exactly 50/50. This patch relaxes the acceptance criteria to avoid false positives when we do not use the default random number seeds. Signed-off-by: Vincent Fu --- t/run-fio-tests.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/t/run-fio-tests.py b/t/run-fio-tests.py index a06f8126..70ff4371 100755 --- a/t/run-fio-tests.py +++ b/t/run-fio-tests.py @@ -387,10 +387,13 @@ class FioJobTest_t0007(FioJobTest): class FioJobTest_t0008(FioJobTest): """Test consists of fio test job t0008 Confirm that read['io_kbytes'] = 32768 and that - write['io_kbytes'] ~ 16568 + write['io_kbytes'] ~ 16384 - I did runs with fio-ae2fafc8 and saw write['io_kbytes'] values of - 16585, 16588. With two runs of fio-3.16 I obtained 16568""" + This is a 50/50 seq read/write workload. Since fio flips a coin to + determine whether to issue a read or a write, total bytes written will not + be exactly 16384K. But total bytes read will be exactly 32768K because + reads will include the initial phase as well as the verify phase where all + the blocks originally written will be read.""" def check_result(self): super(FioJobTest_t0008, self).check_result() @@ -398,10 +401,10 @@ class FioJobTest_t0008(FioJobTest): if not self.passed: return - ratio = self.json_data['jobs'][0]['write']['io_kbytes'] / 16568 + ratio = self.json_data['jobs'][0]['write']['io_kbytes'] / 16384 logging.debug("Test %d: ratio: %f", self.testnum, ratio) - if ratio < 0.99 or ratio > 1.01: + if ratio < 0.97 or ratio > 1.03: self.failure_reason = "{0} bytes written mismatch,".format(self.failure_reason) self.passed = False if self.json_data['jobs'][0]['read']['io_kbytes'] != 32768: -- 2.25.1