Merge branch 'master' of ssh://git.kernel.dk/data/git/fio test-tag-2022-08-09
authorJens Axboe <axboe@kernel.dk>
Tue, 9 Aug 2022 13:07:39 +0000 (07:07 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 9 Aug 2022 13:07:39 +0000 (07:07 -0600)
* 'master' of ssh://git.kernel.dk/data/git/fio:
  testing: add test for slat + clat = tlat
  engines/null: add FIO_ASYNCIO_SETS_ISSUE_TIME flag
  testing: add test for slat + clat = tlat

engines/null.c
t/jobs/t0015-e78980ff.fio [new file with mode: 0644]
t/jobs/t0016-259ebc00.fio [new file with mode: 0644]
t/run-fio-tests.py

index 2df567187d21747cb43886d1870a3baca9c38995..68759c26f1096e98d062ff178e7a88458eac8f5c 100644 (file)
@@ -113,9 +113,11 @@ static struct null_data *null_init(struct thread_data *td)
        if (td->o.iodepth != 1) {
                nd->io_us = (struct io_u **) malloc(td->o.iodepth * sizeof(struct io_u *));
                memset(nd->io_us, 0, td->o.iodepth * sizeof(struct io_u *));
+               td->io_ops->flags |= FIO_ASYNCIO_SETS_ISSUE_TIME;
        } else
                td->io_ops->flags |= FIO_SYNCIO;
 
+       td_set_ioengine_flags(td);
        return nd;
 }
 
diff --git a/t/jobs/t0015-e78980ff.fio b/t/jobs/t0015-e78980ff.fio
new file mode 100644 (file)
index 0000000..c650c0b
--- /dev/null
@@ -0,0 +1,7 @@
+# Expected result: mean(slat) + mean(clat) = mean(lat)
+# Buggy result: equality does not hold
+
+[test]
+ioengine=libaio
+size=1M
+iodepth=16
diff --git a/t/jobs/t0016-259ebc00.fio b/t/jobs/t0016-259ebc00.fio
new file mode 100644 (file)
index 0000000..1b418e7
--- /dev/null
@@ -0,0 +1,7 @@
+# Expected result: mean(slat) + mean(clat) = mean(lat)
+# Buggy result: equality does not hold
+
+[test]
+ioengine=null
+size=1M
+iodepth=16
index 32cdbc19928808dda1b7b178d64c67ec9830ca56..d77f20e00f8ae3a47fe0694116b54545e57962e0 100755 (executable)
@@ -527,6 +527,27 @@ class FioJobTest_t0014(FioJobTest):
             return
 
 
+class FioJobTest_t0015(FioJobTest):
+    """Test consists of fio test jobs t0015 and t0016
+    Confirm that mean(slat) + mean(clat) = mean(tlat)"""
+
+    def check_result(self):
+        super(FioJobTest_t0015, self).check_result()
+
+        if not self.passed:
+            return
+
+        slat = self.json_data['jobs'][0]['read']['slat_ns']['mean']
+        clat = self.json_data['jobs'][0]['read']['clat_ns']['mean']
+        tlat = self.json_data['jobs'][0]['read']['lat_ns']['mean']
+        logging.debug('Test %d: slat %f, clat %f, tlat %f', self.testnum, slat, clat, tlat)
+
+        if abs(slat + clat - tlat) > 1:
+            self.failure_reason = "{0} slat {1} + clat {2} = {3} != tlat {4},".format(
+                self.failure_reason, slat, clat, slat+clat, tlat)
+            self.passed = False
+
+
 class FioJobTest_iops_rate(FioJobTest):
     """Test consists of fio test job t0009
     Confirm that job0 iops == 1000
@@ -816,6 +837,26 @@ TEST_LIST = [
         'output_format':    'json',
         'requirements':     [],
     },
+    {
+        'test_id':          15,
+        'test_class':       FioJobTest_t0015,
+        'job':              't0015-e78980ff.fio',
+        'success':          SUCCESS_DEFAULT,
+        'pre_job':          None,
+        'pre_success':      None,
+        'output_format':    'json',
+        'requirements':     [Requirements.linux, Requirements.libaio],
+    },
+    {
+        'test_id':          16,
+        'test_class':       FioJobTest_t0015,
+        'job':              't0016-259ebc00.fio',
+        'success':          SUCCESS_DEFAULT,
+        'pre_job':          None,
+        'pre_success':      None,
+        'output_format':    'json',
+        'requirements':     [],
+    },
     {
         'test_id':          1000,
         'test_class':       FioExeTest,