From db425cab9e59d066b831236dff8f55561363f0ae Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 6 Jan 2019 12:48:24 +0100 Subject: tests: TestFallocate: comment what "d" and "h" means Document what "d" and "h" means in the fancy ASCII diagrams. https://github.com/rfjakob/gocryptfs/pull/326 --- tests/matrix/matrix_test.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests') diff --git a/tests/matrix/matrix_test.go b/tests/matrix/matrix_test.go index 31527f0..9f3b13a 100644 --- a/tests/matrix/matrix_test.go +++ b/tests/matrix/matrix_test.go @@ -251,6 +251,7 @@ func TestFallocate(t *testing.T) { // Allocate 30 bytes, keep size // gocryptfs || (0 blocks) // ext4 | d | (1 block) + // ^ d = data block err = syscallcompat.Fallocate(fd, FALLOC_FL_KEEP_SIZE, 0, 30) if err != nil { t.Error(err) @@ -265,6 +266,7 @@ func TestFallocate(t *testing.T) { // Three ciphertext blocks. The middle one should be a file hole. // gocryptfs | h | h | d| (1 block) // ext4 | d | h | d | (2 blocks) + // ^ h = file hole // (Note that gocryptfs blocks are slightly bigger than the ext4 blocks, // but the last one is partial) err = file.Truncate(9000) -- cgit v1.2.3