Test suite does not seem to work properly when compiling inside /tmp

Author: graywolfCreated Aug 29, 2026Updated Aug 31, 2026

I am trying to update bubblewrap to the newly released 0.12.0, and run into an issue that lot of tests do not pass when the build happens in /tmp. This is on clean checkout of the v0.12.0 git tag.

When the build happens in ~/x/bubblewrap, the result is as follows.

# meson _builddir && meson compile -C _builddir && meson test -C _builddir
The Meson build system
Version: 1.9.0
Source dir: /root/x/bubblewrap
Build dir: /root/x/bubblewrap/_builddir
Build type: native build
Project name: bubblewrap
Project version: 0.12.0
C compiler for the host machine: gcc (gcc 14.3.0 "gcc (GCC) 14.3.0")
C linker for the host machine: gcc ld.bfd 2.44
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C supports arguments -Werror=shadow: YES 
Compiler for C supports arguments -Werror=empty-body: YES 
Compiler for C supports arguments -Werror=strict-prototypes: YES 
Compiler for C supports arguments -Werror=missing-prototypes: YES 
Compiler for C supports arguments -Werror=implicit-function-declaration: YES 
Compiler for C supports arguments -Werror=pointer-arith: YES 
Compiler for C supports arguments -Werror=init-self: YES 
Compiler for C supports arguments -Werror=missing-declarations: YES 
Compiler for C supports arguments -Werror=return-type: YES 
Compiler for C supports arguments -Werror=overflow: YES 
Compiler for C supports arguments -Werror=int-conversion: YES 
Compiler for C supports arguments -Werror=parenthesis: NO 
Compiler for C supports arguments -Werror=incompatible-pointer-types: YES 
Compiler for C supports arguments -Werror=misleading-indentation: YES 
Compiler for C supports arguments -Werror=missing-include-dirs: YES 
Compiler for C supports arguments -Werror=aggregate-return: YES 
Compiler for C supports arguments -Werror=switch-default: YES 
Compiler for C supports arguments -Wswitch-enum: YES 
Compiler for C supports arguments -Wno-missing-field-initializers: YES 
Compiler for C supports arguments -Wno-error=missing-field-initializers: YES 
Compiler for C supports arguments -Werror=format=2: YES 
Compiler for C supports arguments -Werror=format-security: NO 
Program bash found: YES (/gnu/store/kcqgv4gmyg0ckgfkx2x1g785dkp3c192-profile/bin/bash)
Program python3 found: YES (/gnu/store/kcqgv4gmyg0ckgfkx2x1g785dkp3c192-profile/bin/python3)
Found pkg-config: YES (/gnu/store/kcqgv4gmyg0ckgfkx2x1g785dkp3c192-profile/bin/pkg-config) 0.29.2
Run-time dependency libcap found: YES 2.64
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency libselinux found: NO (tried pkgconfig and cmake)
Configuring config.h using configuration
Program xsltproc found: NO
Run-time dependency bash-completion found: NO (tried pkgconfig and cmake)
Build targets in project: 3

Found ninja-1.13.2 at /gnu/store/kcqgv4gmyg0ckgfkx2x1g785dkp3c192-profile/bin/ninja
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /gnu/store/kcqgv4gmyg0ckgfkx2x1g785dkp3c192-profile/bin/ninja -C /root/x/bubblewrap/_builddir
ninja: Entering directory `/root/x/bubblewrap/_builddir'
[12/12] Linking target bwrap
ninja: Entering directory `/root/x/bubblewrap/_builddir'
ninja: no work to do.
1/6 test-utils                       OK              0.02s   26 subtests passed
2/6 test-seccomp.py                  SKIP            0.08s
3/6 test-run.sh                      ERROR           0.22s   exit status 1
>>> UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 G_TEST_SRCDIR=/root/x/bubblewrap/tests/.. ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 MALLOC_PERTURB_=67 BWRAP=/root/x/bubblewrap/_builddir/bwrap MESON_TEST_ITERATION=1 G_TEST_BUILDDIR=/root/x/bubblewrap/_builddir/tests/.. /gnu/store/kcqgv4gmyg0ckgfkx2x1g785dkp3c192-profile/bin/bash /root/x/bubblewrap/_builddir/../tests/test-run.sh

4/6 test-specifying-pidns.sh         OK              1.05s   1 subtests passed
5/6 test-specifying-userns.sh        OK              1.05s   1 subtests passed
6/6 test-sandbox.py                  OK              5.49s   68 subtests passed

Ok:                4   
Fail:              1   
Skipped:           1   

Full log written to /root/x/bubblewrap/_builddir/meson-logs/testlog.txt

