From: Jeff Lucovsky Date: Thu, 4 Dec 2025 13:32:00 +0000 (-0500) Subject: test/cmdline: Test verbose commandline handling X-Git-Tag: suricata-7.0.14~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3586baa8bc0ab5d0533792116a77efed876eb749;p=thirdparty%2Fsuricata-verify.git test/cmdline: Test verbose commandline handling Followup PR that - Includes the issue number in the README files - Updated to check for symbolic instead of numeric verbose level. - Tests displayed level with debug build Issue: 7389 --- diff --git a/tests/bug-7389/README.md b/tests/bug-7389-01/README.md similarity index 80% rename from tests/bug-7389/README.md rename to tests/bug-7389-01/README.md index 64d99c734..b08fcf136 100644 --- a/tests/bug-7389/README.md +++ b/tests/bug-7389-01/README.md @@ -1 +1,3 @@ Ensure that extra `-v` switches don't reset verbose level + +Ticket: 7389 diff --git a/tests/bug-7389/input.pcap b/tests/bug-7389-01/input.pcap similarity index 100% rename from tests/bug-7389/input.pcap rename to tests/bug-7389-01/input.pcap diff --git a/tests/bug-7389/test.yaml b/tests/bug-7389-01/test.yaml similarity index 52% rename from tests/bug-7389/test.yaml rename to tests/bug-7389-01/test.yaml index a64f181f3..35bb2d3f9 100644 --- a/tests/bug-7389/test.yaml +++ b/tests/bug-7389-01/test.yaml @@ -6,5 +6,5 @@ args: checks: - shell: - args: grep "Running with verbose level 4" suricata.log | wc -l | xargs + args: grep "Running with verbose level Debug" suricata.log | wc -l | xargs expect: 1 diff --git a/tests/bug-7389-02/README.md b/tests/bug-7389-02/README.md new file mode 100644 index 000000000..b9f83a66f --- /dev/null +++ b/tests/bug-7389-02/README.md @@ -0,0 +1,3 @@ +Test case to check level with `-vvv` + +Ticket: 7389 diff --git a/tests/bug-7389-02/test.yaml b/tests/bug-7389-02/test.yaml new file mode 100644 index 000000000..14865879b --- /dev/null +++ b/tests/bug-7389-02/test.yaml @@ -0,0 +1,12 @@ +requires: + min-version: 9 + +pcap: ../bug-7389-01/input.pcap + +args: + - -vvv + +checks: + - shell: + args: grep "Running with verbose level Config" suricata.log | wc -l | xargs + expect: 1 diff --git a/tests/bug-7389-03/README.md b/tests/bug-7389-03/README.md new file mode 100644 index 000000000..239434adf --- /dev/null +++ b/tests/bug-7389-03/README.md @@ -0,0 +1,3 @@ +Ensure that Debug level is printed with a debug build + +Ticket: 7389 diff --git a/tests/bug-7389-03/test.yaml b/tests/bug-7389-03/test.yaml new file mode 100644 index 000000000..6a3c559da --- /dev/null +++ b/tests/bug-7389-03/test.yaml @@ -0,0 +1,14 @@ +requires: + min-version: 9 + features: + - DEBUG + +pcap: ../bug-7389-01/input.pcap + +args: + - -vvvvvvvvvvv + +checks: + - shell: + args: grep "Running with verbose level Debug" suricata.log | wc -l | xargs + expect: 1