From: Jeff Lucovsky Date: Sun, 24 Mar 2024 12:17:31 +0000 (-0400) Subject: test/memcap: Validate memcap pressure values X-Git-Tag: suricata-6.0.19~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1763%2Fhead;p=thirdparty%2Fsuricata-verify.git test/memcap: Validate memcap pressure values Issue: 6398 This test validates that the memcap pressure stats are no longer in the global namespace. Old: - memcap_pressure - memcap_pressure_max New: - memcap.pressure - memcap.pressure_max --- diff --git a/tests/memcap-pressure/README.md b/tests/memcap-pressure/README.md new file mode 100644 index 000000000..72c138948 --- /dev/null +++ b/tests/memcap-pressure/README.md @@ -0,0 +1,8 @@ +# Test + +Validate that `memcap.pressure` and `memcap.pressure_max` exist. + +# Pcap + +Pcap is the result of a curl to www.testmyids.com, later extracted with +Wireshark to keep the ``http`` packets only. diff --git a/tests/memcap-pressure/test.rules b/tests/memcap-pressure/test.rules new file mode 100644 index 000000000..3b7d12406 --- /dev/null +++ b/tests/memcap-pressure/test.rules @@ -0,0 +1 @@ +alert http any any -> any any (msg:"HTTP traffic"; sid:001; rev:1;) diff --git a/tests/memcap-pressure/test.yaml b/tests/memcap-pressure/test.yaml new file mode 100644 index 000000000..6db1213ff --- /dev/null +++ b/tests/memcap-pressure/test.yaml @@ -0,0 +1,16 @@ +requires: + min-version: 8 +pcap: ../alert-testmyids-midstream5/input.pcap + +args: +- --set stream.midstream=true + +checks: + - filter: + count: 1 + match: + event_type: stats + has-key: stats.memcap.pressure_max + has-key: stats.memcap.pressure + not-has-key: stats.memcap_pressure_max + not-has-key: stats.memcap_pressure