guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tests: Skip 'guix environment --container' tests in some cas


From: Ludovic Courtès
Subject: Re: [PATCH] tests: Skip 'guix environment --container' tests in some cases.
Date: Wed, 04 Nov 2015 23:41:39 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

"Thompson, David" <address@hidden> skribis:

> From a2b6e503c53ed6f4e20474e78f17fac208f4627e Mon Sep 17 00:00:00 2001
> From: David Thompson <address@hidden>
> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]