]> tinc-vpn.org Git - tinc/commitdiff
Get more tests running in containers 1.1
authorGuus Sliepen <guus@tinc-vpn.org>
Mon, 6 Apr 2026 14:29:32 +0000 (16:29 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Mon, 6 Apr 2026 14:29:32 +0000 (16:29 +0200)
.ci/compat/run.sh
.ci/deps.sh
.ci/sanitizers/run.sh
.github/workflows/test.yml
test/integration/commandline.py

index 66308c80f4ca18a422288e92f9f0d145cb3b4cd3..88b580da5e03533c768a8d7c26976d10f4ef717f 100755 (executable)
@@ -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() {
index d585a01df6c5bd2c691d4144bf2a3c4152d7420b..c230afe610fdc79ed4b11cdf0828992f989641dc 100755 (executable)
@@ -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
index bd83bed82f4f1c346011852569680e2623bb87dd..93ebdf94d0bcd171914df308dbf7b70b4cd05c34 100755 (executable)
@@ -4,7 +4,7 @@ set -euo pipefail
 
 dir=$(realpath "$(dirname "$0")")
 
-logs="$GITHUB_WORKSPACE/sanitizer"
+logs="sanitizer"
 
 case "$SANITIZER" in
 undefined)
index e737aea4e3363a86d238dc9b1d21af2a690db0f0..6053a32e9891a0a112679ea28811e15949fd133f 100644 (file)
@@ -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
index d76dfbe71da7820fdcdd1fac2aefaf2c820e6e8a..8366ccd5eecbbdaa3dc4e9450bfbac35d236c6e1 100755 (executable)
@@ -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)