containers / containers/bubblewrap

some tests fail in an LXC environment where some but not all capabilities are available

Open
#352 15 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
8.7k
Forks
386
Avg merge
3d 17h
Merged PRs (30d)
11

Description

```
+ /usr/bin/make -O -j48 V=1 VERBOSE=1 check -j1
/usr/bin/make test-bwrap
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0'
rm -rf test-bwrap
cp bwrap test-bwrap
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0'
/usr/bin/make check-TESTS
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0'
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0'
PASS: tests/test-run.sh 1 - Help works
SKIP: tests/test-run.sh 2 # SKIP no FUSE support
PASS: tests/test-run.sh 3 - can mount /proc with
PASS: tests/test-run.sh 4 - can unshare network, create new /dev with
PASS: tests/test-run.sh 5 - cannot read /etc/shadow with
PASS: tests/test-run.sh 6 - cannot read /root/.bashrc with
PASS: tests/test-run.sh 7 - can bind a destination over a symlink
SKIP: tests/test-run.sh 8 # SKIP no FUSE support
PASS: tests/test-run.sh 9 - can mount /proc with --unshare-user-try
PASS: tests/test-run.sh 10 - can unshare network, create new /dev with --unshare-user-try
PASS: tests/test-run.sh 11 - cannot read /etc/shadow with --unshare-user-try
PASS: tests/test-run.sh 12 - cannot read /root/.bashrc with --unshare-user-try
PASS: tests/test-run.sh 13 - can bind a destination over a symlink
SKIP: tests/test-run.sh 14 # SKIP no FUSE support
PASS: tests/test-run.sh 15 - can mount /proc with --unshare-pid
PASS: tests/test-run.sh 16 - can unshare network, create new /dev with --unshare-pid
PASS: tests/test-run.sh 17 - cannot read /etc/shadow with --unshare-pid
PASS: tests/test-run.sh 18 - cannot read /root/.bashrc with --unshare-pid
PASS: tests/test-run.sh 19 - can bind a destination over a symlink
SKIP: tests/test-run.sh 20 # SKIP no FUSE support
PASS: tests/test-run.sh 21 - can mount /proc with --unshare-user-try --unshare-pid
PASS: tests/test-run.sh 22 - can unshare network, create new /dev with --unshare-user-try --unshare-pid
PASS: tests/test-run.sh 23 - cannot read /etc/shadow with --unshare-user-try --unshare-pid
PASS: tests/test-run.sh 24 - cannot read /root/.bashrc with --unshare-user-try --unshare-pid
PASS: tests/test-run.sh 25 - can bind a destination over a symlink
PASS: tests/test-run.sh 26 - all expected devices were created
PASS: tests/test-run.sh 27 - can run as pid 1
PASS: tests/test-run.sh 28 info and json-status fd
PASS: tests/test-run.sh 29 namespace id info in info and json-status fd
PASS: tests/test-run.sh 30 pre-exec failure doesn't include exit-code in json-status
PASS: tests/test-run.sh 31 exec failure doesn't include exit-code in json-status
PASS: tests/test-run.sh 32 - can mount /proc recursively
PASS: tests/test-run.sh 33 - can pivot to new rootfs recursively
PASS: tests/test-run.sh 34 error prefxing
PASS: tests/test-run.sh 35 - we have no caps as uid != 0
ERROR: tests/test-run.sh - too few tests run (expected 49, got 35)
ERROR: tests/test-run.sh - exited with status 127 (command not found?)
========================================
bubblewrap 0.4.0: ./test-suite.log
========================================

# TOTAL: 37
# PASS: 31
# SKIP: 4
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 2

.. contents:: :depth: 2

ERROR: tests/test-run.sh
========================

+ PATH=/home/tkloczko/.local/bin:/home/tkloczko/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/usr/sbin:/sbin
+++ dirname ./tests/test-run.sh
++ cd ./tests
++ pwd
+ srcd=/home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/tests
+ . /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/tests/libtest-core.sh
++ locale -a
++ grep C.UTF-8
++ export LC_ALL=C
++ LC_ALL=C
++ export G_DEBUG=fatal-warnings
++ G_DEBUG=fatal-warnings
++ basename ./tests/test-run.sh
+ bn=test-run.sh
++ mktemp -d /var/tmp/tap-test.XXXXXX
+ tempdir=/var/tmp/tap-test.fkr6ZR
+ touch /var/tmp/tap-test.fkr6ZR/.testtmp
+ trap cleanup EXIT
+ cd /var/tmp/tap-test.fkr6ZR
+ : /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap
++ type -p /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap
+ test -u /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap
+ FUSE_DIR=
++ cat /proc/self/mounts
++ grep ' fuse[. ]'
++ awk '{print $2}'
+++ id -u
++ grep user_id=1000
++ id -u
+ test 1000 = 0
+ is_uidzero=false
+ UNREADABLE=/root/.bashrc
+ false
++ dirname /root/.bashrc
+ test -x /root
+ '[' /lib -ef /usr/lib ']'
+ BWRAP_RO_HOST_ARGS='--ro-bind /usr /usr
--ro-bind /etc /etc
--dir /var/tmp
--symlink usr/lib /lib
--symlink usr/lib64 /lib64
--symlink usr/bin /bin
--symlink usr/sbin /sbin
--proc /proc
--dev /dev'
+ RUN='/home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp'
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp true
+ echo 1..49
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --help
+ assert_file_has_content help.txt 'usage: /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap'
+ fpath=help.txt
+ shift
+ for re in "$@"
+ grep -q -e 'usage: /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap' help.txt
+ echo 'ok - Help works'
+ for ALT in "" "--unshare-user-try" "--unshare-pid" "--unshare-user-try --unshare-pid"
+ '[' x '!=' x ']'
+ echo 'ok # SKIP no FUSE support'
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --proc /proc true
1..49
ok - Help works
PASS: tests/test-run.sh 1 - Help works
+ echo 'ok - can mount /proc with '
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --unshare-net --proc /proc --dev /dev true
ok # SKIP no FUSE support
SKIP: tests/test-run.sh 2 # SKIP no FUSE support
+ echo 'ok - can unshare network, create new /dev with '
+ echo -n 'expect EPERM: '
expect EPERM: ok - can mount /proc with
+ test -n ''
+ CAP=
+ false
PASS: tests/test-run.sh 3 - can mount /proc with
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --unshare-net --proc /proc --bind /etc/shadow /tmp/foo cat /etc/shadow
cat: /etc/shadow: Permission denied
+ echo 'ok - cannot read /etc/shadow with '
+ '[' x/root/.bashrc '!=' x ']'
ok - can unshare network, create new /dev with
+ echo -n 'expect EPERM: '
expect EPERM: PASS: tests/test-run.sh 4 - can unshare network, create new /dev with
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --unshare-net --proc /proc --dev /dev --bind /root/.bashrc /tmp/foo cat /tmp/foo
bwrap: Can't find source path /root/.bashrc: Permission denied
+ echo 'ok - cannot read /root/.bashrc with '
ok - cannot read /etc/shadow with
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --dir /tmp/dir --symlink dir /tmp/link --bind /etc /tmp/link true
PASS: tests/test-run.sh 5 - cannot read /etc/shadow with
+ echo 'ok - can bind a destination over a symlink'
+ for ALT in "" "--unshare-user-try" "--unshare-pid" "--unshare-user-try --unshare-pid"
+ '[' x '!=' x ']'
+ echo 'ok # SKIP no FUSE support'
ok - cannot read /root/.bashrc with
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --unshare-user-try --proc /proc true
PASS: tests/test-run.sh 6 - cannot read /root/.bashrc with
ok - can bind a destination over a symlink
PASS: tests/test-run.sh 7 - can bind a destination over a symlink
+ echo 'ok - can mount /proc with --unshare-user-try'
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --unshare-user-try --unshare-net --proc /proc --dev /dev true
ok # SKIP no FUSE support
SKIP: tests/test-run.sh 8 # SKIP no FUSE support
+ echo 'ok - can unshare network, create new /dev with --unshare-user-try'
+ echo -n 'expect EPERM: '
expect EPERM: ok - can mount /proc with --unshare-user-try
+ test -n ''
+ CAP=
+ false
PASS: tests/test-run.sh 9 - can mount /proc with --unshare-user-try
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --unshare-user-try --unshare-net --proc /proc --bind /etc/shadow /tmp/foo cat /etc/shadow
cat: /etc/shadow: Permission denied
+ echo 'ok - cannot read /etc/shadow with --unshare-user-try'
+ '[' x/root/.bashrc '!=' x ']'
ok - can unshare network, create new /dev with --unshare-user-try
+ echo -n 'expect EPERM: '
expect EPERM: PASS: tests/test-run.sh 10 - can unshare network, create new /dev with --unshare-user-try
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --unshare-user-try --unshare-net --proc /proc --dev /dev --bind /root/.bashrc /tmp/foo cat /tmp/foo
bwrap: Can't find source path /root/.bashrc: Permission denied
+ echo 'ok - cannot read /root/.bashrc with --unshare-user-try'
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --unshare-user-try --dir /tmp/dir --symlink dir /tmp/link --bind /etc /tmp/link true
ok - cannot read /etc/shadow with --unshare-user-try
PASS: tests/test-run.sh 11 - cannot read /etc/shadow with --unshare-user-try
+ echo 'ok - can bind a destination over a symlink'
+ for ALT in "" "--unshare-user-try" "--unshare-pid" "--unshare-user-try --unshare-pid"
+ '[' x '!=' x ']'
+ echo 'ok # SKIP no FUSE support'
ok - cannot read /root/.bashrc with --unshare-user-try
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --unshare-pid --proc /proc true
PASS: tests/test-run.sh 12 - cannot read /root/.bashrc with --unshare-user-try
ok - can bind a destination over a symlink
PASS: tests/test-run.sh 13 - can bind a destination over a symlink
+ echo 'ok - can mount /proc with --unshare-pid'
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --unshare-pid --unshare-net --proc /proc --dev /dev true
ok # SKIP no FUSE support
SKIP: tests/test-run.sh 14 # SKIP no FUSE support
+ echo 'ok - can unshare network, create new /dev with --unshare-pid'
+ echo -n 'expect EPERM: '
expect EPERM: + test -n ''
ok - can mount /proc with --unshare-pid
+ CAP=
+ false
PASS: tests/test-run.sh 15 - can mount /proc with --unshare-pid
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --unshare-pid --unshare-net --proc /proc --bind /etc/shadow /tmp/foo cat /etc/shadow
cat: /etc/shadow: Permission denied
+ echo 'ok - cannot read /etc/shadow with --unshare-pid'
+ '[' x/root/.bashrc '!=' x ']'
+ echo -n 'expect EPERM: '
expect EPERM: ok - can unshare network, create new /dev with --unshare-pid
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --unshare-pid --unshare-net --proc /proc --dev /dev --bind /root/.bashrc /tmp/foo cat /tmp/foo
PASS: tests/test-run.sh 16 - can unshare network, create new /dev with --unshare-pid
bwrap: Can't find source path /root/.bashrc: Permission denied
+ echo 'ok - cannot read /root/.bashrc with --unshare-pid'
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --unshare-pid --dir /tmp/dir --symlink dir /tmp/link --bind /etc /tmp/link true
ok - cannot read /etc/shadow with --unshare-pid
PASS: tests/test-run.sh 17 - cannot read /etc/shadow with --unshare-pid
+ echo 'ok - can bind a destination over a symlink'
+ for ALT in "" "--unshare-user-try" "--unshare-pid" "--unshare-user-try --unshare-pid"
+ '[' x '!=' x ']'
+ echo 'ok # SKIP no FUSE support'
ok - cannot read /root/.bashrc with --unshare-pid
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --unshare-user-try --unshare-pid --proc /proc true
PASS: tests/test-run.sh 18 - cannot read /root/.bashrc with --unshare-pid
ok - can bind a destination over a symlink
PASS: tests/test-run.sh 19 - can bind a destination over a symlink
+ echo 'ok - can mount /proc with --unshare-user-try --unshare-pid'
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --unshare-user-try --unshare-pid --unshare-net --proc /proc --dev /dev true
ok # SKIP no FUSE support
SKIP: tests/test-run.sh 20 # SKIP no FUSE support
+ echo 'ok - can unshare network, create new /dev with --unshare-user-try --unshare-pid'
+ echo -n 'expect EPERM: '
expect EPERM: + test -n ''
ok - can mount /proc with --unshare-user-try --unshare-pid
+ CAP=
+ false
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --unshare-user-try --unshare-pid --unshare-net --proc /proc --bind /etc/shadow /tmp/foo cat /etc/shadow
PASS: tests/test-run.sh 21 - can mount /proc with --unshare-user-try --unshare-pid
cat: /etc/shadow: Permission denied
+ echo 'ok - cannot read /etc/shadow with --unshare-user-try --unshare-pid'
+ '[' x/root/.bashrc '!=' x ']'
ok - can unshare network, create new /dev with --unshare-user-try --unshare-pid
+ echo -n 'expect EPERM: '
expect EPERM: PASS: tests/test-run.sh 22 - can unshare network, create new /dev with --unshare-user-try --unshare-pid
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --unshare-user-try --unshare-pid --unshare-net --proc /proc --dev /dev --bind /root/.bashrc /tmp/foo cat /tmp/foo
bwrap: Can't find source path /root/.bashrc: Permission denied
+ echo 'ok - cannot read /root/.bashrc with --unshare-user-try --unshare-pid'
ok - cannot read /etc/shadow with --unshare-user-try --unshare-pid
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --unshare-user-try --unshare-pid --dir /tmp/dir --symlink dir /tmp/link --bind /etc /tmp/link true
PASS: tests/test-run.sh 23 - cannot read /etc/shadow with --unshare-user-try --unshare-pid
+ echo 'ok - can bind a destination over a symlink'
ok - cannot read /root/.bashrc with --unshare-user-try --unshare-pid
PASS: tests/test-run.sh 24 - cannot read /root/.bashrc with --unshare-user-try --unshare-pid
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --unshare-pid --dev /dev ls -al /dev/stdin /dev/stdout /dev/stderr /dev/null /dev/random /dev/urandom /dev/fd /dev/core
+ echo 'ok - all expected devices were created'
ok - can bind a destination over a symlink
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --unshare-pid --as-pid-1 --bind / / bash -c 'echo $$'
PASS: tests/test-run.sh 25 - can bind a destination over a symlink
/usr/share/lmod/lmod/init/bash: line 124: /dev/null: Permission denied
+ assert_file_has_content as_pid_1.txt 1
+ fpath=as_pid_1.txt
+ shift
+ for re in "$@"
+ grep -q -e 1 as_pid_1.txt
+ echo 'ok - can run as pid 1'
ok - all expected devices were created
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --unshare-all --info-fd 42 --json-status-fd 43 -- bash -c 'exit 42'
PASS: tests/test-run.sh 26 - all expected devices were created
+ assert_file_has_content info.json '"child-pid": [0-9]'
+ fpath=info.json
+ shift
+ for re in "$@"
+ grep -q -e '"child-pid": [0-9]' info.json
+ assert_file_has_content json-status.json '"child-pid": [0-9]'
+ fpath=json-status.json
+ shift
+ for re in "$@"
+ grep -q -e '"child-pid": [0-9]' json-status.json
+ assert_file_has_content_literal json-status.json '"exit-code": 42'
+ grep -q -F -e '"exit-code": 42' json-status.json
+ echo 'ok info and json-status fd'
ok - can run as pid 1
PASS: tests/test-run.sh 27 - can run as pid 1
++ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --proc /proc --unshare-all --info-fd 42 --json-status-fd 43 -- bash -c 'stat -L --format "%n %i" /proc/self/ns/*'
+ DATA='/proc/self/ns/cgroup 4026535433
/proc/self/ns/ipc 4026535429
/proc/self/ns/mnt 4026535427
/proc/self/ns/net 4026536379
/proc/self/ns/pid 4026535430
/proc/self/ns/pid_for_children 4026535430
/proc/self/ns/user 4026535422
/proc/self/ns/uts 4026535428'
+ for NS in "ipc" "mnt" "net" "pid" "uts"
++ echo '/proc/self/ns/cgroup 4026535433
/proc/self/ns/ipc 4026535429
/proc/self/ns/mnt 4026535427
/proc/self/ns/net 4026536379
/proc/self/ns/pid 4026535430
/proc/self/ns/pid_for_children 4026535430
/proc/self/ns/user 4026535422
/proc/self/ns/uts 4026535428'
++ grep /proc/self/ns/ipc
++ awk '{print $2}'
+ want=4026535429
+ assert_file_has_content info.json 4026535429
+ fpath=info.json
+ shift
+ for re in "$@"
+ grep -q -e 4026535429 info.json
+ assert_file_has_content json-status.json 4026535429
+ fpath=json-status.json
+ shift
+ for re in "$@"
+ grep -q -e 4026535429 json-status.json
+ for NS in "ipc" "mnt" "net" "pid" "uts"
++ echo '/proc/self/ns/cgroup 4026535433
/proc/self/ns/ipc 4026535429
/proc/self/ns/mnt 4026535427
/proc/self/ns/net 4026536379
/proc/self/ns/pid 4026535430
/proc/self/ns/pid_for_children 4026535430
/proc/self/ns/user 4026535422
/proc/self/ns/uts 4026535428'
++ grep /proc/self/ns/mnt
++ awk '{print $2}'
+ want=4026535427
+ assert_file_has_content info.json 4026535427
+ fpath=info.json
+ shift
+ for re in "$@"
+ grep -q -e 4026535427 info.json
+ assert_file_has_content json-status.json 4026535427
+ fpath=json-status.json
+ shift
+ for re in "$@"
+ grep -q -e 4026535427 json-status.json
+ for NS in "ipc" "mnt" "net" "pid" "uts"
++ echo '/proc/self/ns/cgroup 4026535433
/proc/self/ns/ipc 4026535429
/proc/self/ns/mnt 4026535427
/proc/self/ns/net 4026536379
/proc/self/ns/pid 4026535430
/proc/self/ns/pid_for_children 4026535430
/proc/self/ns/user 4026535422
/proc/self/ns/uts 4026535428'
++ grep /proc/self/ns/net
++ awk '{print $2}'
+ want=4026536379
+ assert_file_has_content info.json 4026536379
+ fpath=info.json
+ shift
+ for re in "$@"
+ grep -q -e 4026536379 info.json
+ assert_file_has_content json-status.json 4026536379
+ fpath=json-status.json
+ shift
+ for re in "$@"
+ grep -q -e 4026536379 json-status.json
+ for NS in "ipc" "mnt" "net" "pid" "uts"
++ echo '/proc/self/ns/cgroup 4026535433
/proc/self/ns/ipc 4026535429
/proc/self/ns/mnt 4026535427
/proc/self/ns/net 4026536379
/proc/self/ns/pid 4026535430
/proc/self/ns/pid_for_children 4026535430
/proc/self/ns/user 4026535422
/proc/self/ns/uts 4026535428'
++ grep /proc/self/ns/pid
++ awk '{print $2}'
+ want='4026535430
4026535430'
+ assert_file_has_content info.json '4026535430
4026535430'
+ fpath=info.json
+ shift
+ for re in "$@"
+ grep -q -e '4026535430
4026535430' info.json
+ assert_file_has_content json-status.json '4026535430
4026535430'
+ fpath=json-status.json
+ shift
+ for re in "$@"
+ grep -q -e '4026535430
4026535430' json-status.json
+ for NS in "ipc" "mnt" "net" "pid" "uts"
++ echo '/proc/self/ns/cgroup 4026535433
/proc/self/ns/ipc 4026535429
/proc/self/ns/mnt 4026535427
/proc/self/ns/net 4026536379
/proc/self/ns/pid 4026535430
/proc/self/ns/pid_for_children 4026535430
/proc/self/ns/user 4026535422
/proc/self/ns/uts 4026535428'
++ grep /proc/self/ns/uts
++ awk '{print $2}'
+ want=4026535428
+ assert_file_has_content info.json 4026535428
+ fpath=info.json
+ shift
+ for re in "$@"
+ grep -q -e 4026535428 info.json
+ assert_file_has_content json-status.json 4026535428
+ fpath=json-status.json
+ shift
+ for re in "$@"
+ grep -q -e 4026535428 json-status.json
+ echo 'ok namespace id info in info and json-status fd'
ok info and json-status fd
+ which strace
PASS: tests/test-run.sh 28 info and json-status fd
ok namespace id info in info and json-status fd
PASS: tests/test-run.sh 29 namespace id info in info and json-status fd
+ strace -h
+ grep -v -e default
+ grep -e fault
/usr/bin/strace
options: trace, abbrev, verbose, raw, signal, read, write, fault,
+ strace -o /dev/null -f -e trace=prctl -e fault=prctl:when=39 /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --die-with-parent --json-status-fd 42 true
bwrap: can't set dumpable: Function not implemented
+ assert_not_file_has_content json-status.json '"exit-code": [0-9]'
+ fpath=json-status.json
+ shift
+ for re in "$@"
+ grep -q -e '"exit-code": [0-9]' json-status.json
+ echo 'ok pre-exec failure doesn'\''t include exit-code in json-status'
+ notanexecutable=/
-e fault=SET[:error=ERRNO][:when=WHEN], --fault=SET[:error=ERRNO][:when=WHEN]
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --json-status-fd 42 /
bwrap: execvp /: Permission denied
+ true
+ assert_not_file_has_content json-status.json '"exit-code": [0-9]'
+ fpath=json-status.json
+ shift
+ for re in "$@"
+ grep -q -e '"exit-code": [0-9]' json-status.json
+ echo 'ok exec failure doesn'\''t include exit-code in json-status'
ok pre-exec failure doesn't include exit-code in json-status
PASS: tests/test-run.sh 30 pre-exec failure doesn't include exit-code in json-status
+ test -n ''
+ BWRAP_RECURSE='/home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --unshare-all --uid 0 --gid 0 --cap-add ALL --bind / / --bind /proc /proc'
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --unshare-all --uid 0 --gid 0 --cap-add ALL --bind / / --bind /proc /proc -- /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --unshare-all --bind / / --bind /proc /proc echo hello
+ assert_file_has_content recursive_proc.txt hello
+ fpath=recursive_proc.txt
+ shift
+ for re in "$@"
+ grep -q -e hello recursive_proc.txt
+ echo 'ok - can mount /proc recursively'
ok exec failure doesn't include exit-code in json-status
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --unshare-all --uid 0 --gid 0 --cap-add ALL --bind / / --bind /proc /proc -- /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --unshare-all --ro-bind /usr /usr --ro-bind /etc /etc --dir /var/tmp --symlink usr/lib /lib --symlink usr/lib64 /lib64 --symlink usr/bin /bin --symlink usr/sbin /sbin --proc /proc --dev /dev findmnt
PASS: tests/test-run.sh 31 exec failure doesn't include exit-code in json-status
+ assert_file_has_content recursive-newroot.txt /usr
+ fpath=recursive-newroot.txt
+ shift
+ for re in "$@"
+ grep -q -e /usr recursive-newroot.txt
+ echo 'ok - can pivot to new rootfs recursively'
ok - can mount /proc recursively
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --unshare-pid --bind /source-enoent /dest true
PASS: tests/test-run.sh 32 - can mount /proc recursively
+ assert_file_has_content err.txt '^bwrap: Can'\''t find source path.*source-enoent'
+ fpath=err.txt
+ shift
+ for re in "$@"
+ grep -q -e '^bwrap: Can'\''t find source path.*source-enoent' err.txt
+ echo 'ok error prefxing'
ok - can pivot to new rootfs recursively
PASS: tests/test-run.sh 33 - can pivot to new rootfs recursively
+ false
+ for OPT in "" "--unshare-user-try --as-pid-1" "--unshare-user-try" "--as-pid-1"
+ e=0
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --unshare-pid getpcaps 1
ok error prefxing
PASS: tests/test-run.sh 34 error prefxing
+ sed -e 's/^/# /'
+ test 0 = 0
+ assert_not_file_has_content caps.test ': =.*cap'
+ fpath=caps.test
+ shift
+ for re in "$@"
+ grep -q -e ': =.*cap' caps.test
+ for OPT in "" "--unshare-user-try --as-pid-1" "--unshare-user-try" "--as-pid-1"
+ e=0
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --unshare-user-try --as-pid-1 --unshare-pid getpcaps 1
1: =
+ sed -e 's/^/# /'
+ test 0 = 0
+ assert_not_file_has_content caps.test ': =.*cap'
+ fpath=caps.test
+ shift
+ for re in "$@"
+ grep -q -e ': =.*cap' caps.test
+ for OPT in "" "--unshare-user-try --as-pid-1" "--unshare-user-try" "--as-pid-1"
+ e=0
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --unshare-user-try --unshare-pid getpcaps 1
1: =
+ sed -e 's/^/# /'
+ test 0 = 0
+ assert_not_file_has_content caps.test ': =.*cap'
+ fpath=caps.test
+ shift
+ for re in "$@"
+ grep -q -e ': =.*cap' caps.test
+ for OPT in "" "--unshare-user-try --as-pid-1" "--unshare-user-try" "--as-pid-1"
+ e=0
+ /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --as-pid-1 --unshare-pid getpcaps 1
1: =
+ sed -e 's/^/# /'
+ test 0 = 0
+ assert_not_file_has_content caps.test ': =.*cap'
+ fpath=caps.test
+ shift
+ for re in "$@"
+ grep -q -e ': =.*cap' caps.test
+ echo 'ok - we have no caps as uid != 0'
+ cat
1: =
+ chmod a+x lockf-n.py
+ touch lock
+ for die_with_parent_argv in "--die-with-parent" "--die-with-parent --unshare-pid"
+ childshellpid=942166
++ seq 10
++ pwd
+ /bin/bash -c 'while true; do /home/tkloczko/rpmbuild/BUILD/bubblewrap-0.4.0/test-bwrap --bind / / --tmpfs /tmp --die-with-parent --lock-file /var/tmp/tap-test.fkr6ZR/lock sleep 1h; done'
+ for x in $(seq 10)
+ ./lockf-n.py ./lock nowait
/usr/bin/env: 'python': No such file or directory
+ break
+ ./lockf-n.py ./lock nowait
/usr/bin/env: 'python': No such file or directory
+ kill -9 942166
+ ./lockf-n.py ./lock wait
/usr/bin/env: 'python': No such file or directory
./tests/test-run.sh: line 247: 942166 Killed /bin/bash -c "while true; do $RUN ${die_with_parent_argv} --lock-file $(pwd)/lock sleep 1h; done"
+ cleanup
+ test -n ''
+ test -f /var/tmp/tap-test.fkr6ZR/.test
ok - we have no caps as uid != 0
PASS: tests/test-run.sh 35 - we have no caps as uid != 0
ERROR: tests/test-run.sh - too few tests run (expected 49, got 35)
ERROR: tests/test-run.sh - exited with status 127 (command not found?)

============================================================================
Testsuite summary for bubblewrap 0.4.0
============================================================================
# TOTAL: 37
# PASS: 31
# SKIP: 4
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 2
============================================================================
See ./test-suite.log
Please report to atomic-devel@projectatomic.io
============================================================================
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.