]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
tests: add test for bug 2769
authorVictor Julien <victor@inliniac.net>
Thu, 21 Feb 2019 11:12:39 +0000 (12:12 +0100)
committerVictor Julien <victor@inliniac.net>
Fri, 19 Apr 2019 07:12:16 +0000 (09:12 +0200)
tests/bug-2769/README [new file with mode: 0644]
tests/bug-2769/issue_no_icmp.pcap [new file with mode: 0644]
tests/bug-2769/test.rules [new file with mode: 0644]
tests/bug-2769/test.yaml [new file with mode: 0644]

diff --git a/tests/bug-2769/README b/tests/bug-2769/README
new file mode 100644 (file)
index 0000000..35b5746
--- /dev/null
@@ -0,0 +1 @@
+Pcap from https://redmine.openinfosecfoundation.org/issues/2769
diff --git a/tests/bug-2769/issue_no_icmp.pcap b/tests/bug-2769/issue_no_icmp.pcap
new file mode 100644 (file)
index 0000000..dadaa57
Binary files /dev/null and b/tests/bug-2769/issue_no_icmp.pcap differ
diff --git a/tests/bug-2769/test.rules b/tests/bug-2769/test.rules
new file mode 100644 (file)
index 0000000..dc5f532
--- /dev/null
@@ -0,0 +1,2 @@
+alert tcp any any -> any any (flow:to_server,established; content:"functions"; pcre:"/\/[0-9]{2,8}\.functions/Ui"; sid:1; rev:1;)
+alert tcp any any -> any any (flow:to_server,established; content:"functions"; pcre:"/somethingelse/Ui"; sid:2; rev:1;)
diff --git a/tests/bug-2769/test.yaml b/tests/bug-2769/test.yaml
new file mode 100644 (file)
index 0000000..f268b8c
--- /dev/null
@@ -0,0 +1,19 @@
+requires:
+  features:
+    - HAVE_LIBJANSSON
+
+checks:
+  - filter:
+      count: 0
+      match:
+        event_type: alert
+  - filter:
+      count: 0
+      match:
+        event_type: alert
+        alert.signature_id: 1
+  - filter:
+      count: 0
+      match:
+        event_type: alert
+        alert.signature_id: 2