Closed thesamesam closed 2 years ago
hm. The test creates a new user-namespace, and then want to write something to /proc/self/uid_map
. That seems not to work on your system. I don't know why.
If that cannot be made work, then we need a patch to skip the test in that case. If that can be made to work, we should better fix it and run the unit tests.
i'd add some
what gives this patch:
diff --git i/tests/nl-test-util.c w/tests/nl-test-util.c
index 68bbb0489767..ffaacc3cebe3 100644
--- i/tests/nl-test-util.c
+++ w/tests/nl-test-util.c
@@ -66,7 +66,8 @@ static void unshare_user(void)
/* Map current UID to root in NS to be created. */
f = fopen("/proc/self/uid_map", "we");
- ck_assert(f);
+ system("ls -la /proc/self/");
+ _nltst_assert_errno(f);
fprintf(f, "0 %d 1", uid);
fclose(f);
and make tests/check-all && CK_FORK=no ./tests/check-all
?
I have a similar, but not identical, test failure. Using a simple ./configure && make && make check, I get:
Testsuite summary for libnl 3.6.0
TOTAL: 2 PASS: 1 SKIP: 0 XFAIL: 0 FAIL: 1 XPASS: 0 ERROR: 0
FAIL: tests/check-all
Running suite(s): main Abstract addresses Netlink attributes Clone ematch tree netns 90%: Checks: 11, Failures: 1, Errors: 0 tests/nl-test-util.c:57:S:Core:cache_and_clone:0: assert(r == 0) failed (errno=22, Invalid argument) FAIL tests/check-all (exit status: 1)
I figured out why tests/nl-test-util.c:57 failed. I needed a kernel configuration: CONFIG_IPC_NS=y
But now I have a new error that I cannot figure out: tests/nl-test-util.c:227:F:Core:cache_and_clone:0: Assertion 'r == 0' failed: r == -10, 0 == 0 FAIL tests/check-all (exit status: 1)
i'd add some
what gives this patch:
diff --git i/tests/nl-test-util.c w/tests/nl-test-util.c index 68bbb0489767..ffaacc3cebe3 100644 --- i/tests/nl-test-util.c +++ w/tests/nl-test-util.c @@ -66,7 +66,8 @@ static void unshare_user(void) /* Map current UID to root in NS to be created. */ f = fopen("/proc/self/uid_map", "we"); - ck_assert(f); + system("ls -la /proc/self/"); + _nltst_assert_errno(f); fprintf(f, "0 %d 1", uid); fclose(f);
FWIW, Gentoo does normally run things in sandboxes for tests, but this seems to happen even when I turn all of them off (including our pid ns sandbox).
All output below is with all sandboxes disabled: FEATURES="-pid-sandbox -sandbox -usersandbox -network-sandbox -ipc-sandbox" (although we want to be able to run them with it on).
Normal 'emake check':
===================================
libnl 3.6.0: ./test-suite.log
===================================
# TOTAL: 1
# PASS: 0
# SKIP: 0
# XFAIL: 0
# FAIL: 1
# XPASS: 0
# ERROR: 0
.. contents:: :depth: 2
FAIL: tests/check-all
=====================
Running suite(s): main
Abstract addresses
Netlink attributes
Clone ematch tree
netns
total 0
dr-xr-xr-x 9 nobody nobody 0 Apr 16 19:24 .
dr-xr-xr-x 722 nobody nobody 0 Apr 16 19:23 ..
-r--r--r-- 1 nobody nobody 0 Apr 16 19:24 arch_status
dr-xr-xr-x 2 nobody nobody 0 Apr 16 19:24 attr
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:24 autogroup
-r-------- 1 nobody nobody 0 Apr 16 19:24 auxv
-r--r--r-- 1 nobody nobody 0 Apr 16 19:24 cgroup
--w------- 1 nobody nobody 0 Apr 16 19:24 clear_refs
-r--r--r-- 1 nobody nobody 0 Apr 16 19:24 cmdline
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:24 comm
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:24 coredump_filter
-r--r--r-- 1 nobody nobody 0 Apr 16 19:24 cpu_resctrl_groups
-r--r--r-- 1 nobody nobody 0 Apr 16 19:24 cpuset
lrwxrwxrwx 1 nobody nobody 0 Apr 16 19:24 cwd -> /var/tmp/portage/dev-libs/libnl-3.6.0/work/libnl-3.6.0-abi_x86_32.x86
-r-------- 1 nobody nobody 0 Apr 16 19:24 environ
lrwxrwxrwx 1 nobody nobody 0 Apr 16 19:24 exe -> /bin/ls
dr-x------ 2 nobody nobody 0 Apr 16 19:24 fd
dr-xr-xr-x 2 nobody nobody 0 Apr 16 19:24 fdinfo
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:24 gid_map
-r-------- 1 nobody nobody 0 Apr 16 19:24 io
-r--r--r-- 1 nobody nobody 0 Apr 16 19:24 limits
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:24 loginuid
dr-x------ 2 nobody nobody 0 Apr 16 19:24 map_files
-r--r--r-- 1 nobody nobody 0 Apr 16 19:24 maps
-rw------- 1 nobody nobody 0 Apr 16 19:24 mem
-r--r--r-- 1 nobody nobody 0 Apr 16 19:24 mountinfo
-r--r--r-- 1 nobody nobody 0 Apr 16 19:24 mounts
-r-------- 1 nobody nobody 0 Apr 16 19:24 mountstats
dr-xr-xr-x 56 nobody nobody 0 Apr 16 19:24 net
dr-x--x--x 2 nobody nobody 0 Apr 16 19:24 ns
-r--r--r-- 1 nobody nobody 0 Apr 16 19:24 numa_maps
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:24 oom_adj
-r--r--r-- 1 nobody nobody 0 Apr 16 19:24 oom_score
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:24 oom_score_adj
-r-------- 1 nobody nobody 0 Apr 16 19:24 pagemap
-r-------- 1 nobody nobody 0 Apr 16 19:24 personality
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:24 projid_map
lrwxrwxrwx 1 nobody nobody 0 Apr 16 19:24 root -> /
-r--r--r-- 1 nobody nobody 0 Apr 16 19:24 schedstat
-r--r--r-- 1 nobody nobody 0 Apr 16 19:24 sessionid
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:24 setgroups
-r--r--r-- 1 nobody nobody 0 Apr 16 19:24 smaps
-r--r--r-- 1 nobody nobody 0 Apr 16 19:24 smaps_rollup
-r-------- 1 nobody nobody 0 Apr 16 19:24 stack
-r--r--r-- 1 nobody nobody 0 Apr 16 19:24 stack_depth
-r--r--r-- 1 nobody nobody 0 Apr 16 19:24 stat
-r--r--r-- 1 nobody nobody 0 Apr 16 19:24 statm
-r--r--r-- 1 nobody nobody 0 Apr 16 19:24 status
-r-------- 1 nobody nobody 0 Apr 16 19:24 syscall
dr-xr-xr-x 3 nobody nobody 0 Apr 16 19:24 task
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:24 timens_offsets
-r--r--r-- 1 nobody nobody 0 Apr 16 19:24 timers
-rw-rw-rw- 1 nobody nobody 0 Apr 16 19:24 timerslack_ns
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:24 uid_map
-r--r--r-- 1 nobody nobody 0 Apr 16 19:24 wchan
90%: Checks: 11, Failures: 1, Errors: 0
/var/tmp/portage/dev-libs/libnl-3.6.0/work/libnl-3.6.0/tests/nl-test-util.c:70:S:Core:cache_and_clone:0: assert(f) failed (errno=13, Permission denied)
FAIL tests/check-all (exit status: 1)
and
make tests/check-all && CK_FORK=no ./tests/check-all
?
Running suite(s): main
Abstract addresses
Netlink attributes
Clone ematch tree
netns
total 0
dr-xr-xr-x 9 nobody nobody 0 Apr 16 19:26 .
dr-xr-xr-x 730 nobody nobody 0 Apr 16 19:26 ..
-r--r--r-- 1 nobody nobody 0 Apr 16 19:26 arch_status
dr-xr-xr-x 2 nobody nobody 0 Apr 16 19:26 attr
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:26 autogroup
-r-------- 1 nobody nobody 0 Apr 16 19:26 auxv
-r--r--r-- 1 nobody nobody 0 Apr 16 19:26 cgroup
--w------- 1 nobody nobody 0 Apr 16 19:26 clear_refs
-r--r--r-- 1 nobody nobody 0 Apr 16 19:26 cmdline
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:26 comm
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:26 coredump_filter
-r--r--r-- 1 nobody nobody 0 Apr 16 19:26 cpu_resctrl_groups
-r--r--r-- 1 nobody nobody 0 Apr 16 19:26 cpuset
lrwxrwxrwx 1 nobody nobody 0 Apr 16 19:26 cwd -> /var/tmp/portage/dev-libs/libnl-3.6.0/work/libnl-3.6.0-abi_x86_32.x86
-r-------- 1 nobody nobody 0 Apr 16 19:26 environ
lrwxrwxrwx 1 nobody nobody 0 Apr 16 19:26 exe -> /bin/ls
dr-x------ 2 nobody nobody 0 Apr 16 19:26 fd
dr-xr-xr-x 2 nobody nobody 0 Apr 16 19:26 fdinfo
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:26 gid_map
-r-------- 1 nobody nobody 0 Apr 16 19:26 io
-r--r--r-- 1 nobody nobody 0 Apr 16 19:26 limits
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:26 loginuid
dr-x------ 2 nobody nobody 0 Apr 16 19:26 map_files
-r--r--r-- 1 nobody nobody 0 Apr 16 19:26 maps
-rw------- 1 nobody nobody 0 Apr 16 19:26 mem
-r--r--r-- 1 nobody nobody 0 Apr 16 19:26 mountinfo
-r--r--r-- 1 nobody nobody 0 Apr 16 19:26 mounts
-r-------- 1 nobody nobody 0 Apr 16 19:26 mountstats
dr-xr-xr-x 56 nobody nobody 0 Apr 16 19:26 net
dr-x--x--x 2 nobody nobody 0 Apr 16 19:26 ns
-r--r--r-- 1 nobody nobody 0 Apr 16 19:26 numa_maps
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:26 oom_adj
-r--r--r-- 1 nobody nobody 0 Apr 16 19:26 oom_score
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:26 oom_score_adj
-r-------- 1 nobody nobody 0 Apr 16 19:26 pagemap
-r-------- 1 nobody nobody 0 Apr 16 19:26 personality
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:26 projid_map
lrwxrwxrwx 1 nobody nobody 0 Apr 16 19:26 root -> /
-r--r--r-- 1 nobody nobody 0 Apr 16 19:26 schedstat
-r--r--r-- 1 nobody nobody 0 Apr 16 19:26 sessionid
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:26 setgroups
-r--r--r-- 1 nobody nobody 0 Apr 16 19:26 smaps
-r--r--r-- 1 nobody nobody 0 Apr 16 19:26 smaps_rollup
-r-------- 1 nobody nobody 0 Apr 16 19:26 stack
-r--r--r-- 1 nobody nobody 0 Apr 16 19:26 stack_depth
-r--r--r-- 1 nobody nobody 0 Apr 16 19:26 stat
-r--r--r-- 1 nobody nobody 0 Apr 16 19:26 statm
-r--r--r-- 1 nobody nobody 0 Apr 16 19:26 status
-r-------- 1 nobody nobody 0 Apr 16 19:26 syscall
dr-xr-xr-x 3 nobody nobody 0 Apr 16 19:26 task
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:26 timens_offsets
-r--r--r-- 1 nobody nobody 0 Apr 16 19:26 timers
-rw-rw-rw- 1 nobody nobody 0 Apr 16 19:26 timerslack_ns
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:26 uid_map
-r--r--r-- 1 nobody nobody 0 Apr 16 19:26 wchan
90%: Checks: 11, Failures: 1, Errors: 0
/var/tmp/portage/dev-libs/libnl-3.6.0/work/libnl-3.6.0/tests/nl-test-util.c:70:S:Core:checked_setup:0: assert(f) failed (errno=13, Permission denied)
* ERROR: dev-libs/libnl-3.6.0::gentoo failed (test phase):
* (no error message)
*
* Call stack:
* ebuild.sh, line 122: Called src_test
* environment, line 4136: Called multilib-minimal_src_test
* environment, line 3050: Called multilib_foreach_abi 'multilib-minimal_abi_src_test'
* environment, line 3258: Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_test'
* environment, line 2940: Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_test'
* environment, line 2938: Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_test'
* environment, line 815: Called multilib-minimal_abi_src_test
* environment, line 3044: Called multilib_src_test
* environment, line 3500: Called die
* The specific snippet of code:
* CK_FORK=no ./tests/check-all || die
... and with sandboxes on (default):
First command:
===================================
libnl 3.6.0: ./test-suite.log
===================================
# TOTAL: 1
# PASS: 0
# SKIP: 0
# XFAIL: 0
# FAIL: 1
# XPASS: 0
# ERROR: 0
.. contents:: :depth: 2
FAIL: tests/check-all
=====================
Running suite(s): main
Abstract addresses
Netlink attributes
Clone ematch tree
netns
total 0
dr-xr-xr-x 9 nobody nobody 0 Apr 16 19:28 .
dr-xr-xr-x 737 nobody nobody 0 Apr 16 19:28 ..
-r--r--r-- 1 nobody nobody 0 Apr 16 19:28 arch_status
dr-xr-xr-x 2 nobody nobody 0 Apr 16 19:28 attr
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:28 autogroup
-r-------- 1 nobody nobody 0 Apr 16 19:28 auxv
-r--r--r-- 1 nobody nobody 0 Apr 16 19:28 cgroup
--w------- 1 nobody nobody 0 Apr 16 19:28 clear_refs
-r--r--r-- 1 nobody nobody 0 Apr 16 19:28 cmdline
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:28 comm
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:28 coredump_filter
-r--r--r-- 1 nobody nobody 0 Apr 16 19:28 cpu_resctrl_groups
-r--r--r-- 1 nobody nobody 0 Apr 16 19:28 cpuset
lrwxrwxrwx 1 nobody nobody 0 Apr 16 19:28 cwd -> /var/tmp/portage/dev-libs/libnl-3.6.0/work/libnl-3.6.0-abi_x86_32.x86
-r-------- 1 nobody nobody 0 Apr 16 19:28 environ
lrwxrwxrwx 1 nobody nobody 0 Apr 16 19:28 exe -> /bin/ls
dr-x------ 2 nobody nobody 0 Apr 16 19:28 fd
dr-xr-xr-x 2 nobody nobody 0 Apr 16 19:28 fdinfo
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:28 gid_map
-r-------- 1 nobody nobody 0 Apr 16 19:28 io
-r--r--r-- 1 nobody nobody 0 Apr 16 19:28 limits
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:28 loginuid
dr-x------ 2 nobody nobody 0 Apr 16 19:28 map_files
-r--r--r-- 1 nobody nobody 0 Apr 16 19:28 maps
-rw------- 1 nobody nobody 0 Apr 16 19:28 mem
-r--r--r-- 1 nobody nobody 0 Apr 16 19:28 mountinfo
-r--r--r-- 1 nobody nobody 0 Apr 16 19:28 mounts
-r-------- 1 nobody nobody 0 Apr 16 19:28 mountstats
dr-xr-xr-x 56 nobody nobody 0 Apr 16 19:28 net
dr-x--x--x 2 nobody nobody 0 Apr 16 19:28 ns
-r--r--r-- 1 nobody nobody 0 Apr 16 19:28 numa_maps
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:28 oom_adj
-r--r--r-- 1 nobody nobody 0 Apr 16 19:28 oom_score
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:28 oom_score_adj
-r-------- 1 nobody nobody 0 Apr 16 19:28 pagemap
-r-------- 1 nobody nobody 0 Apr 16 19:28 personality
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:28 projid_map
lrwxrwxrwx 1 nobody nobody 0 Apr 16 19:28 root -> /
-r--r--r-- 1 nobody nobody 0 Apr 16 19:28 schedstat
-r--r--r-- 1 nobody nobody 0 Apr 16 19:28 sessionid
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:28 setgroups
-r--r--r-- 1 nobody nobody 0 Apr 16 19:28 smaps
-r--r--r-- 1 nobody nobody 0 Apr 16 19:28 smaps_rollup
-r-------- 1 nobody nobody 0 Apr 16 19:28 stack
-r--r--r-- 1 nobody nobody 0 Apr 16 19:28 stack_depth
-r--r--r-- 1 nobody nobody 0 Apr 16 19:28 stat
-r--r--r-- 1 nobody nobody 0 Apr 16 19:28 statm
-r--r--r-- 1 nobody nobody 0 Apr 16 19:28 status
-r-------- 1 nobody nobody 0 Apr 16 19:28 syscall
dr-xr-xr-x 3 nobody nobody 0 Apr 16 19:28 task
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:28 timens_offsets
-r--r--r-- 1 nobody nobody 0 Apr 16 19:28 timers
-rw-rw-rw- 1 nobody nobody 0 Apr 16 19:28 timerslack_ns
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:28 uid_map
-r--r--r-- 1 nobody nobody 0 Apr 16 19:28 wchan
90%: Checks: 11, Failures: 1, Errors: 0
/var/tmp/portage/dev-libs/libnl-3.6.0/work/libnl-3.6.0/tests/nl-test-util.c:70:S:Core:cache_and_clone:0: assert(f) failed (errno=13, Permission denied)
FAIL tests/check-all (exit status: 1)
Second command:
Running suite(s): main
Abstract addresses
Netlink attributes
Clone ematch tree
netns
total 0
dr-xr-xr-x 9 nobody nobody 0 Apr 16 19:27 .
dr-xr-xr-x 737 nobody nobody 0 Apr 16 19:27 ..
-r--r--r-- 1 nobody nobody 0 Apr 16 19:27 arch_status
dr-xr-xr-x 2 nobody nobody 0 Apr 16 19:27 attr
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:27 autogroup
-r-------- 1 nobody nobody 0 Apr 16 19:27 auxv
-r--r--r-- 1 nobody nobody 0 Apr 16 19:27 cgroup
--w------- 1 nobody nobody 0 Apr 16 19:27 clear_refs
-r--r--r-- 1 nobody nobody 0 Apr 16 19:27 cmdline
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:27 comm
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:27 coredump_filter
-r--r--r-- 1 nobody nobody 0 Apr 16 19:27 cpu_resctrl_groups
-r--r--r-- 1 nobody nobody 0 Apr 16 19:27 cpuset
lrwxrwxrwx 1 nobody nobody 0 Apr 16 19:27 cwd -> /var/tmp/portage/dev-libs/libnl-3.6.0/work/libnl-3.6.0-abi_x86_32.x86
-r-------- 1 nobody nobody 0 Apr 16 19:27 environ
lrwxrwxrwx 1 nobody nobody 0 Apr 16 19:27 exe -> /bin/ls
dr-x------ 2 nobody nobody 0 Apr 16 19:27 fd
dr-xr-xr-x 2 nobody nobody 0 Apr 16 19:27 fdinfo
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:27 gid_map
-r-------- 1 nobody nobody 0 Apr 16 19:27 io
-r--r--r-- 1 nobody nobody 0 Apr 16 19:27 limits
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:27 loginuid
dr-x------ 2 nobody nobody 0 Apr 16 19:27 map_files
-r--r--r-- 1 nobody nobody 0 Apr 16 19:27 maps
-rw------- 1 nobody nobody 0 Apr 16 19:27 mem
-r--r--r-- 1 nobody nobody 0 Apr 16 19:27 mountinfo
-r--r--r-- 1 nobody nobody 0 Apr 16 19:27 mounts
-r-------- 1 nobody nobody 0 Apr 16 19:27 mountstats
dr-xr-xr-x 56 nobody nobody 0 Apr 16 19:27 net
dr-x--x--x 2 nobody nobody 0 Apr 16 19:27 ns
-r--r--r-- 1 nobody nobody 0 Apr 16 19:27 numa_maps
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:27 oom_adj
-r--r--r-- 1 nobody nobody 0 Apr 16 19:27 oom_score
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:27 oom_score_adj
-r-------- 1 nobody nobody 0 Apr 16 19:27 pagemap
-r-------- 1 nobody nobody 0 Apr 16 19:27 personality
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:27 projid_map
lrwxrwxrwx 1 nobody nobody 0 Apr 16 19:27 root -> /
-r--r--r-- 1 nobody nobody 0 Apr 16 19:27 schedstat
-r--r--r-- 1 nobody nobody 0 Apr 16 19:27 sessionid
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:27 setgroups
-r--r--r-- 1 nobody nobody 0 Apr 16 19:27 smaps
-r--r--r-- 1 nobody nobody 0 Apr 16 19:27 smaps_rollup
-r-------- 1 nobody nobody 0 Apr 16 19:27 stack
-r--r--r-- 1 nobody nobody 0 Apr 16 19:27 stack_depth
-r--r--r-- 1 nobody nobody 0 Apr 16 19:27 stat
-r--r--r-- 1 nobody nobody 0 Apr 16 19:27 statm
-r--r--r-- 1 nobody nobody 0 Apr 16 19:27 status
-r-------- 1 nobody nobody 0 Apr 16 19:27 syscall
dr-xr-xr-x 3 nobody nobody 0 Apr 16 19:27 task
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:27 timens_offsets
-r--r--r-- 1 nobody nobody 0 Apr 16 19:27 timers
-rw-rw-rw- 1 nobody nobody 0 Apr 16 19:27 timerslack_ns
-rw-r--r-- 1 nobody nobody 0 Apr 16 19:27 uid_map
-r--r--r-- 1 nobody nobody 0 Apr 16 19:27 wchan
90%: Checks: 11, Failures: 1, Errors: 0
/var/tmp/portage/dev-libs/libnl-3.6.0/work/libnl-3.6.0/tests/nl-test-util.c:70:S:Core:checked_setup:0: assert(f) failed (errno=13, Permission denied)
* ERROR: dev-libs/libnl-3.6.0::gentoo failed (test phase):
* (no error message)
I don't know, why it fails with permission-denied.
What gives strace? CK_FORK=no strace -s 10000 ./tests/check-all
?
[{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 12398
rt_sigaction(SIGINT, {sa_handler=0xf7dab080, sa_mask=[], sa_flags=0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=12398, si_uid=65534, si_status=0, si_utime=0, si_stime=0} ---
write(3, "\0\0\0\2\0\0\0K/var/tmp/portage/dev-libs/libnl-3.6.0/work/libnl-3.6.0/tests/nl-test-util.c\0\0\0F", 87) = 87
write(3, "\0\0\0\1\0\0\0.assert(f) failed (errno=13, Permission denied)", 54) = 54
_llseek(3, 0, [0], SEEK_SET) = 0
read(3, "\0\0\0\0\0\0\0\1\0\0\0\2\0\0\0K/var/tmp/portage/dev-libs/libnl-3.6.0/work/libnl-3.6.0/tests/nl-test-util.c\0\0\0\"\0\0\0\2\0\0\0K/var/tmp/portage/dev-libs/libnl-3.6.0/work/libnl-3.6.0/tests/nl-test-util.c\0\0\0W\0\0\0\2\0\0\0K/var/tmp/portage/dev-libs/libnl-3.6.0/work/libnl-3.6.0/tests/nl-test-util.c\0\0\0F\0\0\0\1\0\0\0.assert(f) failed (errno=13, Permission denied)", 8192) = 323
read(3, "", 4096) = 0
close(3) = 0
mmap2(NULL, 8200, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf7a46000
mmap2(NULL, 8200, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf7a43000
readlink("/var", 0xffca2690, 1023) = -1 EINVAL (Invalid argument)
readlink("/var/tmp", 0xffca2690, 1023) = -1 EINVAL (Invalid argument)
readlink("/var/tmp/portage", 0xffca2690, 1023) = -1 EINVAL (Invalid argument)
readlink("/var/tmp/portage/dev-libs", 0xffca2690, 1023) = -1 EINVAL (Invalid argument)
readlink("/var/tmp/portage/dev-libs/libnl-3.6.0", 0xffca2690, 1023) = -1 EINVAL (Invalid argument)
readlink("/var/tmp/portage/dev-libs/libnl-3.6.0/temp", 0xffca2690, 1023) = -1 EINVAL (Invalid argument)
readlink("/var/tmp/portage/dev-libs/libnl-3.6.0/temp/check_XXXXXX", 0xffca2690, 1023) = -1 ENOENT (No such file or directory)
mmap2(NULL, 4104, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf7a41000
statx(AT_FDCWD, "/var", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW|AT_NO_AUTOMOUNT, STATX_BASIC_STATS, {stx_mask=STATX_TYPE|STATX_MODE|STATX_NLINK|STATX_UID|STATX_GID|STATX_MTIME|STATX_CTIME|STATX_INO|STATX_SIZE|STATX_BLOCKS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFDIR|0755, stx_size=16, ...}) = 0
statx(AT_FDCWD, "/var/tmp", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW|AT_NO_AUTOMOUNT, STATX_BASIC_STATS, {stx_mask=STATX_TYPE|STATX_MODE|STATX_NLINK|STATX_UID|STATX_GID|STATX_MTIME|STATX_CTIME|STATX_INO|STATX_SIZE|STATX_BLOCKS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFDIR|S_ISVTX|0777, stx_size=13324, ...}) = 0
statx(AT_FDCWD, "/var/tmp/portage", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW|AT_NO_AUTOMOUNT, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=STATX_ATTR_MOUNT_ROOT, stx_mode=S_IFDIR|0775, stx_size=4096, ...}) = 0
statx(AT_FDCWD, "/var/tmp/portage/dev-libs", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW|AT_NO_AUTOMOUNT, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFDIR|0775, stx_size=4096, ...}) = 0
statx(AT_FDCWD, "/var/tmp/portage/dev-libs/libnl-3.6.0", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW|AT_NO_AUTOMOUNT, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFDIR|0770, stx_size=4096, ...}) = 0
statx(AT_FDCWD, "/var/tmp/portage/dev-libs/libnl-3.6.0/temp", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW|AT_NO_AUTOMOUNT, STATX_BASIC_STATS, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFDIR|0755, stx_size=4096, ...}) = 0
statx(AT_FDCWD, "/var/tmp/portage/dev-libs/libnl-3.6.0/temp/check_XXXXXX", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW|AT_NO_AUTOMOUNT, STATX_BASIC_STATS, 0xffca2c0c) = -1 ENOENT (No such file or directory)
munmap(0xf7a43000, 8200) = 0
munmap(0xf7a46000, 8200) = 0
munmap(0xf7a41000, 4104) = 0
openat(AT_FDCWD, "/var/tmp/portage/dev-libs/libnl-3.6.0/temp/check_KwdZXu", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR)
mmap2(NULL, 8200, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf7a46000
munmap(0xf7a46000, 8200) = 0
unlink("/var/tmp/portage/dev-libs/libnl-3.6.0/temp/check_KwdZXu") = 0
write(1, "90%: Checks: 11, Failures: 1, Errors: 0\n/var/tmp/portage/dev-libs/libnl-3.6.0/work/libnl-3.6.0/tests/nl-test-util.c:70:S:Core:checked_setup:0: assert(f) failed (errno=13, Permission denied)\n", 19090%: Checks: 11, Failures: 1, Errors: 0
/var/tmp/portage/dev-libs/libnl-3.6.0/work/libnl-3.6.0/tests/nl-test-util.c:70:S:Core:checked_setup:0: assert(f) failed (errno=13, Permission denied)
) = 190
close(3) = 0
rt_sigaction(SIGALRM, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, NULL, 8) = 0
rt_sigaction(SIGINT, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, NULL, 8) = 0
rt_sigaction(SIGTERM, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, NULL, 8) = 0
exit_group(1) = ?
+++ exited with 1 +++
* ERROR: dev-libs/libnl-3.6.0::gentoo failed (test phase):
* (no error message)
So, the main lines are:
write(3, "\0\0\0\2\0\0\0K/var/tmp/portage/dev-libs/libnl-3.6.0/work/libnl-3.6.0/tests/nl-test-util.c\0\0\0F", 87) = 87
write(3, "\0\0\0\1\0\0\0.assert(f) failed (errno=13, Permission denied)", 54) = 54
But this isn't the actual failure, it's just it telling us it failed.
If I run as the 'portage' user manually, it passes. Same as root. I'm confused by what's special about running it from within Portage because I've disabled all the sandboxes.
this strace doesn't show the actual failure, which I think would be at openat(AT_FDCWD, "/proc/self/uid_map"...
.
Did you run as CK_FORK=no strace -s 10000 ./tests/check-all
, to avoid forking?
Oh, duh. @floppym pointed out I was doing something silly.
I think reading /proc/self/uid_map
gets denied within our sandbox then it bails.
could you test branch th/netns-test-issue308
?
On it.
Works great, thank you!
@thesamesam thanks for testing!!
I think this should be fixed by 4d12b635e671e21d992b83e27280f841bda07899. Closing.
If not, please open a new issue (or for any other issues). Thanks!!
Noticed when packaging 3.6.0 for Gentoo. Not hitting #306 anymore as expected, but a new one!
test-suite.log:
System information:
Full build.log: build.log
Let me know if I can get some more information out of this.