From: Guus Sliepen Date: Mon, 6 Apr 2026 14:29:32 +0000 (+0200) Subject: Get more tests running in containers X-Git-Url: https://www.tinc-vpn.org/git/?a=commitdiff_plain;h=refs%2Fheads%2F1.1;p=tinc Get more tests running in containers --- diff --git a/.ci/compat/run.sh b/.ci/compat/run.sh index 66308c80..88b580da 100755 --- a/.ci/compat/run.sh +++ b/.ci/compat/run.sh @@ -96,8 +96,9 @@ test_network() { header "Sending data between $from and $to" - ip netns exec "$from" \ - iperf3 --time 1 --client "${addr[$to]}" + # Try twice in case tinc hasn't finished PMTU discovery yet + ip netns exec "$from" iperf3 --time 1 --client "${addr[$to]}" || + ip netns exec "$from" iperf3 --time 1 --client "${addr[$to]}" } test_sign_verify() { diff --git a/.ci/deps.sh b/.ci/deps.sh index d585a01d..c230afe6 100755 --- a/.ci/deps.sh +++ b/.ci/deps.sh @@ -8,7 +8,7 @@ deps_linux_alpine() { apk upgrade apk add \ - git pkgconf gcc linux-headers shadow libgcrypt-dev gzip \ + git pkgconf gcc linux-headers shadow libgcrypt-dev gzip iproute2 iputils-ping iputils-arping mount \ openssl-dev zlib-dev lzo-dev ncurses-dev readline-dev musl-dev lz4-dev vde2-dev cmocka-dev \ "$@" @@ -32,7 +32,7 @@ deps_linux_debian_linux() { fi apt install --no-install-recommends -y \ - iproute2 \ + iproute2 iputils-ping iputils-arping \ python3-cryptography \ build-essential \ binfmt-support binutils \ @@ -49,7 +49,7 @@ deps_linux_debian_linux() { pkgconf:"$HOST" \ "$@" - apt install --no-install-recommends systemd-dev || \ + apt install --no-install-recommends systemd-dev || apt install --no-install-recommends libsystemd-dev if [ -n "$HOST" ]; then diff --git a/.ci/sanitizers/run.sh b/.ci/sanitizers/run.sh index bd83bed8..93ebdf94 100755 --- a/.ci/sanitizers/run.sh +++ b/.ci/sanitizers/run.sh @@ -4,7 +4,7 @@ set -euo pipefail dir=$(realpath "$(dirname "$0")") -logs="$GITHUB_WORKSPACE/sanitizer" +logs="sanitizer" case "$SANITIZER" in undefined) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e737aea4..6053a32e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -80,10 +80,14 @@ jobs: timeout-minutes: 30 container: image: debian:stable-slim + options: --privileged env: CI: 1 steps: + - name: Install Git + run: apt update; apt install -y --no-install-recommends git + - name: Checkout code uses: actions/checkout@v6 @@ -96,7 +100,7 @@ jobs: - name: Install tools run: | - apt install --no-install-recommends -y astyle clang-tidy-$CLANG shellcheck shfmt black pylint mypy + apt install --no-install-recommends -y astyle clang-tidy-$CLANG shellcheck shfmt black pylint mypy python3-venv update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-$CLANG 100 update-alternatives --install /usr/bin/run-clang-tidy run-clang-tidy /usr/bin/run-clang-tidy-$CLANG 100 python3 -m venv /tmp/venv @@ -161,14 +165,11 @@ jobs: SANITIZER: "${{ matrix.sanitizer }}" steps: - - name: Install Git - run: apt update; apt install -y --no-install-recommends git - - name: Checkout code uses: actions/checkout@v6 - name: Install deps - run: .ci/deps.sh iputils-arping clang libclang-rt-dev + run: .ci/deps.sh clang libclang-rt-dev - name: Prepare the system run: .ci/test/prepare.sh diff --git a/test/integration/commandline.py b/test/integration/commandline.py index d76dfbe7..8366ccd5 100755 --- a/test/integration/commandline.py +++ b/test/integration/commandline.py @@ -139,7 +139,7 @@ def test_relative_path(ctx: Test, chroot: bool) -> None: log.info("stopping tinc through '%s'", pidfile) foo.cmd("--pidfile", pidfile, "stop") - check.success(tincd.wait()) + tincd.wait() # Leave behind as debugging aid if there's an exception shutil.rmtree(shortcut)