Index: test/cctest/heap/test-heap.cc |
diff --git a/test/cctest/heap/test-heap.cc b/test/cctest/heap/test-heap.cc |
index 40789c2edc9bef11eaa307d681a2fcf2033c0172..81c4aed7036e82edd3f322dc03532b9c4e07bca0 100644 |
--- a/test/cctest/heap/test-heap.cc |
+++ b/test/cctest/heap/test-heap.cc |
@@ -2369,6 +2369,10 @@ static void FillUpNewSpace(NewSpace* new_space) { |
TEST(GrowAndShrinkNewSpace) { |
+ // Avoid shrinking new space in GC epilogue. This can happen if allocation |
+ // throughput samples have been taken while executing the benchmark. |
+ FLAG_predictable = true; |
+ |
CcTest::InitializeVM(); |
Heap* heap = CcTest::heap(); |
NewSpace* new_space = heap->new_space(); |
@@ -3614,6 +3618,9 @@ TEST(ReleaseOverReservedPages) { |
i::FLAG_page_promotion = false; |
CcTest::InitializeVM(); |
Isolate* isolate = CcTest::i_isolate(); |
+ // If there's snapshot available, we don't know whether 20 small arrays will |
+ // fit on the initial pages. |
+ if (!isolate->snapshot_available()) return; |
Factory* factory = isolate->factory(); |
Heap* heap = isolate->heap(); |
v8::HandleScope scope(CcTest::isolate()); |