test: add test for verify read back of experimental verify
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Thu, 20 Oct 2022 06:38:53 +0000 (15:38 +0900)
committerVincent Fu <vincent.fu@samsung.com>
Mon, 24 Oct 2022 14:34:57 +0000 (10:34 -0400)
Add a test case to confirm fix of bytes_done accounting issue of
experimental verify. The test job runs a simple workload with
experimental verify and confirm verify read amount is the file size.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
t/jobs/t0025.fio [new file with mode: 0644]
t/run-fio-tests.py

diff --git a/t/jobs/t0025.fio b/t/jobs/t0025.fio
new file mode 100644 (file)
index 0000000..29b5fe8
--- /dev/null
@@ -0,0 +1,7 @@
+[job]
+filename=t0025file
+size=128k
+readwrite=write
+do_verify=1
+verify=md5
+experimental_verify=1
index df87ae721d139130c47b8f8321b743d178e9d26a..439991a1a352b5b5815df0a80a78f2526b0cf2e1 100755 (executable)
@@ -788,6 +788,18 @@ class FioJobTest_t0024(FioJobTest_t0023):
         self.check_all_offsets("bssplit_bw.log", 512, filesize)
 
 
+class FioJobTest_t0025(FioJobTest):
+    """Test experimental verify read backs written data pattern."""
+    def check_result(self):
+        super(FioJobTest_t0025, self).check_result()
+
+        if not self.passed:
+            return
+
+        if self.json_data['jobs'][0]['read']['io_kbytes'] != 128:
+            self.passed = False
+
+
 class FioJobTest_iops_rate(FioJobTest):
     """Test consists of fio test job t0009
     Confirm that job0 iops == 1000
@@ -1183,6 +1195,16 @@ TEST_LIST = [
         'pre_success':      None,
         'requirements':     [],
     },
+    {
+        'test_id':          25,
+        'test_class':       FioJobTest_t0025,
+        'job':              't0025.fio',
+        'success':          SUCCESS_DEFAULT,
+        'pre_job':          None,
+        'pre_success':      None,
+        'output_format':    'json',
+        'requirements':     [],
+    },
     {
         'test_id':          1000,
         'test_class':       FioExeTest,