Skip to content

Commit 22f5bf6

Browse files
nalindcevich
authored andcommitted
conformance test: ignore file type bits when comparing layers
When comparing layer payloads during conformance tests, mask off any file type bits that the tar headers in the layers might have included. Signed-off-by: Nalin Dahyabhai <[email protected]>
1 parent 92ad069 commit 22f5bf6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/conformance/conformance_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"flag"
1010
"fmt"
1111
"io"
12+
"io/fs"
1213
"os"
1314
"path/filepath"
1415
"reflect"
@@ -789,7 +790,7 @@ func fsHeaderForEntry(hdr *tar.Header) FSHeader {
789790
Name: hdr.Name,
790791
Linkname: hdr.Linkname,
791792
Size: hdr.Size,
792-
Mode: hdr.Mode,
793+
Mode: (hdr.Mode & int64(fs.ModePerm)),
793794
UID: hdr.Uid,
794795
GID: hdr.Gid,
795796
ModTime: hdr.ModTime,

0 commit comments

Comments
 (0)