I did not dig into the test-run.sh failures yet, but the test-sandbox.py passes (after I add inetutils for the `hostname' command).

However, when you compare it to a run in /tmp/bubblewrap, we see the following:

# meson _builddir && meson compile -C _builddir && meson test -C _builddir
The Meson build system
Version: 1.9.0
Source dir: /tmp/bubblewrap
Build dir: /tmp/bubblewrap/_builddir
Build type: native build
Project name: bubblewrap
Project version: 0.12.0
C compiler for the host machine: gcc (gcc 14.3.0 "gcc (GCC) 14.3.0")
C linker for the host machine: gcc ld.bfd 2.44
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C supports arguments -Werror=shadow: YES 
Compiler for C supports arguments -Werror=empty-body: YES 
Compiler for C supports arguments -Werror=strict-prototypes: YES 
Compiler for C supports arguments -Werror=missing-prototypes: YES 
Compiler for C supports arguments -Werror=implicit-function-declaration: YES 
Compiler for C supports arguments -Werror=pointer-arith: YES 
Compiler for C supports arguments -Werror=init-self: YES 
Compiler for C supports arguments -Werror=missing-declarations: YES 
Compiler for C supports arguments -Werror=return-type: YES 
Compiler for C supports arguments -Werror=overflow: YES 
Compiler for C supports arguments -Werror=int-conversion: YES 
Compiler for C supports arguments -Werror=parenthesis: NO 
Compiler for C supports arguments -Werror=incompatible-pointer-types: YES 
Compiler for C supports arguments -Werror=misleading-indentation: YES 
Compiler for C supports arguments -Werror=missing-include-dirs: YES 
Compiler for C supports arguments -Werror=aggregate-return: YES 
Compiler for C supports arguments -Werror=switch-default: YES 
Compiler for C supports arguments -Wswitch-enum: YES 
Compiler for C supports arguments -Wno-missing-field-initializers: YES 
Compiler for C supports arguments -Wno-error=missing-field-initializers: YES 
Compiler for C supports arguments -Werror=format=2: YES 
Compiler for C supports arguments -Werror=format-security: NO 
Program bash found: YES (/gnu/store/kcqgv4gmyg0ckgfkx2x1g785dkp3c192-profile/bin/bash)
Program python3 found: YES (/gnu/store/kcqgv4gmyg0ckgfkx2x1g785dkp3c192-profile/bin/python3)
Found pkg-config: YES (/gnu/store/kcqgv4gmyg0ckgfkx2x1g785dkp3c192-profile/bin/pkg-config) 0.29.2
Run-time dependency libcap found: YES 2.64
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency libselinux found: NO (tried pkgconfig and cmake)
Configuring config.h using configuration
Program xsltproc found: NO
Run-time dependency bash-completion found: NO (tried pkgconfig and cmake)
Build targets in project: 3

Found ninja-1.13.2 at /gnu/store/kcqgv4gmyg0ckgfkx2x1g785dkp3c192-profile/bin/ninja
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /gnu/store/kcqgv4gmyg0ckgfkx2x1g785dkp3c192-profile/bin/ninja -C /tmp/bubblewrap/_builddir
ninja: Entering directory `/tmp/bubblewrap/_builddir'
[12/12] Linking target bwrap
ninja: Entering directory `/tmp/bubblewrap/_builddir'
ninja: no work to do.
1/6 test-utils                       OK              0.02s   26 subtests passed
2/6 test-seccomp.py                  SKIP            0.07s
3/6 test-run.sh                      ERROR           0.22s   exit status 1
>>> MESON_TEST_ITERATION=1 MALLOC_PERTURB_=185 MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 BWRAP=/tmp/bubblewrap/_builddir/bwrap ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 G_TEST_SRCDIR=/tmp/bubblewrap/tests/.. G_TEST_BUILDDIR=/tmp/bubblewrap/_builddir/tests/.. /gnu/store/kcqgv4gmyg0ckgfkx2x1g785dkp3c192-profile/bin/bash /tmp/bubblewrap/_builddir/../tests/test-run.sh

4/6 test-specifying-pidns.sh         OK              1.05s   1 subtests passed
5/6 test-specifying-userns.sh        OK              1.05s   1 subtests passed
6/6 test-sandbox.py                  ERROR           1.09s   exit status 1
>>> MESON_TEST_ITERATION=1 MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 BWRAP=/tmp/bubblewrap/_builddir/bwrap ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 MALLOC_PERTURB_=46 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 G_TEST_SRCDIR=/tmp/bubblewrap/tests/.. G_TEST_BUILDDIR=/tmp/bubblewrap/_builddir/tests/.. /gnu/store/kcqgv4gmyg0ckgfkx2x1g785dkp3c192-profile/bin/python3 /tmp/bubblewrap/_builddir/../tests/test-sandbox.py


Ok:                3   
Fail:              2   
Skipped:           1   

Full log written to /tmp/bubblewrap/_builddir/meson-logs/testlog.txt

Most (all?) tests in test-sandbox.py fail:

python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory
python3: can't open file '/tmp/bubblewrap/tests/sandbox_helper.py': [Errno 2] No such file or directory

Full log is attached. testlog.txt

This is problematic, since all our builds happen under /tmp.