]> tinc-vpn.org Git - tinc/commitdiff
Skip raw socket test if we cannot create veth interfaces
authorGuus Sliepen <guus@tinc-vpn.org>
Sun, 5 Apr 2026 11:20:11 +0000 (13:20 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Sun, 5 Apr 2026 11:22:18 +0000 (13:22 +0200)
.github/workflows/test.yml
test/integration/device_raw_socket.py

index acee787b277f9df53db628f882c0897335148fcf..ee25e874ededb398a81c74515054907897d9c503 100644 (file)
@@ -161,6 +161,9 @@ 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
 
@@ -209,9 +212,6 @@ jobs:
       env:
         CI: 1
     steps:
-      - name: Install Git
-        run: apt update; apt install --no-install-recommends git
-
       - name: Checkout code
         uses: actions/checkout@v6
 
index 15b16e058fb408ff16e8308f8b98dd4b5b272ccb..b489527fcb047300369f834aa11175c77bcd82ae 100755 (executable)
@@ -42,7 +42,11 @@ def test_device_raw_socket(ctx: Test) -> None:
 
     log.info("create a veth pair")
     dev0, dev1 = util.random_string(10), util.random_string(10)
-    veth_add(dev0, dev1)
+    try:
+        veth_add(dev0, dev1)
+    except subp.CalledProcessError:
+        log.info("This test requires network privileges")
+        sys.exit(77)
 
     log.info("configure the veth pair")
     move_dev(dev1, dev1, f"{IP_NETNS}/30")