Description: Skip TestUntarParentPathPermissions without root
Author: Shengjing Zhu <zhsj@debian.org>

Forwarded: https://github.com/moby/moby/pull/42094
Last-Update: 2021-02-27

--- docker.io-20.10.4+dfsg1.orig/engine/pkg/archive/archive_unix_test.go
+++ docker.io-20.10.4+dfsg1/engine/pkg/archive/archive_unix_test.go
@@ -160,6 +160,7 @@ func TestTarWithHardLinkAndRebase(t *tes
 // TestUntarParentPathPermissions is a regression test to check that missing
 // parent directories are created with the expected permissions
 func TestUntarParentPathPermissions(t *testing.T) {
+	skip.If(t, os.Getuid() != 0, "skipping test that requires root")
 	buf := &bytes.Buffer{}
 	w := tar.NewWriter(buf)
 	err := w.WriteHeader(&tar.Header{Name: "foo/bar"})
