File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -153,10 +153,14 @@ log_fuse_operations = true
153153
154154 manipulateZtocMetadata := func (zt * ztoc.Ztoc ) {
155155 for i , md := range zt .FileMetadata {
156- md .UncompressedOffset += 2
157- md .UncompressedSize = math .MaxInt64
158- md .PAXHeaders = map [string ]string {"foo" : "bar" }
159- zt .FileMetadata [i ] = md
156+ // Setting UncompressedSize high triggers a "value too large" error
157+ // Maniulate regular files to alter ztoc data and trigger fuse ops failure.
158+ if md .Type == "reg" {
159+ md .UncompressedOffset += 2
160+ md .UncompressedSize = math .MaxInt64
161+ md .PAXHeaders = map [string ]string {"foo" : "bar" }
162+ zt .FileMetadata [i ] = md
163+ }
160164 }
161165 }
162166
Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ func TestLazyPullWithSparseIndex(t *testing.T) {
236236}
237237
238238func checkFuseMounts (t * testing.T , sh * shell.Shell , remoteSnapshotsExpectedCount int ) {
239- mounts := string (sh .O ("mount " ))
239+ mounts := string (sh .O ("cat" , "/proc/mounts " ))
240240 remoteSnapshotsActualCount := strings .Count (mounts , "fuse.rawBridge" )
241241 if remoteSnapshotsExpectedCount != remoteSnapshotsActualCount {
242242 t .Fatalf ("incorrect number of remote snapshots; expected=%d, actual=%d" ,
You can’t perform that action at this time.
0 commit comments