This commit introduces master-6.0.x specific tests that cover areas
where functionality is improved or changing for later versions.
--- /dev/null
+This test covers the conditions described in issue 5198. An ASAN-enabled build is required for verification as the problem does not present
+on a build without ASAN.
+
+The problem occurs when
+- Eve threaded logging is enabled
+- Suricata doesn't have permissions to create the eve output file
+
+An ASAN build is required to detect the condition (see the issue for the ASAN diagnostics)
--- /dev/null
+requires:
+ lt-version: 7
+ features:
+ - FIX_FOR_BUG_5836
+
+setup:
+ # Create a log directory without write permission
+ - script: |
+ rm -rf ./noperms
+ mkdir -p ./noperms
+ chmod 555 ./noperms
+
+args:
+ - --set outputs.1.eve-log.filename=noperms/eve.json --set outputs.1.eve-log.threaded=true
+
+exit-code: 0
--- /dev/null
+%YAML 1.1
+---
+
+outputs:
+ - eve-log:
+ enabled: yes
+ filename: eve.json
+ filetype: regular
+ types:
+ - anomaly:
+ types:
+ stream: yes
+ applayer: no
+
+ - eve-log:
+ enabled: yes
+ filename: eve2.json
+ filetype: regular
+ types:
+ - anomaly:
+ types:
+ stream: yes
+ applayer: no
--- /dev/null
+requires:
+ lt-version: 7
+
+args:
+ - -k none
+
+checks:
+ - shell:
+ args: grep "only one 'anomaly' logger can be enabled" stderr | wc -l | xargs
+ expect: 1
+
+exit-code: 0