We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0cf740 commit 0d482b3Copy full SHA for 0d482b3
src/syscall/exec_linux_test.go
@@ -57,6 +57,14 @@ func checkUserNS(t *testing.T) {
57
t.Skip("kernel prohibits user namespace in unprivileged process")
58
}
59
60
+ // On Centos 7 make sure they set the kernel parameter user_namespace=1
61
+ // See issue 16283 and 20796.
62
+ if _, err := os.Stat("/sys/module/user_namespace/parameters/enable"); err == nil {
63
+ buf, _ := ioutil.ReadFile("/sys/module/user_namespace/parameters/enabled")
64
+ if !strings.HasPrefix(string(buf), "Y") {
65
+ t.Skip("kernel doesn't support user namespaces")
66
+ }
67
68
// When running under the Go continuous build, skip tests for
69
// now when under Kubernetes. (where things are root but not quite)
70
// Both of these are our own environment variables.
0 commit comments