Skip to content

Commit 935e104

Browse files
authored
Merge pull request #325 from padelsbach/wp-tcpdump-ci-fail
Fix tcpdump CI workflow
2 parents a8223f5 + 7bb706c commit 935e104

File tree

2 files changed

+8
-23
lines changed

2 files changed

+8
-23
lines changed

.github/scripts/check-workflow-result.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,14 @@ if [ "$WOLFPROV_FORCE_FAIL" = "WOLFPROV_FORCE_FAIL=1" ]; then
274274
# ----- TCPDUMP -----
275275
elif [ "$TEST_SUITE" = "tcpdump" ]; then
276276
if [ -f "tcpdump-test.log" ]; then
277-
# Check for expected 7 failed tests (ESP/crypto segfaults)
278-
if grep -q "2 tests failed" tcpdump-test.log; then
279-
echo "PASS: tcpdump tests failed as expected with force fail enabled (2 tests failed)"
280-
exit 0
281-
else
282-
echo "FAIL: tcpdump tests did not fail as expected (should have 2 failed tests)"
277+
# Expect 7 failed tests (ESP/crypto segfaults) in non-FIPS
278+
# and 2 failed tests in FIPS mode
279+
if grep -q "Tests passed successfully" tcpdump-test.log; then
280+
echo "FAIL: tcpdump tests did not fail as expected"
283281
exit 1
282+
else
283+
echo "PASS: tcpdump tests failed as expected with force fail enabled"
284+
exit 0
284285
fi
285286
else
286287
echo "Error: tcpdump-test.log not found"

.github/workflows/tcpdump.yml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -82,20 +82,6 @@ jobs:
8282
apt-get install -y build-essential flex bison autoconf libtool\
8383
libpcap-dev
8484
85-
- name: Checkout libpcap
86-
uses: actions/checkout@v4
87-
with:
88-
repository: the-tcpdump-group/libpcap
89-
path: libpcap_repo
90-
# Compiling tcpdump from source explicitly requires a built libpcap installation
91-
- name: Build and install libpcap
92-
working-directory: libpcap_repo
93-
run: |
94-
./autogen.sh
95-
./configure --prefix=$GITHUB_WORKSPACE/libpcap-install
96-
make -j$(nproc)
97-
make install
98-
9985
- name: Checkout tcpdump
10086
uses: actions/checkout@v4
10187
with:
@@ -111,10 +97,8 @@ jobs:
11197
fetch-depth: 1
11298
- run: |
11399
cd tcpdump_repo
114-
if [ ${{ matrix.fips_ref == 'FIPS' }} ]; then
100+
if [ "${{ matrix.fips_ref }}" = "FIPS" ]; then
115101
patch -p1 < $GITHUB_WORKSPACE/osp/wolfProvider/tcpdump/tcpdump-FIPS-${{ matrix.tcpdump_ref }}-wolfprov.patch
116-
else
117-
patch -p1 < $GITHUB_WORKSPACE/osp/wolfProvider/tcpdump/tcpdump-${{ matrix.tcpdump_ref }}-wolfprov.patch
118102
fi
119103
120104
- name: Build and install tcpdump

0 commit comments

Comments
 (0)