"Thompson, David" <[email protected]> skribis:

> From a2b6e503c53ed6f4e20474e78f17fac208f4627e Mon Sep 17 00:00:00 2001
> From: David Thompson <[email protected]>
> 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