diff options
Diffstat (limited to 'tests/common.sh.in')
-rw-r--r-- | tests/common.sh.in | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/common.sh.in b/tests/common.sh.in index 195205988afb..fddd25b366bf 100644 --- a/tests/common.sh.in +++ b/tests/common.sh.in @@ -94,11 +94,9 @@ canUseSandbox() { return 1 fi - if [ -e /proc/sys/kernel/unprivileged_userns_clone ]; then - if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" != 1 ]; then - echo "Unprivileged user namespaces disabled by sysctl, skipping this test..." - return 1 - fi + if ! unshare --user true ; then + echo "Unprivileged user namespaces disabled by sysctl, skipping this test..." + return 1 fi return 0 |