]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
test/stream: Update drop reason per new reason code
authorJeff Lucovsky <jlucovsky@oisf.net>
Tue, 22 Aug 2023 14:57:52 +0000 (10:57 -0400)
committerVictor Julien <victor@inliniac.net>
Fri, 15 Sep 2023 15:08:58 +0000 (17:08 +0200)
Issue: 6235

tests/exception-policy-stream-reassembly-memcap-01/README.md [new file with mode: 0644]
tests/exception-policy-stream-reassembly-memcap-01/suricata.yaml
tests/exception-policy-stream-reassembly-memcap-01/test.yaml
tests/exception-policy-stream-reassembly-memcap-04/README.md [new file with mode: 0644]
tests/exception-policy-stream-reassembly-memcap-04/suricata.yaml
tests/exception-policy-stream-reassembly-memcap-04/test.yaml
tests/exception-policy-stream-reassembly-memcap-05/README.md [new file with mode: 0644]
tests/exception-policy-stream-reassembly-memcap-05/suricata.yaml
tests/exception-policy-stream-reassembly-memcap-05/test.yaml

diff --git a/tests/exception-policy-stream-reassembly-memcap-01/README.md b/tests/exception-policy-stream-reassembly-memcap-01/README.md
new file mode 100644 (file)
index 0000000..88a687f
--- /dev/null
@@ -0,0 +1,5 @@
+# Description
+
+Test exception policy logic for stream reassembly.
+
+DEBUG is required to enable the "eps" logic.
index dfccb8afa643b645d9977f7c442e1fc612fbbf3b..3c973a2beb9dc6c5aff8cc4417cbdd7fe96f9bdb 100644 (file)
@@ -1,6 +1,9 @@
 %YAML 1.1
 ---
 
+stats:
+  enabled: yes
+
 outputs:
   - eve-log:
       enabled: yes
@@ -20,6 +23,10 @@ outputs:
             flows: all       # start or all: 'start' logs only a single drop
                              # per flow direction. All logs each dropped pkt.
         - flow
+        - stats:
+            totals: yes       # stats for all threads merged together
+            threads: no       # per thread stats
+            deltas: no        # include delta values
 action-order:
   - pass
   - drop
index eb6c5305ecfb9ae89b89e6992f09f6a66dfdd56e..f20281159430ffcfdcffa167409ee4ae778baeb8 100644 (file)
@@ -23,7 +23,7 @@ checks:
       count: 1
       match:
         event_type: drop
-        drop.reason: "stream memcap"
+        drop.reason: "stream reassembly"
   - filter:
       count: 28
       match:
@@ -48,3 +48,8 @@ checks:
       match:
         event_type: flow
         flow.action: drop
+  - filter:
+      count: 1
+      match:
+        event_type: stats
+        stats.ips.drop_reason.stream_reassembly: 1
diff --git a/tests/exception-policy-stream-reassembly-memcap-04/README.md b/tests/exception-policy-stream-reassembly-memcap-04/README.md
new file mode 100644 (file)
index 0000000..88a687f
--- /dev/null
@@ -0,0 +1,5 @@
+# Description
+
+Test exception policy logic for stream reassembly.
+
+DEBUG is required to enable the "eps" logic.
index 758f7208528ae36ae1c3af2fa89b6b131673a305..aac4c605a75d949de9d4deed8eab8097d9cb7d3a 100644 (file)
@@ -14,3 +14,7 @@ outputs:
             flows: all       # start or all: 'start' logs only a single drop
                              # per flow direction. All logs each dropped pkt.
         - flow
+        - stats:
+            totals: yes       # stats for all threads merged together
+            threads: no       # per thread stats
+            deltas: no        # include delta values
index eb6c5305ecfb9ae89b89e6992f09f6a66dfdd56e..f20281159430ffcfdcffa167409ee4ae778baeb8 100644 (file)
@@ -23,7 +23,7 @@ checks:
       count: 1
       match:
         event_type: drop
-        drop.reason: "stream memcap"
+        drop.reason: "stream reassembly"
   - filter:
       count: 28
       match:
@@ -48,3 +48,8 @@ checks:
       match:
         event_type: flow
         flow.action: drop
+  - filter:
+      count: 1
+      match:
+        event_type: stats
+        stats.ips.drop_reason.stream_reassembly: 1
diff --git a/tests/exception-policy-stream-reassembly-memcap-05/README.md b/tests/exception-policy-stream-reassembly-memcap-05/README.md
new file mode 100644 (file)
index 0000000..88a687f
--- /dev/null
@@ -0,0 +1,5 @@
+# Description
+
+Test exception policy logic for stream reassembly.
+
+DEBUG is required to enable the "eps" logic.
index 758f7208528ae36ae1c3af2fa89b6b131673a305..aac4c605a75d949de9d4deed8eab8097d9cb7d3a 100644 (file)
@@ -14,3 +14,7 @@ outputs:
             flows: all       # start or all: 'start' logs only a single drop
                              # per flow direction. All logs each dropped pkt.
         - flow
+        - stats:
+            totals: yes       # stats for all threads merged together
+            threads: no       # per thread stats
+            deltas: no        # include delta values
index 7901c6b4de9002a0424f90301885e7b615ae488c..d19e9ad87479d39f0e7db260e07e3e78014dee23 100644 (file)
@@ -24,7 +24,7 @@ checks:
       count: 1
       match:
         event_type: drop
-        drop.reason: "stream memcap"
+        drop.reason: "stream reassembly"
   - filter:
       count: 0
       match:
@@ -49,3 +49,8 @@ checks:
       match:
         event_type: flow
         flow.action: drop
+  - filter:
+      count: 1
+      match:
+        event_type: stats
+        stats.ips.drop_reason.stream_reassembly: 1