From 7aec5ac0bdd1adcaeba707f26d5bc583de6ab6c9 Mon Sep 17 00:00:00 2001 From: Shin'ichiro Kawasaki Date: Wed, 14 Feb 2024 21:20:08 +0900 Subject: [PATCH] test: add the test for loops option and read-verify workloads Add t/jobs/t0029.fio to test that the loops option works together with read-verify workloads. Signed-off-by: Shin'ichiro Kawasaki Link: https://lore.kernel.org/r/20240214122008.4123286-3-shinichiro.kawasaki@wdc.com Signed-off-by: Jens Axboe --- t/jobs/t0029.fio | 14 ++++++++++++++ t/run-fio-tests.py | 21 +++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 t/jobs/t0029.fio diff --git a/t/jobs/t0029.fio b/t/jobs/t0029.fio new file mode 100644 index 00000000..481de6f3 --- /dev/null +++ b/t/jobs/t0029.fio @@ -0,0 +1,14 @@ +[global] +filename=t0029file +size=4k +verify=md5 + +[write] +rw=write +do_verify=0 + +[read] +stonewall=1 +rw=read +loops=2 +do_verify=1 diff --git a/t/run-fio-tests.py b/t/run-fio-tests.py index 1448f7cb..2f76d3fc 100755 --- a/t/run-fio-tests.py +++ b/t/run-fio-tests.py @@ -542,6 +542,17 @@ class FioJobFileTest_t0027(FioJobFileTest): if data != self.pattern: self.passed = False +class FioJobFileTest_t0029(FioJobFileTest): + """Test loops option works with read-verify workload.""" + def check_result(self): + super().check_result() + + if not self.passed: + return + + if self.json_data['jobs'][1]['read']['io_kbytes'] != 8: + self.passed = False + class FioJobFileTest_iops_rate(FioJobFileTest): """Test consists of fio test job t0011 Confirm that job0 iops == 1000 @@ -838,6 +849,16 @@ TEST_LIST = [ 'pre_success': None, 'requirements': [], }, + { + 'test_id': 29, + 'test_class': FioJobFileTest_t0029, + 'job': 't0029.fio', + 'success': SUCCESS_DEFAULT, + 'pre_job': None, + 'pre_success': None, + 'output_format': 'json', + 'requirements': [], + }, { 'test_id': 1000, 'test_class': FioExeTest, -- 2.25.1