* bug#21410: [TEST-FAIL] 2 tests failed when running `make check' on Debian
2015-09-04 6:44 bug#21410: [TEST-FAIL] 2 tests failed when running `make check' on Debian Alex Vong
@ 2015-09-04 14:12 ` Thompson, David
2015-09-04 15:02 ` Alex Vong
2015-09-07 1:47 ` Alex Vong
2 siblings, 0 replies; 13+ messages in thread
From: Thompson, David @ 2015-09-04 14:12 UTC (permalink / raw)
To: Alex Vong; +Cc: 21410
Hello Alex,
On Fri, Sep 4, 2015 at 2:44 AM, Alex Vong <alexvong1995@gmail.com> wrote:
> Hi everyone,
>
> I tried to compile Guix on Debian Sid,
> the compilation succeeded,
> but the 2 of the tests in the Testsuit failed.
>
> The following is what commands I have run,
> all commands are run as non-root:
>
> $ git clone git://git.savannah.gnu.org/guix.git
> $ cd guix
> $ ./bootstrap
> $ ./configure
> $ make -j4
> $ make -j4 check
>
> The Testsuite summary (test-suite.log) is inlined below:
>
> ======================================
> GNU Guix 0.8.3: ./test-suite.log
> ======================================
>
> # TOTAL: 47
> # PASS: 45
> # SKIP: 0
> # XFAIL: 0
> # FAIL: 2
> # XPASS: 0
> # ERROR: 0
>
> .. contents:: :depth: 2
>
> FAIL: tests/syscalls
> ====================
>
> ;;; note: source file ./srfi/srfi-64.scm
> ;;; newer than compiled /usr/lib/x86_64-linux-gnu/guile/2.0/ccache/srfi/srfi-64.go
> ERROR: In procedure primitive-load:
> ERROR: In procedure scm_i_lreadparen: tests/syscalls.scm:128:14: end of file
> %%%% Starting test syscalls (Writing full log to "syscalls.log")
> tests/syscalls.scm:85: FAIL clone
> tests/syscalls.scm:98: FAIL setns
> ;;; note: source file ./srfi/srfi-64.scm
> ;;; newer than compiled /usr/lib/x86_64-linux-gnu/guile/2.0/ccache/srfi/srfi-64.go
> %%%% Starting test syscalls (Writing full log to "syscalls.log")
> tests/syscalls.scm:85: FAIL clone
> tests/syscalls.scm:98: FAIL setns
> tests/syscalls.scm:127: FAIL pivot-root
> # of expected passes 15
> # of unexpected failures 3
>
> FAIL: tests/containers
> ======================
>
> %%%% Starting test containers (Writing full log to "containers.log")
> tests/containers.scm:37: FAIL call-with-container, user namespace
> tests/containers.scm:45: FAIL call-with-container, uts namespace
> tests/containers.scm:55: FAIL call-with-container, pid namespace
> tests/containers.scm:70: FAIL call-with-container, mnt namespace
> tests/containers.scm:77: FAIL call-with-container, all namespaces
> tests/containers.scm:83: FAIL container-excursion
> # of unexpected failures 6
> ;;; note: source file ./srfi/srfi-64.scm
> ;;; newer than compiled /usr/lib/x86_64-linux-gnu/guile/2.0/ccache/srfi/srfi-64.go
> FAIL tests/containers.scm (exit status: 1)
Could you attach the containers.log and syscalls.log files so I could
see some more detail?
Also, what version of Linux and glibc are you using?
Thanks!
- Dave
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#21410: [TEST-FAIL] 2 tests failed when running `make check' on Debian
2015-09-04 6:44 bug#21410: [TEST-FAIL] 2 tests failed when running `make check' on Debian Alex Vong
2015-09-04 14:12 ` Thompson, David
@ 2015-09-04 15:02 ` Alex Vong
2015-09-04 20:07 ` Ludovic Courtès
2015-09-07 1:47 ` Alex Vong
2 siblings, 1 reply; 13+ messages in thread
From: Alex Vong @ 2015-09-04 15:02 UTC (permalink / raw)
To: Thompson, David, 21410
[-- Attachment #1: Type: text/plain, Size: 3175 bytes --]
Hi Dave,
Please see the reply below.
2015-09-04 22:12 GMT+08:00, Thompson, David <dthompson2@worcester.edu>:
> Hello Alex,
>
> On Fri, Sep 4, 2015 at 2:44 AM, Alex Vong <alexvong1995@gmail.com> wrote:
>> Hi everyone,
>>
>> I tried to compile Guix on Debian Sid,
>> the compilation succeeded,
>> but the 2 of the tests in the Testsuit failed.
>>
>> The following is what commands I have run,
>> all commands are run as non-root:
>>
>> $ git clone git://git.savannah.gnu.org/guix.git
>> $ cd guix
>> $ ./bootstrap
>> $ ./configure
>> $ make -j4
>> $ make -j4 check
>>
>> The Testsuite summary (test-suite.log) is inlined below:
>>
>> ======================================
>> GNU Guix 0.8.3: ./test-suite.log
>> ======================================
>>
>> # TOTAL: 47
>> # PASS: 45
>> # SKIP: 0
>> # XFAIL: 0
>> # FAIL: 2
>> # XPASS: 0
>> # ERROR: 0
>>
>> .. contents:: :depth: 2
>>
>> FAIL: tests/syscalls
>> ====================
>>
>> ;;; note: source file ./srfi/srfi-64.scm
>> ;;; newer than compiled
>> /usr/lib/x86_64-linux-gnu/guile/2.0/ccache/srfi/srfi-64.go
>> ERROR: In procedure primitive-load:
>> ERROR: In procedure scm_i_lreadparen: tests/syscalls.scm:128:14: end of
>> file
>> %%%% Starting test syscalls (Writing full log to "syscalls.log")
>> tests/syscalls.scm:85: FAIL clone
>> tests/syscalls.scm:98: FAIL setns
>> ;;; note: source file ./srfi/srfi-64.scm
>> ;;; newer than compiled
>> /usr/lib/x86_64-linux-gnu/guile/2.0/ccache/srfi/srfi-64.go
>> %%%% Starting test syscalls (Writing full log to "syscalls.log")
>> tests/syscalls.scm:85: FAIL clone
>> tests/syscalls.scm:98: FAIL setns
>> tests/syscalls.scm:127: FAIL pivot-root
>> # of expected passes 15
>> # of unexpected failures 3
>>
>> FAIL: tests/containers
>> ======================
>>
>> %%%% Starting test containers (Writing full log to "containers.log")
>> tests/containers.scm:37: FAIL call-with-container, user namespace
>> tests/containers.scm:45: FAIL call-with-container, uts namespace
>> tests/containers.scm:55: FAIL call-with-container, pid namespace
>> tests/containers.scm:70: FAIL call-with-container, mnt namespace
>> tests/containers.scm:77: FAIL call-with-container, all namespaces
>> tests/containers.scm:83: FAIL container-excursion
>> # of unexpected failures 6
>> ;;; note: source file ./srfi/srfi-64.scm
>> ;;; newer than compiled
>> /usr/lib/x86_64-linux-gnu/guile/2.0/ccache/srfi/srfi-64.go
>> FAIL tests/containers.scm (exit status: 1)
>
> Could you attach the containers.log and syscalls.log files so I could
> see some more detail?
>
Sure, they are in the attahment.
> Also, what version of Linux and glibc are you using?
>
kernel version:
$ uname -a
Linux debian 4.1.0-2-amd64 #1 SMP Debian 4.1.6-1 (2015-08-23) x86_64 GNU/Linux
libc version:
$ LC_ALL=C ldd --version
ldd (Debian GLIBC 2.19-19) 2.19
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
> Thanks!
>
> - Dave
>
Thanks for the quick reply as well!
Cheers,
Alex
[-- Attachment #2: containers.log --]
[-- Type: text/x-log, Size: 3788 bytes --]
%%%% Starting test containers
Group begin: containers
Test begin:
test-name: "call-with-container, user namespace"
source-file: "tests/containers.scm"
source-line: 37
source-form: (test-assert "call-with-container, user namespace" (zero? (call-with-container (quote ()) (lambda () (assert-exit (and (zero? (getuid)) (zero? (getgid))))) #:namespaces (quote (user)))))
Test end:
result-kind: fail
actual-value: #f
actual-error: (system-error "open-file" "~A: ~S" ("No such file or directory" "/proc/-1/setgroups") (2))
Test begin:
test-name: "call-with-container, uts namespace"
source-file: "tests/containers.scm"
source-line: 45
source-form: (test-assert "call-with-container, uts namespace" (zero? (call-with-container (quote ()) (lambda () (sethostname "test-container") (primitive-exit 0)) #:namespaces (quote (user uts)))))
Test end:
result-kind: fail
actual-value: #f
actual-error: (system-error "open-file" "~A: ~S" ("No such file or directory" "/proc/-1/setgroups") (2))
Test begin:
test-name: "call-with-container, pid namespace"
source-file: "tests/containers.scm"
source-line: 55
source-form: (test-assert "call-with-container, pid namespace" (zero? (call-with-container (quote ()) (lambda () (match (primitive-fork) (0 (assert-exit (= 2 (getpid)))) (pid (primitive-exit (match (waitpid pid) ((_ . status) (status:exit-val status))))))) #:namespaces (quote (user pid)))))
Test end:
result-kind: fail
actual-value: #f
actual-error: (system-error "open-file" "~A: ~S" ("No such file or directory" "/proc/-1/setgroups") (2))
Test begin:
test-name: "call-with-container, mnt namespace"
source-file: "tests/containers.scm"
source-line: 70
source-form: (test-assert "call-with-container, mnt namespace" (zero? (call-with-container (quote (("none" device "/testing" "tmpfs" () #f #f))) (lambda () (assert-exit (file-exists? "/testing"))) #:namespaces (quote (user mnt)))))
Test end:
result-kind: fail
actual-value: #f
actual-error: (system-error "open-file" "~A: ~S" ("No such file or directory" "/proc/-1/setgroups") (2))
Test begin:
test-name: "call-with-container, all namespaces"
source-file: "tests/containers.scm"
source-line: 77
source-form: (test-assert "call-with-container, all namespaces" (zero? (call-with-container (quote ()) (lambda () (primitive-exit 0)))))
Test end:
result-kind: fail
actual-value: #f
actual-error: (system-error "open-file" "~A: ~S" ("No such file or directory" "/proc/-1/setgroups") (2))
Test begin:
test-name: "container-excursion"
source-file: "tests/containers.scm"
source-line: 83
source-form: (test-assert "container-excursion" (call-with-temporary-directory (lambda (root) (match (list (pipe) (pipe)) (((start-in . start-out) (end-in . end-out)) (define (container) (close end-out) (close start-in) (write (quote ready) start-out) (close start-out) (read end-in) (close end-in)) (define (namespaces pid) (let ((pid (number->string pid))) (map (lambda (ns) (readlink (string-append "/proc/" pid "/ns/" ns))) (quote ("user" "ipc" "uts" "net" "pid" "mnt"))))) (let* ((pid (run-container root (quote ()) %namespaces 1 container)) (container-namespaces (namespaces pid)) (result (begin (close start-out) (read start-in) (close start-in) (container-excursion pid (lambda () (match (primitive-fork) (0 (assert-exit (equal? container-namespaces (namespaces (getpid))))) (fork-pid (matc
h (waitpid fork-pid) ((_ . status) (primitive-exit (status:exit-val status))))))))))) (close end-in) (write (quote done) end-out) (close end-out) (waitpid pid) (zero? result)))))))
Test end:
result-kind: fail
actual-value: #f
actual-error: (system-error "open-file" "~A: ~S" ("No such file or directory" "/proc/-1/setgroups") (2))
Group end: containers
# of unexpected failures 6
[-- Attachment #3: syscalls.log --]
[-- Type: text/x-log, Size: 11966 bytes --]
%%%% Starting test syscalls
Group begin: syscalls
Test begin:
test-name: "mount, ENOENT"
source-file: "tests/syscalls.scm"
source-line: 33
source-form: (test-equal "mount, ENOENT" ENOENT (catch (quote system-error) (lambda () (mount "/dev/null" "/does-not-exist" "ext2") #f) (compose system-error-errno list)))
Test end:
result-kind: pass
actual-value: 2
expected-value: 2
Test begin:
test-name: "umount, ENOENT/EPERM"
source-file: "tests/syscalls.scm"
source-line: 41
source-form: (test-assert "umount, ENOENT/EPERM" (catch (quote system-error) (lambda () (umount "/does-not-exist") #f) (lambda args (memv (system-error-errno args) (list EPERM ENOENT)))))
Test end:
result-kind: pass
actual-value: (1 2)
Test begin:
test-name: "mount-points"
source-file: "tests/syscalls.scm"
source-line: 50
source-form: (test-assert "mount-points" (any (cute member <> (mount-points)) (quote ("/" "/proc" "/sys" "/dev"))))
Test end:
result-kind: pass
actual-value: ("/" "/run/lock" "/sys/fs/pstore" "/run/shm" "/run/rpc_pipefs" "/proc/sys/fs/binfmt_misc" "/sys/fs/cgroup" "/run/cgmanager/fs" "/run/user/116" "/run/user/1000" "/media/alexvong1995/e6466814-8885-4b47-ad1c-a8ad4e3f4552")
Test begin:
test-name: "swapon, ENOENT/EPERM"
source-file: "tests/syscalls.scm"
source-line: 56
source-form: (test-assert "swapon, ENOENT/EPERM" (catch (quote system-error) (lambda () (swapon "/does-not-exist") #f) (lambda args (memv (system-error-errno args) (list EPERM ENOENT)))))
Test end:
result-kind: pass
actual-value: (1 2)
Test begin:
test-name: "swapoff, ENOENT/EINVAL/EPERM"
source-file: "tests/syscalls.scm"
source-line: 64
source-form: (test-assert "swapoff, ENOENT/EINVAL/EPERM" (catch (quote system-error) (lambda () (swapoff "/does-not-exist") #f) (lambda args (memv (system-error-errno args) (list EPERM EINVAL ENOENT)))))
Test end:
result-kind: pass
actual-value: (1 22 2)
Test begin:
test-name: "mkdtemp!"
source-file: "tests/syscalls.scm"
source-line: 72
source-form: (test-assert "mkdtemp!" (let* ((tmp (or (getenv "TMPDIR") "/tmp")) (dir (mkdtemp! (string-append tmp "/guix-test-XXXXXX")))) (and (file-exists? dir) (begin (rmdir dir) #t))))
Test end:
result-kind: pass
actual-value: #t
Test begin:
test-name: "clone"
source-file: "tests/syscalls.scm"
source-line: 85
source-form: (test-assert "clone" (match (clone (logior CLONE_NEWUSER SIGCHLD)) (0 (primitive-exit 42)) (pid (and (not (equal? (readlink (user-namespace pid)) (readlink (user-namespace (getpid))))) (match (waitpid pid) ((_ . status) (= 42 (status:exit-val status))))))))
Test end:
result-kind: fail
actual-value: #f
actual-error: (system-error "readlink" "~A" ("No such file or directory") (2))
Test begin:
test-name: "setns"
source-file: "tests/syscalls.scm"
source-line: 98
source-form: (test-assert "setns" (match (clone (logior CLONE_NEWUSER SIGCHLD)) (0 (primitive-exit 0)) (clone-pid (match (pipe) ((in . out) (match (primitive-fork) (0 (close in) (call-with-input-file (user-namespace clone-pid) (lambda (port) (setns (port->fdes port) 0))) (write (quote done) out) (close out) (primitive-exit 0)) (fork-pid (close out) (read in) (let ((result (and (equal? (readlink (user-namespace clone-pid)) (readlink (user-namespace fork-pid)))))) (waitpid clone-pid) (waitpid fork-pid) result))))))))
Test end:
result-kind: fail
actual-value: #f
actual-error: (system-error "readlink" "~A" ("No such file or directory") (2))
%%%% Starting test syscalls
Group begin: syscalls
Test begin:
test-name: "mount, ENOENT"
source-file: "tests/syscalls.scm"
source-line: 33
source-form: (test-equal "mount, ENOENT" ENOENT (catch (quote system-error) (lambda () (mount "/dev/null" "/does-not-exist" "ext2") #f) (compose system-error-errno list)))
Test end:
result-kind: pass
actual-value: 2
expected-value: 2
Test begin:
test-name: "umount, ENOENT/EPERM"
source-file: "tests/syscalls.scm"
source-line: 41
source-form: (test-assert "umount, ENOENT/EPERM" (catch (quote system-error) (lambda () (umount "/does-not-exist") #f) (lambda args (memv (system-error-errno args) (list EPERM ENOENT)))))
Test end:
result-kind: pass
actual-value: (1 2)
Test begin:
test-name: "mount-points"
source-file: "tests/syscalls.scm"
source-line: 50
source-form: (test-assert "mount-points" (any (cute member <> (mount-points)) (quote ("/" "/proc" "/sys" "/dev"))))
Test end:
result-kind: pass
actual-value: ("/" "/run/lock" "/sys/fs/pstore" "/run/shm" "/run/rpc_pipefs" "/proc/sys/fs/binfmt_misc" "/sys/fs/cgroup" "/run/cgmanager/fs" "/run/user/116" "/run/user/1000" "/media/alexvong1995/e6466814-8885-4b47-ad1c-a8ad4e3f4552")
Test begin:
test-name: "swapon, ENOENT/EPERM"
source-file: "tests/syscalls.scm"
source-line: 56
source-form: (test-assert "swapon, ENOENT/EPERM" (catch (quote system-error) (lambda () (swapon "/does-not-exist") #f) (lambda args (memv (system-error-errno args) (list EPERM ENOENT)))))
Test end:
result-kind: pass
actual-value: (1 2)
Test begin:
test-name: "swapoff, ENOENT/EINVAL/EPERM"
source-file: "tests/syscalls.scm"
source-line: 64
source-form: (test-assert "swapoff, ENOENT/EINVAL/EPERM" (catch (quote system-error) (lambda () (swapoff "/does-not-exist") #f) (lambda args (memv (system-error-errno args) (list EPERM EINVAL ENOENT)))))
Test end:
result-kind: pass
actual-value: (1 22 2)
Test begin:
test-name: "mkdtemp!"
source-file: "tests/syscalls.scm"
source-line: 72
source-form: (test-assert "mkdtemp!" (let* ((tmp (or (getenv "TMPDIR") "/tmp")) (dir (mkdtemp! (string-append tmp "/guix-test-XXXXXX")))) (and (file-exists? dir) (begin (rmdir dir) #t))))
Test end:
result-kind: pass
actual-value: #t
Test begin:
test-name: "clone"
source-file: "tests/syscalls.scm"
source-line: 85
source-form: (test-assert "clone" (match (clone (logior CLONE_NEWUSER SIGCHLD)) (0 (primitive-exit 42)) (pid (and (not (equal? (readlink (user-namespace pid)) (readlink (user-namespace (getpid))))) (match (waitpid pid) ((_ . status) (= 42 (status:exit-val status))))))))
Test end:
result-kind: fail
actual-value: #f
actual-error: (system-error "readlink" "~A" ("No such file or directory") (2))
Test begin:
test-name: "setns"
source-file: "tests/syscalls.scm"
source-line: 98
source-form: (test-assert "setns" (match (clone (logior CLONE_NEWUSER SIGCHLD)) (0 (primitive-exit 0)) (clone-pid (match (pipe) ((in . out) (match (primitive-fork) (0 (close in) (call-with-input-file (user-namespace clone-pid) (lambda (port) (setns (port->fdes port) 0))) (write (quote done) out) (close out) (primitive-exit 0)) (fork-pid (close out) (read in) (let ((result (and (equal? (readlink (user-namespace clone-pid)) (readlink (user-namespace fork-pid)))))) (waitpid clone-pid) (waitpid fork-pid) result))))))))
Test end:
result-kind: fail
actual-value: #f
actual-error: (system-error "open-file" "~A: ~S" ("No such file or directory" "/proc/-1/ns/user") (2))
Test begin:
test-name: "pivot-root"
source-file: "tests/syscalls.scm"
source-line: 127
source-form: (test-assert "pivot-root" (match (pipe) ((in . out) (match (clone (logior CLONE_NEWUSER CLONE_NEWNS SIGCHLD)) (0 (close in) (call-with-temporary-directory (lambda (root) (let ((put-old (string-append root "/real-root"))) (mount "none" root "tmpfs") (mkdir put-old) (call-with-output-file (string-append root "/test") (lambda (port) (display "testing\n" port))) (pivot-root root put-old) (write (file-exists? "/test") out) (close out)))) (primitive-exit 0)) (pid (close out) (let ((result (read in))) (close in) (and (zero? (match (waitpid pid) ((_ . status) (status:exit-val status)))) (eq? #t result))))))))
Test end:
result-kind: fail
actual-value: #f
actual-error: (system-error "waitpid" "~A" ("No child processes") (10))
Test begin:
test-name: "all-network-interface-names"
source-file: "tests/syscalls.scm"
source-line: 155
source-form: (test-assert "all-network-interface-names" (match (all-network-interface-names) (((? string? names) ..1) (member "lo" names))))
Test end:
result-kind: pass
actual-value: ("lo")
Test begin:
test-name: "network-interface-names"
source-file: "tests/syscalls.scm"
source-line: 160
source-form: (test-assert "network-interface-names" (match (network-interface-names) (((? string? names) ..1) (lset<= string=? names (all-network-interface-names)))))
Test end:
result-kind: pass
actual-value: #t
Test begin:
test-name: "network-interface-flags"
source-file: "tests/syscalls.scm"
source-line: 165
source-form: (test-assert "network-interface-flags" (let* ((sock (socket AF_INET SOCK_STREAM 0)) (flags (network-interface-flags sock "lo"))) (close-port sock) (and (not (zero? (logand flags IFF_LOOPBACK))) (not (zero? (logand flags IFF_UP))))))
Test end:
result-kind: pass
actual-value: #t
Test begin:
test-name: "loopback-network-interface?"
source-file: "tests/syscalls.scm"
source-line: 172
source-form: (test-equal "loopback-network-interface?" ENODEV (and (loopback-network-interface? "lo") (catch (quote system-error) (lambda () (loopback-network-interface? "nonexistent") #f) (lambda args (system-error-errno args)))))
Test end:
result-kind: pass
actual-value: 19
expected-value: 19
Test begin:
test-name: "set-network-interface-flags"
source-file: "tests/syscalls.scm"
source-line: 183
source-form: (test-assert "set-network-interface-flags" (let ((sock (socket AF_INET SOCK_STREAM 0))) (catch (quote system-error) (lambda () (set-network-interface-flags sock "lo" IFF_UP)) (lambda args (close-port sock) (memv (system-error-errno args) (list EPERM EACCES))))))
Test end:
result-kind: pass
actual-value: (1 13)
Test begin:
test-name: "network-interface-address lo"
source-file: "tests/syscalls.scm"
source-line: 193
source-form: (test-equal "network-interface-address lo" (make-socket-address AF_INET (inet-pton AF_INET "127.0.0.1") 0) (let* ((sock (socket AF_INET SOCK_STREAM 0)) (addr (network-interface-address sock "lo"))) (close-port sock) addr))
Test end:
result-kind: pass
actual-value: #(2 2130706433 0)
expected-value: #(2 2130706433 0)
Test begin:
test-name: "set-network-interface-address"
source-file: "tests/syscalls.scm"
source-line: 201
source-form: (test-assert "set-network-interface-address" (let ((sock (socket AF_INET SOCK_STREAM 0))) (catch (quote system-error) (lambda () (set-network-interface-address sock "nonexistent" (make-socket-address AF_INET (inet-pton AF_INET "127.12.14.15") 0))) (lambda args (close-port sock) (memv (system-error-errno args) (list EPERM EACCES))))))
Test end:
result-kind: pass
actual-value: (1 13)
Test begin:
test-name: "network-interfaces returns one or more interfaces"
source-file: "tests/syscalls.scm"
source-line: 215
source-form: (test-equal "network-interfaces returns one or more interfaces" (quote (#t #t #t)) (match (network-interfaces) ((interfaces ..1) (list (every interface? interfaces) (every string? (map interface-name interfaces)) (every vector? (map interface-address interfaces))))))
Test end:
result-kind: pass
actual-value: (#t #t #t)
expected-value: (#t #t #t)
Test begin:
test-name: "network-interfaces returns \"lo\""
source-file: "tests/syscalls.scm"
source-line: 223
source-form: (test-equal "network-interfaces returns \"lo\"" (list #t (make-socket-address AF_INET (inet-pton AF_INET "127.0.0.1") 0)) (match (filter (lambda (interface) (string=? "lo" (interface-name interface))) (network-interfaces)) ((loopbacks ..1) (list (every (lambda (lo) (not (zero? (logand IFF_LOOPBACK (interface-flags lo))))) loopbacks) (match (find (lambda (lo) (= AF_INET (sockaddr:fam (interface-address lo)))) loopbacks) (#f #f) (lo (interface-address lo)))))))
Test end:
result-kind: pass
actual-value: (#t #(2 2130706433 0))
expected-value: (#t #(2 2130706433 0))
Group end: syscalls
# of expected passes 15
# of unexpected failures 3
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#21410: [TEST-FAIL] 2 tests failed when running `make check' on Debian
2015-09-04 6:44 bug#21410: [TEST-FAIL] 2 tests failed when running `make check' on Debian Alex Vong
2015-09-04 14:12 ` Thompson, David
2015-09-04 15:02 ` Alex Vong
@ 2015-09-07 1:47 ` Alex Vong
2015-09-07 19:42 ` Thompson, David
2 siblings, 1 reply; 13+ messages in thread
From: Alex Vong @ 2015-09-07 1:47 UTC (permalink / raw)
To: dthompson2; +Cc: 21410
Hi Dave,
I have searched the internet according to the information you provided,
I find this bug report <https://github.com/lxc/lxc/issues/250> provides useful information.
I have written an example program after going through the clone(2) man page.
It demonstrates the problem and is inlined below.
First, compile the program as `a.out'.
Consider shell session 1:
root# echo 0 > /proc/sys/kernel/unprivileged_userns_clone
user$ ./a.out
I am your parent
Start cloning...
Cannot clone!
Consider shell session 2:
root# echo 1 > /proc/sys/kernel/unprivileged_userns_clone
user$ ./a.out
I am your parent
Start cloning...
Cloned!
I am your child
Any idea what's happenning?
I don't know Linux much, for instance I don't know what is container and namespace in Linux.
Thanks!
Cheers,
Alex
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sched.h>
#include <sys/wait.h>
#include <unistd.h>
#define STACK_SIZE (1024 * 1024)
int
child(void *str)
{
if (puts(str) < 0)
return EXIT_FAILURE;
else
return EXIT_SUCCESS;
}
int
main(void)
{ void *func_ptr = &child;
void *stack_base = malloc(STACK_SIZE);
void *stack_top;
int flag = CLONE_NEWUSER | SIGCHLD;
char *msg = "I am your child";
int errsv = 0;
puts("I am your parent");
puts("Start cloning...");
stack_top = stack_base + STACK_SIZE;
clone(func_ptr, stack_top, flag, msg);
errsv = errno;
if (!errsv)
puts("Cloned!");
else
puts("Cannot clone!");
return errsv;
}
^ permalink raw reply [flat|nested] 13+ messages in thread