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..0672d5c1e6df2a3ca3f593e8507b092fd0fb7271 100644 |
--- a/test/cctest/heap/test-heap.cc |
+++ b/test/cctest/heap/test-heap.cc |
@@ -2369,6 +2369,9 @@ 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 +3617,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()); |