When schroot is using overlayfs, it fails to detect it as chroot.
Gbp-Pq: Name 0006-skip-userns-test-in-schroot-as-well.patch
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
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) {