]> Cypherpunks repositories - gostls13.git/commit
syscall: fix skipping some tests on Linux
authorKir Kolyshkin <kolyshkin@gmail.com>
Fri, 15 Jul 2022 02:40:23 +0000 (19:40 -0700)
committerGopher Robot <gobot@golang.org>
Sat, 3 Sep 2022 18:21:45 +0000 (18:21 +0000)
commita0f05823e4953d137310de164b2544e41dd767d2
treea2878759c4138736e90f7f649183bb53143db966
parent32964f9dce9615f7c1072e5ead9e11e6db5d2237
syscall: fix skipping some tests on Linux

The kernel knob /proc/sys/kernel/unprivileged_userns_clone is
only available in Debian (and Ubuntu) kernels, so if the tests
are run on e.g. Fedora, skipUnprivilegedUserClone() skips a lot
of tests.

Modify it to treat ENOENT as "it should work".

Change-Id: I959201ede139ede989cc8ab646c9bf51e0539ada
Reviewed-on: https://go-review.googlesource.com/c/go/+/417694
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Kirill Kolyshkin <kolyshkin@gmail.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/syscall/exec_linux_test.go