From: Vincent Fu Date: Wed, 20 Mar 2024 18:08:46 +0000 (-0400) Subject: t/jobs/t0030: add test for --bandwidth-log option X-Git-Tag: fio-3.37~10 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=f226220049035290e5e193d1fc117d3057fc1270;p=fio.git 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 --- 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,