From f226220049035290e5e193d1fc117d3057fc1270 Mon Sep 17 00:00:00 2001 From: Vincent Fu Date: Wed, 20 Mar 2024 14:08:46 -0400 Subject: [PATCH] t/jobs/t0030: add test for --bandwidth-log option Add a test to detect changes that break the --bandwidth-log option. This option uses the logging data structures in a way that differs from how the other logs use them. So it's easy to forget about this special case. Recent patches resolving related breakage are: d72244761b2230fbb2d6eaec59cdedd3ea651d4f ("stat: fix segfault with fio option --bandwidth-log") acc481b6d34aab3ee6e19f22b64f8bf0dd30480c ("iolog: fix reported defect from coverity scan") Signed-off-by: Vincent Fu --- t/jobs/t0030.fio | 10 ++++++++++ t/run-fio-tests.py | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 t/jobs/t0030.fio diff --git a/t/jobs/t0030.fio b/t/jobs/t0030.fio new file mode 100644 index 00000000..8bbc810e --- /dev/null +++ b/t/jobs/t0030.fio @@ -0,0 +1,10 @@ +# run with --bandwidth-log +# broken behavior: seg fault +# successful behavior: test runs to completion with 0 as the exit code + +[test] +ioengine=null +filesize=1T +rw=read +time_based +runtime=2s diff --git a/t/run-fio-tests.py b/t/run-fio-tests.py index 08134e50..acdbbf88 100755 --- a/t/run-fio-tests.py +++ b/t/run-fio-tests.py @@ -859,6 +859,16 @@ TEST_LIST = [ 'output_format': 'json', 'requirements': [], }, + { + 'test_id': 30, + 'test_class': FioJobFileTest, + 'job': 't0030.fio', + 'success': SUCCESS_DEFAULT, + 'pre_job': None, + 'pre_success': None, + 'parameters': ['--bandwidth-log'], + 'requirements': [], + }, { 'test_id': 1000, 'test_class': FioExeTest, -- 2.25.1