t/jobs/t0030: add test for --bandwidth-log option
authorVincent Fu <vincent.fu@samsung.com>
Wed, 20 Mar 2024 18:08:46 +0000 (14:08 -0400)
committerVincent Fu <vincent.fu@samsung.com>
Wed, 20 Mar 2024 18:42:39 +0000 (14:42 -0400)
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 <vincent.fu@samsung.com>
t/jobs/t0030.fio [new file with mode: 0644]
t/run-fio-tests.py

diff --git a/t/jobs/t0030.fio b/t/jobs/t0030.fio
new file mode 100644 (file)
index 0000000..8bbc810
--- /dev/null
@@ -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
index 08134e50e120f29115afce464151140124d63a84..acdbbf8879d4ce6263b2d4167a6e9719002e3348 100755 (executable)
@@ -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,