diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-16 19:23:19 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-16 19:23:19 +0000 |
commit | 7b866744951dd6d5e9c7fa982b1f5672d653feb4 (patch) | |
tree | 5d2a761f938c68b62e11301dc7b93e2ed63dbd50 /debian/patches/0004-skip-userns-test-in-schroot-as-well.patch | |
parent | Adding upstream version 1.20.14. (diff) | |
download | golang-1.20-7b866744951dd6d5e9c7fa982b1f5672d653feb4.tar.xz golang-1.20-7b866744951dd6d5e9c7fa982b1f5672d653feb4.zip |
Adding debian version 1.20.14-2.debian/1.20.14-2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/0004-skip-userns-test-in-schroot-as-well.patch')
-rw-r--r-- | debian/patches/0004-skip-userns-test-in-schroot-as-well.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/debian/patches/0004-skip-userns-test-in-schroot-as-well.patch b/debian/patches/0004-skip-userns-test-in-schroot-as-well.patch new file mode 100644 index 0000000..7209cf1 --- /dev/null +++ b/debian/patches/0004-skip-userns-test-in-schroot-as-well.patch @@ -0,0 +1,34 @@ +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(+) + +diff --git a/src/syscall/exec_linux_test.go b/src/syscall/exec_linux_test.go +index a6900f9..221f9de 100644 +--- a/src/syscall/exec_linux_test.go ++++ b/src/syscall/exec_linux_test.go +@@ -35,6 +35,10 @@ func isLXC() bool { + 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 +@@ -50,6 +54,9 @@ func skipInContainer(t *testing.T) { + 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) { |