aboutsummaryrefslogtreecommitdiff
path: root/internal/inomap/inomap_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/inomap/inomap_test.go')
-rw-r--r--internal/inomap/inomap_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/inomap/inomap_test.go b/internal/inomap/inomap_test.go
index 430ec94..ce5b880 100644
--- a/internal/inomap/inomap_test.go
+++ b/internal/inomap/inomap_test.go
@@ -107,6 +107,9 @@ func TestSpill(t *testing.T) {
if out1&spillBit == 0 {
t.Error("spill bit not set")
}
+ if out1 != spillSpaceStart {
+ t.Errorf("unexpected first spill inode number %d", out1)
+ }
out2 := m.Translate(q)
if out2&spillBit == 0 {
t.Error("spill bit not set")
@@ -114,6 +117,11 @@ func TestSpill(t *testing.T) {
if out1 != out2 {
t.Errorf("unstable mapping: %d vs %d", out1, out2)
}
+ q.Ino = maxPassthruIno + 2
+ out3 := m.Translate(q)
+ if out3 != out1+1 {
+ t.Errorf("unexpected 2nd spill inode number %d", out1)
+ }
}
// TestUniqueness checks that unique (Dev, Flags, Ino) tuples get unique inode