From 0a602473807bcdaf28a30441ca05b9e16b6ad128 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 21 Jun 2020 18:28:08 -0700 Subject: [PATCH] Add a test that sets gtod_cpu=1 None of the existing tests sets gtod_cpu=1. Hence add a test that sets gtod_cpu=1. Signed-off-by: Bart Van Assche --- t/jobs/t0012.fio | 20 ++++++++++++++++++++ t/run-fio-tests.py | 18 +++++++++++++++--- 2 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 t/jobs/t0012.fio diff --git a/t/jobs/t0012.fio b/t/jobs/t0012.fio new file mode 100644 index 00000000..985eb16b --- /dev/null +++ b/t/jobs/t0012.fio @@ -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 diff --git a/t/run-fio-tests.py b/t/run-fio-tests.py index 2bfd996f..ae2cb096 100755 --- a/t/run-fio-tests.py +++ b/t/run-fio-tests.py @@ -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, -- 2.25.1