]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
tests/log: Verify bug 5198
authorJeff Lucovsky <jlucovsky@oisf.net>
Sun, 4 Sep 2022 12:23:55 +0000 (08:23 -0400)
committerJason Ish <jason.ish@oisf.net>
Tue, 31 Jan 2023 21:33:20 +0000 (15:33 -0600)
This issue requires an ASAN build -- it doesn't reproduce without ASAN.

Issue: 5198

tests/bug-5198/README.md [new file with mode: 0644]
tests/bug-5198/input.pcap [new file with mode: 0644]
tests/bug-5198/test.yaml [new file with mode: 0644]

diff --git a/tests/bug-5198/README.md b/tests/bug-5198/README.md
new file mode 100644 (file)
index 0000000..8054304
--- /dev/null
@@ -0,0 +1,8 @@
+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)
diff --git a/tests/bug-5198/input.pcap b/tests/bug-5198/input.pcap
new file mode 100644 (file)
index 0000000..6cfd80f
Binary files /dev/null and b/tests/bug-5198/input.pcap differ
diff --git a/tests/bug-5198/test.yaml b/tests/bug-5198/test.yaml
new file mode 100644 (file)
index 0000000..3759a71
--- /dev/null
@@ -0,0 +1,14 @@
+requires:
+  min-version: 7
+
+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