Skip to content

Commit

Permalink
TestFileHoleCopy: improve error msg
Browse files Browse the repository at this point in the history
Relates-to: #812
  • Loading branch information
rfjakob committed Dec 8, 2023
1 parent f77477c commit 930dcfb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions internal/fusefrontend_reverse/node_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ func (n *Node) isRoot() bool {
return &rn.Node == n
}

// Handle LOOKUP gocryptfs.longname.*.name
func (n *Node) lookupLongnameName(ctx context.Context, nameFile string, out *fuse.EntryOut) (ch *fs.Inode, errno syscall.Errno) {
d, errno := n.prepareAtSyscall("")
if errno != 0 {
Expand Down
4 changes: 2 additions & 2 deletions tests/plaintextnames/file_holes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func doTestFileHoleCopy(t *testing.T, name string, writeOffsets []int64) {
// (looking at "filefrag -v", it seems like ext4 needs 4kB extra once
// you have >=4 extents)
if st.Blocks != st0.Blocks && st.Blocks != st0.Blocks-8 && st.Blocks != st0.Blocks+8 {
t.Errorf("size changed: st0.Blocks=%d st%d.Blocks=%d", st0.Blocks, i, st.Blocks)
t.Errorf("error: size changed: st0.Blocks=%d st%d.Blocks=%d", st0.Blocks, i, st.Blocks)
}
}

Expand Down Expand Up @@ -123,7 +123,7 @@ func doTestFileHoleCopy(t *testing.T, name string, writeOffsets []int64) {
}
}

// TestFileHoleCopy creates a sparse times, copies it a few times, and check if
// TestFileHoleCopy creates a sparse file, copies it a few times, and checks if
// the copies are the same (including the location of holes and data sections).
//
// The test runs with -plaintextnames because that makes it easier to manipulate
Expand Down

0 comments on commit 930dcfb

Please sign in to comment.