test: add the test for loops option and read-verify workloads
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Wed, 14 Feb 2024 12:20:08 +0000 (21:20 +0900)
committerJens Axboe <axboe@kernel.dk>
Wed, 14 Feb 2024 14:39:48 +0000 (07:39 -0700)
Add t/jobs/t0029.fio to test that the loops option works together with
read-verify workloads.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Link: https://lore.kernel.org/r/20240214122008.4123286-3-shinichiro.kawasaki@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
t/jobs/t0029.fio [new file with mode: 0644]
t/run-fio-tests.py

diff --git a/t/jobs/t0029.fio b/t/jobs/t0029.fio
new file mode 100644 (file)
index 0000000..481de6f
--- /dev/null
@@ -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
index 1448f7cb9f47b09221fc771b91924e15960fc7b2..2f76d3fcade6b1eb71e7f603f2f4e06c3f2f8ca9 100755 (executable)
@@ -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,