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
153
153
154
154
manipulateZtocMetadata := func (zt * ztoc.Ztoc ) {
155
155
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
+ }
160
164
}
161
165
}
162
166
Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ func TestLazyPullWithSparseIndex(t *testing.T) {
236
236
}
237
237
238
238
func checkFuseMounts (t * testing.T , sh * shell.Shell , remoteSnapshotsExpectedCount int ) {
239
- mounts := string (sh .O ("mount " ))
239
+ mounts := string (sh .O ("cat" , "/proc/mounts " ))
240
240
remoteSnapshotsActualCount := strings .Count (mounts , "fuse.rawBridge" )
241
241
if remoteSnapshotsExpectedCount != remoteSnapshotsActualCount {
242
242
t .Fatalf ("incorrect number of remote snapshots; expected=%d, actual=%d" ,
You can’t perform that action at this time.
0 commit comments