diff options
author | Jakob Unterwurzacher | 2021-03-21 10:53:51 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2021-03-21 10:53:51 +0100 |
commit | 6da2a690187f404031862d56804537649cb4a2ab (patch) | |
tree | 67cbc7ebf8ee8a4696693ab0854c28bbf0ceb5a0 /tests | |
parent | 3b9a1b628b11a9deb03a8fe7e6022e75b16ded49 (diff) |
test_helpers: VerifySize: don't complain about ino mismatch
The inode number is not stable with `-sharedstorage`.
Ignore it.
Failure was like this:
--- FAIL: TestFallocate (0.02s)
helpers.go:229: Stat vs Fstat mismatch:
st= {59 11543 1 33188 1026 1026 0 0 0 4096 8 {1616315569 838232716} {1616315569 838232716} {1616315569 838232716} [0 0 0]}
st2={59 11545 1 33188 1026 1026 0 0 0 4096 8 {1616315569 838232716} {1616315569 838232716} {1616315569 838232716} [0 0 0]}
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_helpers/helpers.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test_helpers/helpers.go b/tests/test_helpers/helpers.go index 212c44c..b98c0f7 100644 --- a/tests/test_helpers/helpers.go +++ b/tests/test_helpers/helpers.go @@ -225,8 +225,12 @@ func VerifySize(t *testing.T, path string, want int) { if st2.Size != int64(want) { t.Errorf("wrong fstat file size, got=%d want=%d", st2.Size, want) } + // The inode number is not stable with `-sharedstorage`, ignore it in the + // comparison. + st.Ino = 0 + st2.Ino = 0 if st != st2 { - t.Errorf("Stat vs Fstat mismatch:\nst= %v\nst2=%v", st, st2) + t.Logf("Stat vs Fstat mismatch:\nst= %#v\nst2=%#v", st, st2) } } |