Add a test that sets gtod_cpu=1
authorBart Van Assche <bvanassche@acm.org>
Mon, 22 Jun 2020 01:28:08 +0000 (18:28 -0700)
committerBart Van Assche <bvanassche@acm.org>
Mon, 22 Jun 2020 02:47:25 +0000 (19:47 -0700)
None of the existing tests sets gtod_cpu=1. Hence add a test that sets
gtod_cpu=1.

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

diff --git a/t/jobs/t0012.fio b/t/jobs/t0012.fio
new file mode 100644 (file)
index 0000000..985eb16
--- /dev/null
@@ -0,0 +1,20 @@
+# Expected results: no parse warnings, runs and with roughly 1/8 iops between
+#                      the two jobs.
+# Buggy result: parse warning on flow value overflow, no 1/8 division between
+#                      jobs.
+#
+
+[global]
+bs=4k
+ioengine=null
+size=100g
+runtime=3
+flow_id=1
+gtod_cpu=1
+
+[flow1]
+flow=-8
+rate_iops=1000
+
+[flow2]
+flow=1
index 2bfd996f7529b3b75ae7e18ac7a004bd69c812db..ae2cb0968ff52609ad6801120bc2142e201ab38e 100755 (executable)
@@ -420,14 +420,14 @@ class FioJobTest_t0009(FioJobTest):
             self.passed = False
 
 
-class FioJobTest_t0011(FioJobTest):
+class FioJobTest_iops_rate(FioJobTest):
     """Test consists of fio test job t0009
     Confirm that job0 iops == 1000
     and that job1_iops / job0_iops ~ 8
     With two runs of fio-3.16 I observed a ratio of 8.3"""
 
     def check_result(self):
-        super(FioJobTest_t0011, self).check_result()
+        super(FioJobTest_iops_rate, self).check_result()
 
         if not self.passed:
             return
@@ -667,7 +667,7 @@ TEST_LIST = [
     },
     {
         'test_id':          11,
-        'test_class':       FioJobTest_t0011,
+        'test_class':       FioJobTest_iops_rate,
         'job':              't0011-5d2788d5.fio',
         'success':          SUCCESS_DEFAULT,
         'pre_job':          None,
@@ -675,6 +675,18 @@ TEST_LIST = [
         'output_format':    'json',
         'requirements':     [],
     },
+    {
+        'test_id':          12,
+        'test_class':       FioJobTest_iops_rate,
+        'job':              't0012.fio',
+        'success':          SUCCESS_DEFAULT,
+        'pre_job':          None,
+        'pre_success':      None,
+        'output_format':    'json',
+        'requirements':     [],
+        'requirements':     [Requirements.not_macos],
+        # mac os does not support CPU affinity
+    },
     {
         'test_id':          1000,
         'test_class':       FioExeTest,