Skip to content

Commit

Permalink
Issue #1240: Remove bubblewrap, originally added in DISPATCH-1739
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jiridanek committed Sep 28, 2023
1 parent 97052be commit 19277c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 1 addition & 9 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 19277c3

Please sign in to comment.