From: Guus Sliepen Date: Sun, 5 Apr 2026 11:20:11 +0000 (+0200) Subject: Skip raw socket test if we cannot create veth interfaces X-Git-Url: https://www.tinc-vpn.org/git/?a=commitdiff_plain;h=66fab2ed11b12891088ba51d364c825537ed888c;p=tinc Skip raw socket test if we cannot create veth interfaces --- diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index acee787b..ee25e874 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/test/integration/device_raw_socket.py b/test/integration/device_raw_socket.py index 15b16e05..b489527f 100755 --- a/test/integration/device_raw_socket.py +++ b/test/integration/device_raw_socket.py @@ -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")