raven/base/docker/docker-20.10.4-fix-TestTarUntarWithXattr-failure-on-4.14+-kernel.patch
2024-02-21 17:40:51 +06:00

23 lines
1.2 KiB
Diff

diff --git a/pkg/archive/archive_unix_test.go b/pkg/archive/archive_unix_test.go
index dc4e1fd..6fb8895 100644
--- a/pkg/archive/archive_unix_test.go
+++ b/pkg/archive/archive_unix_test.go
@@ -241,7 +241,7 @@ func TestTarUntarWithXattr(t *testing.T) {
err = os.WriteFile(filepath.Join(origin, "3"), []byte("will be ignored"), 0700)
assert.NilError(t, err)
// there is no known Go implementation of setcap/getcap with support for v3 file capability
- out, err := exec.Command("setcap", "cap_block_suspend+ep", filepath.Join(origin, "2")).CombinedOutput()
+ out, err := exec.Command("setcap", "cap_sys_nice+ep", filepath.Join(origin, "2")).CombinedOutput()
assert.NilError(t, err, string(out))
for _, c := range []Compression{
@@ -262,7 +262,7 @@ func TestTarUntarWithXattr(t *testing.T) {
}
out, err := exec.Command("getcap", filepath.Join(origin, "2")).CombinedOutput()
assert.NilError(t, err, string(out))
- assert.Check(t, is.Contains(string(out), "cap_block_suspend=ep"), "untar should have kept the 'security.capability' xattr")
+ assert.Check(t, is.Contains(string(out), "cap_sys_nice+ep"), "untar should have kept the 'security.capability' xattr")
}
}