Add a test for serialize_overlap=1
authorBart Van Assche <bvanassche@acm.org>
Sun, 14 Jun 2020 19:09:45 +0000 (12:09 -0700)
committerBart Van Assche <bvanassche@acm.org>
Sat, 4 Jul 2020 04:20:30 +0000 (21:20 -0700)
This test causes fio to call check_overlap().

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
t/jobs/t0013.fio [new file with mode: 0644]
t/run-fio-tests.py

diff --git a/t/jobs/t0013.fio b/t/jobs/t0013.fio
new file mode 100644 (file)
index 0000000..b4ec1b4
--- /dev/null
@@ -0,0 +1,14 @@
+# Trigger the fio code that serializes overlapping I/O. The job size is very
+# small to make overlapping I/O more likely.
+
+[test]
+ioengine=null
+thread=1
+size=4K
+blocksize=4K
+io_submit_mode=offload
+iodepth=1
+serialize_overlap=1
+numjobs=8
+loops=1000000
+runtime=10
index 622389502d1fe04eea58202fab2ccec06579d3d0..c116bf5a913e1045ac797ff5028d5cbb7b637efc 100755 (executable)
@@ -447,6 +447,13 @@ class FioJobTest_iops_rate(FioJobTest):
             self.passed = False
 
 
+class FioJobTest_t0013(FioJobTest):
+    """Runs fio test job t0013"""
+
+    def check_result(self):
+        super(FioJobTest_t0013, self).check_result()
+
+
 class Requirements(object):
     """Requirements consists of multiple run environment characteristics.
     These are to determine if a particular test can be run"""
@@ -687,6 +694,16 @@ TEST_LIST = [
         'requirements':     [Requirements.not_macos],
         # mac os does not support CPU affinity
     },
+    {
+        'test_id':          13,
+        'test_class':       FioJobTest_t0013,
+        'job':              't0013.fio',
+        'success':          SUCCESS_DEFAULT,
+        'pre_job':          None,
+        'pre_success':      None,
+        'output_format':    'json',
+        'requirements':     [],
+    },
     {
         'test_id':          1000,
         'test_class':       FioExeTest,