unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: "Thompson, David" <dthompson2@worcester.edu>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH] tests: Skip 'guix environment --container' tests in some cases.
Date: Wed, 04 Nov 2015 23:41:39 +0100	[thread overview]
Message-ID: <87d1vp8k0s.fsf@gnu.org> (raw)
In-Reply-To: <CAJ=RwfZ6=AzOSQ0-4ZZMqUA3ZdZJ7mqH1e8dnYmLVuMuit1Bvg@mail.gmail.com> (David Thompson's message of "Wed, 4 Nov 2015 09:05:17 -0500")

"Thompson, David" <dthompson2@worcester.edu> skribis:

> From a2b6e503c53ed6f4e20474e78f17fac208f4627e Mon Sep 17 00:00:00 2001
> From: David Thompson <dthompson2@worcester.edu>
> Date: Tue, 3 Nov 2015 22:05:26 -0500
> Subject: [PATCH] tests: Skip 'guix environment --container' tests in some
>  cases.
>
> The tests in tests/guix-environment-container.sh cannot be performed
> unless the system supports user namespaces.
>
> * tests/guix-environment-container.sh: Skip if feature tests fail.

[...]

> +# Perform some feature tests to determine if the tests are applicable.
> +if test -f /proc/self/ns/user -a \
> +        -f /proc/self/setgroups
> +then
> +    if test -f /proc/sys/kernel/unprivileged_userns_clone
> +    then
> +        if test $(cat /proc/sys/kernel/unprivileged_userns_clone) = "1"

Looks good, but please use `cat foo` instead of $(cat foo), for
compatibility with non-Bash Bourne shells, and also square brackets
instead of ‘test’ for conciseness.

Thank you!

Ludo’.

      reply	other threads:[~2015-11-04 22:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-04  3:10 [PATCH] tests: Skip 'guix environment --container' tests in some cases David Thompson
2015-11-04  9:05 ` Ludovic Courtès
2015-11-04 14:05   ` Thompson, David
2015-11-04 22:41     ` Ludovic Courtès [this message]

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=87d1vp8k0s.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=dthompson2@worcester.edu \
    --cc=guix-devel@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).