From 19277c309ce581e39ebcde9e86a526e763396477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Thu, 28 Sep 2023 13:45:28 +0200 Subject: [PATCH] Issue #1240: Remove bubblewrap, originally added in DISPATCH-1739 Bubblewrap (bwrap) is an unprivileged sandbox, originally meant to guard against port clashes when running tests. During parallel test runs, each `ctest -j` subprocess would run it its own network namespace created by bwrap. Nowadays, the port clashes in test suite were resolved, so we should not need this. It was only enabled by default for Ubuntu jobs on GitHub actions. --- .github/workflows/build.yaml | 3 +-- tests/CMakeLists.txt | 10 +--------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0f6e68225..77eaf7c43 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -75,7 +75,6 @@ jobs: -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_FLAGS=-DQD_MEMORY_DEBUG - -DUSE_BWRAP=ON -DRUNTIME_CHECK=${{matrix.runtimeCheck}} -DSANITIZE_PYTHON=OFF -DBUILD_BENCHMARKS=ON @@ -253,7 +252,7 @@ jobs: - name: Install Linux runtime/test dependencies run: | - sudo apt update; sudo apt install -y libdw1 libsasl2-2 libsasl2-modules sasl2-bin libjsoncpp25 libwebsockets16 libbenchmark1 pixz bubblewrap curl ncat gdb elfutils findutils file python3-dbg + sudo apt update; sudo apt install -y libdw1 libsasl2-2 libsasl2-modules sasl2-bin libjsoncpp25 libwebsockets16 libbenchmark1 pixz curl ncat gdb elfutils findutils file python3-dbg - name: Unpack archive run: tar -I pixz -xf archive.tar.xz diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d4d4ffe79..d1635341c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -70,15 +70,7 @@ target_link_libraries(threaded_timer_test skupper-router) add_executable(adaptor_buffer_test adaptor_buffer_test.c) target_link_libraries(adaptor_buffer_test skupper-router) -# Bubblewrap is an unprivileged sandboxing tool for Linux. Setting --unshare-net allows -# running tests in parallel (the ctest -j option) without port clashes -set(USE_BWRAP OFF CACHE BOOL "Wrap test executions with bwrap (https://github.com/containers/bubblewrap)") -if(USE_BWRAP) - set(BWRAP_ARGS bwrap --bind / / --unshare-net --dev /dev --die-with-parent --) -else() - set(BWRAP_ARGS "") -endif() -set(TEST_WRAP ${BWRAP_ARGS} ${Python_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/run.py) +set(TEST_WRAP ${Python_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/run.py) add_test(unit_tests_size_10000 ${TEST_WRAP} unit_tests_size 10000) add_test(unit_tests_size_512 ${TEST_WRAP} unit_tests_size 512)