]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
github-ci: check for unsupported pcap types
authorVictor Julien <victor@inliniac.net>
Fri, 28 Mar 2025 18:26:08 +0000 (19:26 +0100)
committerVictor Julien <victor@inliniac.net>
Fri, 28 Mar 2025 18:31:23 +0000 (19:31 +0100)
.github/workflows/builds.yml
pcap-check.sh [new file with mode: 0755]

index 75cca1aa4269ed16425998905870b8a18b3876b5..d3f0c28ab3eea5244572b23150f7ec6b15c2f25c 100644 (file)
@@ -7,13 +7,14 @@ on:
 jobs:
   
   pcapng-check:
-    name: PCAP-NG Check
+    name: PCAP Check
     runs-on: ubuntu-22.04
     steps:
       - uses: actions/checkout@v3
       - run: sudo apt update
       - run: sudo apt -y install tshark
       - run: ./pcapng-check.sh
+      - run: ./pcap-check.sh
 
   ubuntu-22-04:
     name: Ubuntu 22.04
diff --git a/pcap-check.sh b/pcap-check.sh
new file mode 100755 (executable)
index 0000000..7d02637
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+  
+#set -x
+
+BADPCAPCNT=$(find tests/ -type f|xargs -L1 file|grep "pcap capture file, microsecond ts, extensions"|wc -l)
+if [ $BADPCAPCNT -ne 0 ]; then
+    echo "$BADPCAPCNT unsupported pcap files found:"
+    echo
+    find tests/ -type f|xargs -L1 file|grep "pcap capture file, microsecond ts, extensions"
+    echo
+    echo "pcap files with extensions are not supported by OpenBSD"
+    exit 1
+fi
+
+exit 0