From: Victor Julien Date: Fri, 28 Mar 2025 18:26:08 +0000 (+0100) Subject: github-ci: check for unsupported pcap types X-Git-Tag: suricata-7.0.11~136 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c8b72f4fd088e4cf8f790534a1d0eed6934325d;p=thirdparty%2Fsuricata-verify.git github-ci: check for unsupported pcap types --- diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 75cca1aa4..d3f0c28ab 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -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 index 000000000..7d0263796 --- /dev/null +++ b/pcap-check.sh @@ -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