summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/pgalloc/pgalloc_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/pgalloc/pgalloc_test.go')
-rw-r--r--pkg/sentry/pgalloc/pgalloc_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/sentry/pgalloc/pgalloc_test.go b/pkg/sentry/pgalloc/pgalloc_test.go
index b5b68eb52..405db141f 100644
--- a/pkg/sentry/pgalloc/pgalloc_test.go
+++ b/pkg/sentry/pgalloc/pgalloc_test.go
@@ -143,6 +143,14 @@ func TestFindUnallocatedRange(t *testing.T) {
start: hugepage,
},
{
+ desc: "Allocation doubles file size more than once if necessary",
+ usage: &usageSegmentDataSlices{},
+ fileSize: page,
+ length: 4 * page,
+ alignment: page,
+ start: 0,
+ },
+ {
desc: "Allocations are compact if possible",
usage: &usageSegmentDataSlices{
Start: []uint64{page, 3 * page},