From f0c7ae7a2711dda5fd81f7d54ea29062a658adaf Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 14 Jun 2020 12:09:45 -0700 Subject: [PATCH] Add a test for serialize_overlap=1 This test causes fio to call check_overlap(). Signed-off-by: Bart Van Assche --- t/jobs/t0013.fio | 14 ++++++++++++++ t/run-fio-tests.py | 17 +++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 t/jobs/t0013.fio diff --git a/t/jobs/t0013.fio b/t/jobs/t0013.fio new file mode 100644 index 00000000..b4ec1b42 --- /dev/null +++ b/t/jobs/t0013.fio @@ -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 diff --git a/t/run-fio-tests.py b/t/run-fio-tests.py index 62238950..c116bf5a 100755 --- a/t/run-fio-tests.py +++ b/t/run-fio-tests.py @@ -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, -- 2.25.1