summaryrefslogtreecommitdiffstats
path: root/debian/patches/0006-skip-userns-test-in-schroot-as-well.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 13:18:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 13:18:28 +0000
commitcfc695f201ca61908ace6af625bcace92a42b64b (patch)
tree5809f158344b8cd94632bb3a8c1e7b574439154c /debian/patches/0006-skip-userns-test-in-schroot-as-well.patch
parentAdding upstream version 1.19.8. (diff)
downloadgolang-1.19-cfc695f201ca61908ace6af625bcace92a42b64b.tar.xz
golang-1.19-cfc695f201ca61908ace6af625bcace92a42b64b.zip
Adding debian version 1.19.8-2.debian/1.19.8-2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/0006-skip-userns-test-in-schroot-as-well.patch')
-rw-r--r--debian/patches/0006-skip-userns-test-in-schroot-as-well.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/debian/patches/0006-skip-userns-test-in-schroot-as-well.patch b/debian/patches/0006-skip-userns-test-in-schroot-as-well.patch
new file mode 100644
index 0000000..2d874c8
--- /dev/null
+++ b/debian/patches/0006-skip-userns-test-in-schroot-as-well.patch
@@ -0,0 +1,33 @@
+From: Shengjing Zhu <zhsj@debian.org>
+Date: Fri, 5 Feb 2021 21:21:45 +0800
+Subject: skip userns test in schroot as well
+
+When schroot is using overlayfs, it fails to detect it as chroot.
+
+---
+ src/syscall/exec_linux_test.go | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/src/syscall/exec_linux_test.go
++++ b/src/syscall/exec_linux_test.go
+@@ -33,6 +33,10 @@
+ return os.Getenv("container") == "lxc"
+ }
+
++func isSchroot() bool {
++ return os.Getenv("SCHROOT_SESSION_ID") != ""
++}
++
+ func skipInContainer(t *testing.T) {
+ // TODO: the callers of this func are using this func to skip
+ // tests when running as some sort of "fake root" that's uid 0
+@@ -48,6 +52,9 @@
+ if isLXC() {
+ t.Skip("skip this test in LXC container")
+ }
++ if isSchroot() {
++ t.Skip("skip this test in Schroot container")
++ }
+ }
+
+ func skipNoUserNamespaces(t *testing.T) {