From: Terry Burton Date: Wed, 5 Jan 2022 21:43:17 +0000 (+0000) Subject: CI fixes for FreeBSD (#4351) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88a077edc375aa9be6c085d21a88ec01d21ee826;p=thirdparty%2Ffreeradius-server.git CI fixes for FreeBSD (#4351) * CI FreeBSD: Reenable some tests * CI: Temporary patch for hostapd build Build currently fails on LLVM with FreeBSD. * CI FreeBSD: Cache the eapol_test build --- diff --git a/.github/workflows/ci-freebsd.yml b/.github/workflows/ci-freebsd.yml index 219ce28c81c..cf0c93819ec 100644 --- a/.github/workflows/ci-freebsd.yml +++ b/.github/workflows/ci-freebsd.yml @@ -7,6 +7,10 @@ on: - run-fuzzer** pull_request: +env: + HOSTAPD_BUILD_DIR: eapol_test.ci + HOSTAPD_GIT_TAG: hostap_2_9 + jobs: freebsd-build: @@ -38,13 +42,20 @@ jobs: run: git lfs pull working-directory: freeradius + - name: Restore eapol_test build directory from cache + uses: actions/cache@v2 + id: hostapd-cache + with: + path: ${{ env.HOSTAPD_BUILD_DIR }} + key: hostapd-freebsd-${{ env.HOSTAPD_GIT_TAG }}-v4 + - name: Test using a FreeBSD VirtualBox VM uses: vmactions/freebsd-vm@v0.1.5 with: usesh: true -# sync: sshfs sync: rsync mem: 4096 + envs: 'HOSTAPD_BUILD_DIR HOSTAPD_GIT_TAG' prepare: | pkg install -y \ curl \ @@ -76,13 +87,8 @@ jobs: cd freeradius ./configure gmake -j `sysctl -n hw.ncpu` - # Disable some tests that are currently broken on FreeBSD - # Failing with: talloc type issue - echo > src/lib/server/trunk_tests.mk # Failing with: Failed to send packet for ID 123: udp_send failed: EINVAL: Invalid argument echo 'test.radclient:' > src/tests/radclient/all.mk - echo 'test.digest:' > src/tests/digest/all.mk - echo 'test.radmin:' > src/tests/radmin/all.mk gmake test # diff --git a/scripts/ci/eapol_test-build.sh b/scripts/ci/eapol_test-build.sh index 03f75637533..0797d148539 100755 --- a/scripts/ci/eapol_test-build.sh +++ b/scripts/ci/eapol_test-build.sh @@ -89,6 +89,23 @@ if ! [ -e "${HOSTAPD_DIR}/.git" ] && ! git clone --branch "${HOSTAPD_GIT_TAG}" - exit 1 fi +# +# Required for LLVM builds until 2.10 which includes commit 12388313a0 +# +patch -d "${TMP_BUILD_DIR}/hostapd" -p1 --ignore-whitespace <<'EOF' +--- a/src/radius/radius_client.c ++++ b/src/radius/radius_client.c +@@ -814,7 +814,7 @@ static void radius_client_receive(int sock, void *eloop_ctx, void *sock_ctx) + { + struct radius_client_data *radius = eloop_ctx; + struct hostapd_radius_servers *conf = radius->conf; +- RadiusType msg_type = (RadiusType) sock_ctx; ++ RadiusType msg_type = (uintptr_t) sock_ctx; + int len, roundtrip; + unsigned char buf[3000]; + struct radius_msg *msg; +EOF + cp -n "$BUILD_CONF_FILE" "$WPA_SUPPLICANT_DIR/.config" if ! ${MAKE} -C "${WPA_SUPPLICANT_DIR}" -j8 eapol_test 1>&2 || [ ! -e "${WPA_SUPPLICANT_DIR}/eapol_test" ]; then