]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
test/cmdline: Test verbose commandline handling 2815/head
authorJeff Lucovsky <jlucovsky@oisf.net>
Thu, 4 Dec 2025 13:32:00 +0000 (08:32 -0500)
committerVictor Julien <vjulien@oisf.net>
Mon, 15 Dec 2025 22:18:55 +0000 (22:18 +0000)
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

tests/bug-7389-01/README.md [moved from tests/bug-7389/README.md with 80% similarity]
tests/bug-7389-01/input.pcap [moved from tests/bug-7389/input.pcap with 100% similarity]
tests/bug-7389-01/test.yaml [moved from tests/bug-7389/test.yaml with 52% similarity]
tests/bug-7389-02/README.md [new file with mode: 0644]
tests/bug-7389-02/test.yaml [new file with mode: 0644]
tests/bug-7389-03/README.md [new file with mode: 0644]
tests/bug-7389-03/test.yaml [new file with mode: 0644]

similarity index 80%
rename from tests/bug-7389/README.md
rename to tests/bug-7389-01/README.md
index 64d99c734835630bd58d10251e8aa501416b208a..b08fcf1360168b422a200d2c25da0366b8fef778 100644 (file)
@@ -1 +1,3 @@
 Ensure that extra `-v` switches don't reset verbose level
+
+Ticket: 7389
similarity index 52%
rename from tests/bug-7389/test.yaml
rename to tests/bug-7389-01/test.yaml
index a64f181f37df79664abde23c1d6bef4d2054366d..35bb2d3f9003cea370d03dc1851d684d40281b32 100644 (file)
@@ -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 (file)
index 0000000..b9f83a6
--- /dev/null
@@ -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 (file)
index 0000000..1486587
--- /dev/null
@@ -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 (file)
index 0000000..239434a
--- /dev/null
@@ -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 (file)
index 0000000..6a3c559
--- /dev/null
@@ -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