Revision: 10202
Author:   [email protected]
Date:     Wed Dec  7 08:08:09 2011
Log:      Relax test condition to make it less brittle.

BUG=
TEST=cctest/test-api/IdleNotificationWithHint

Review URL: http://codereview.chromium.org/8839007
http://code.google.com/p/v8/source/detail?r=10202

Modified:
 /branches/bleeding_edge/test/cctest/test-api.cc
 /branches/bleeding_edge/test/cctest/test-heap.cc

=======================================
--- /branches/bleeding_edge/test/cctest/test-api.cc     Tue Dec  6 06:30:21 2011
+++ /branches/bleeding_edge/test/cctest/test-api.cc     Wed Dec  7 08:08:09 2011
@@ -13438,6 +13438,8 @@


 // Test that idle notification can be handled and eventually returns true.
+// This just checks the contract of the IdleNotification() function,
+// and does not verify that it does reasonable work.
 THREADED_TEST(IdleNotification) {
   v8::HandleScope scope;
   LocalContext env;
@@ -13463,6 +13465,8 @@
 }

 // Test that idle notification can be handled and eventually returns true.
+// This just checks the contract of the IdleNotification() function,
+// and does not verify that it does reasonable work.
 THREADED_TEST(IdleNotificationWithHint) {
   v8::HandleScope scope;
   LocalContext env;
@@ -13488,7 +13492,7 @@
   }
   CHECK(rv == true);
   intptr_t new_size = HEAP->SizeOfObjects();
-  CHECK(no_idle_work || new_size < 3 * old_size / 4);
+  CHECK(no_idle_work || new_size < old_size);
 }


=======================================
--- /branches/bleeding_edge/test/cctest/test-heap.cc Tue Dec 6 06:30:21 2011 +++ /branches/bleeding_edge/test/cctest/test-heap.cc Wed Dec 7 08:08:09 2011
@@ -1290,7 +1290,8 @@
   CHECK(old_capacity == new_capacity);
 }

-
+// This just checks the contract of the IdleNotification() function,
+// and does not verify that it does reasonable work.
 TEST(IdleNotificationAdvancesIncrementalMarking) {
   if (!FLAG_incremental_marking || !FLAG_incremental_marking_steps) return;
   InitializeVM();
@@ -1315,5 +1316,5 @@
   bool no_idle_work = v8::V8::IdleNotification(900);
   while (!v8::V8::IdleNotification(900)) ;
   intptr_t new_size = HEAP->SizeOfObjects();
-  CHECK(no_idle_work || new_size < 3 * old_size / 4);
-}
+  CHECK(no_idle_work || new_size < old_size);
+}

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to