unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Alex Vong <alexvong1995@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel <guix-devel@gnu.org>, 21410@debbugs.gnu.org
Subject: bug#21410: Environment containers
Date: Wed, 28 Oct 2015 23:14:54 +0800	[thread overview]
Message-ID: <CADrxHD-hTbYkOMHzPRmYKjd7HQNmtzgivGkAz0AKAk4w--e2cg@mail.gmail.com> (raw)
In-Reply-To: <87mvv3832q.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1464 bytes --]

On 28/10/2015, Ludovic Courtès <ludo@gnu.org> wrote:
> Alex Vong <alexvong1995@gmail.com> skribis:
>
>> On 27/10/2015, Ludovic Courtès <ludo@gnu.org> wrote:
>
> [...]
>
>>> Do you still experience the test failures mentioned in that report?  If
>>> not, could you email 21410@debbugs.gnu.org, specifying which commit
>>> works for you?
>>>
>> Yes, there are 4 tests still failing with the latest master branch
>> without unprivileged container.
>
> Which tests?  Does tests/container.scm pass?
>
It doesn't pass if I run as unprivileged user. It passes if I run as
root. I will be mailing the test logs on another mail.

>> But there is a new problem, tests/guix-environment-container.sh fails
>> even when running the tests as root. The test log is in the
>> attachment.
>
> [...]
>
>> (for-each (lambda (mount)
>>             (display mount)
>>             (newline))
>>           mappings)'
>> accepted connection from pid 9627, user root (trusted)
>> ++ wc -l
>> + test 4 -eq 3
>
> Could you apply the patch below, run:
>
>   make check TESTS=tests/guix-environment-container.sh
>
> and send ‘guix-environment-container.log’?
>
Sure! It is in the attachment. (Note that I run the test as root to
bypass the unprivileged container issue.)

> Also, what does:
>
>   make check TESTS=tests/container.scm
>
> report?
>
I will send the test log in another mail.

> TIA!
>
> Ludo’.
>
>

Cheers,
Alex

[-- Attachment #2: guix-environment-container.log --]
[-- Type: text/x-log, Size: 2564 bytes --]

+ set -e
+ guix environment --version
warning: daemon is running as root, so using `--build-users-group' is highly recommended
guix environment (GNU Guix) 0.9.0
Copyright (C) 2015 the Guix authors
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
+ tmpdir=t-guix-environment-12182
+ trap 'rm -r "$tmpdir"' EXIT
+ mkdir t-guix-environment-12182
+ guix environment --container --ad-hoc --bootstrap guile-bootstrap -- guile -c '(exit 42)'
accepted connection from pid 12190, user root (trusted)
+ test 42 = 42
+ mount_test_code='
(use-modules (ice-9 rdelim)
             (ice-9 match)
             (srfi srfi-1))

(define mappings
  (filter-map (lambda (line)
                (match (string-split line #\space)
                  ;; Empty line.
                  (("") #f)
                  ;; Ignore these types of file systems.
                  ((_ _ (or "tmpfs" "proc" "sysfs" "devtmpfs"
                            "devpts" "cgroup" "mqueue") _ _ _)
                   #f)
                  ((_ mount _ _ _ _)
                   mount)))
              (string-split (call-with-input-file "/proc/mounts" read-string)
                            #\newline)))

(for-each (lambda (mount)
            (display mount)
            (newline))
          mappings)'
+ guix environment --container --ad-hoc --bootstrap guile-bootstrap -- guile -c '
(use-modules (ice-9 rdelim)
             (ice-9 match)
             (srfi srfi-1))

(define mappings
  (filter-map (lambda (line)
                (match (string-split line #\space)
                  ;; Empty line.
                  (("") #f)
                  ;; Ignore these types of file systems.
                  ((_ _ (or "tmpfs" "proc" "sysfs" "devtmpfs"
                            "devpts" "cgroup" "mqueue") _ _ _)
                   #f)
                  ((_ mount _ _ _ _)
                   mount)))
              (string-split (call-with-input-file "/proc/mounts" read-string)
                            #\newline)))

(for-each (lambda (mount)
            (display mount)
            (newline))
          mappings)'
accepted connection from pid 12196, user root (trusted)
+ cat t-guix-environment-12182/mounts
/
/home/alexvong1995/guix
/home/alexvong1995/guix/test-tmp/store/bdg31cb28ki1b0xi4rqrc721hadn3lfw-bash
/home/alexvong1995/guix/test-tmp/store/92vjphkx545ndw82vn4fp9m3xxkv3mzd-guile-bootstrap-2.0
++ wc -l
+ test 4 -eq 3
+ rm -r t-guix-environment-12182

  reply	other threads:[~2015-10-28 15:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAJ=RwfbK67QX1tyrd7O_O=EVkxrO9GU3u8k6etMint4ucO8u5A@mail.gmail.com>
     [not found] ` <87y4epsnjs.fsf@T420.taylan>
     [not found]   ` <CAJ=RwfakM8CMTyRH-SWoJVnO+__jq2oE_2gy41129Kde2y=u8w@mail.gmail.com>
     [not found]     ` <CADrxHD8-pRRgR549eWQG4fNm7Lky=kTT0wSbrbGBgtgRhUZg9Q@mail.gmail.com>
     [not found]       ` <87r3kgwpb8.fsf@gnu.org>
2015-10-28 13:10         ` bug#21410: Environment containers Alex Vong
     [not found]         ` <CADrxHD8hs0UC0Jeqq4BXNMdGAX=Q_bbrw7k31KJkYxjuYO8PSg@mail.gmail.com>
2015-10-28 14:45           ` Ludovic Courtès
2015-10-28 15:14             ` Alex Vong [this message]
2015-10-28 15:20               ` Thompson, David
     [not found]               ` <CAJ=RwfZg+ytagyGM73FbT25Btagvxb+eAZn74-0pyx=OqGqkJA@mail.gmail.com>
2015-10-28 15:56                 ` Ludovic Courtès
     [not found]                 ` <87fv0v6l6v.fsf@gnu.org>
2015-10-28 16:08                   ` Thompson, David
     [not found]                   ` <CAJ=RwfaxrzGwtSmukse7BRmcRc2uWPfOJ86AbkBQsB40VbXfpg@mail.gmail.com>
2015-10-28 16:20                     ` Alex Vong
2015-10-29 19:24                     ` Ludovic Courtès
     [not found]                     ` <87eggda36z.fsf@gnu.org>
2015-10-29 19:25                       ` Thompson, David
     [not found]                       ` <CAJ=RwfYS=KLjymLAeQz7QdYU0oh_hpZN+J3odhsmyQov7sytUA@mail.gmail.com>
2015-11-20 14:51                         ` Ludovic Courtès
     [not found]                         ` <87r3jkg1vl.fsf@gnu.org>
2015-11-21 13:36                           ` Alex Vong
     [not found]                           ` <CADrxHD_-pkxwJXWzLRdSp+kvBBcofbOwVccTy=czvAf2zdJKuA@mail.gmail.com>
2015-11-21 15:57                             ` Ludovic Courtès
     [not found]                             ` <87wptb9wgl.fsf@gnu.org>
2015-11-21 17:47                               ` Mathieu Lirzin
     [not found]                               ` <87egfjutvt.fsf@gnu.org>
2015-11-21 21:27                                 ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADrxHD-hTbYkOMHzPRmYKjd7HQNmtzgivGkAz0AKAk4w--e2cg@mail.gmail.com \
    --to=alexvong1995@gmail.com \
    --cc=21410@debbugs.gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).