summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2022-04-23 14:22:57 +0100
committerAlexander Larsson <alexander.larsson@gmail.com>2022-05-03 14:02:03 +0200
commit3faa4c1ff2428faba26a5b06a2858c7c0b97cb11 (patch)
tree7df9fe38d4cbf7832ee5e38cbf8de515d12b1587 /tests
parentc991f2dd9a9c1996f6515bbcc6e4817d9d7fe25d (diff)
downloadbubblewrap-3faa4c1ff2428faba26a5b06a2858c7c0b97cb11.tar.gz
tests: Disable leak detection when joining user-specified pid namespace
If we don't do this, AddressSanitizer busy-loops with this backtrace: #0 in sched_yield #1 in __sanitizer::StopTheWorld #2 in __lsan::LockStuffAndStopTheWorldCallback #3 in __GI___dl_iterate_phdr #4 in __lsan::LockStuffAndStopTheWorld #5 in __lsan::CheckForLeaks #6 in __lsan::DoLeakCheck #7 __lsan::DoLeakCheck #8 in __cxa_finalize #9 in __do_global_dtors_aux #10 in ?? #11 in _dl_fini This fixes the hang described in commit 2e3d6e7d, so remove the workarounds from that commit. Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test-specifying-pidns.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/test-specifying-pidns.sh b/tests/test-specifying-pidns.sh
index 5b88af4..de38b97 100755
--- a/tests/test-specifying-pidns.sh
+++ b/tests/test-specifying-pidns.sh
@@ -10,14 +10,13 @@ echo "1..1"
# This test needs user namespaces
if test -n "${bwrap_is_suid:-}"; then
echo "ok - # SKIP no setuid support for --unshare-user"
-elif test -n "${CI_MESON_DIST:-}"; then
- echo "not ok - # TODO this test hangs under 'meson dist' during Github Workflow CI"
else
mkfifo donepipe
$RUN --info-fd 42 --unshare-user --unshare-pid sh -c 'readlink /proc/self/ns/pid > sandbox-pidns; cat < donepipe' >/dev/null 42>info.json &
while ! test -f sandbox-pidns; do sleep 1; done
SANDBOX1PID=$(extract_child_pid info.json)
+ ASAN_OPTIONS=detect_leaks=0 LSAN_OPTIONS=detect_leaks=0 \
$RUN --userns 11 --pidns 12 readlink /proc/self/ns/pid > sandbox2-pidns 11< /proc/$SANDBOX1PID/ns/user 12< /proc/$SANDBOX1PID/ns/pid
echo foo > donepipe