Allow for no samples in test-cpu-profiler/SampleWhenFrameIsNotSetup
authoryurys@chromium.org <yurys@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 17 May 2013 15:10:25 +0000 (15:10 +0000)
committeryurys@chromium.org <yurys@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 17 May 2013 15:10:25 +0000 (15:10 +0000)
The test should only check that there are no sample stacks that never possible in the JS code being profiled.

BUG=v8:2628
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/14845018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

test/cctest/cctest.status
test/cctest/test-cpu-profiler.cc

index 91c6d70..731e54d 100644 (file)
@@ -39,10 +39,6 @@ test-api/ApplyInterruption: PASS || TIMEOUT
 # when snapshot is on, so I am marking it PASS || FAIL
 test-heap-profiler/HeapSnapshotsDiff: PASS || FAIL
 
-# BUG(2628): These tests are flaky and sometimes fail, but should not crash.
-test-cpu-profiler/CollectCpuProfile: PASS || FAIL
-test-cpu-profiler/SampleWhenFrameIsNotSetup: PASS || FAIL
-
 # These tests always fail.  They are here to test test.py.  If
 # they don't fail then test.py has failed.
 test-serialize/TestThatAlwaysFails: FAIL
@@ -87,7 +83,8 @@ test-serialize/DeserializeFromSecondSerialization: SKIP
 # BUG(2628): Signal may come when pc is close to frame enter/exit code and on
 # simulator the stack frame is not set up when it is expected to be for the pc
 # value.
-test-cpu-profiler/SampleWhenFrameIsNotSetup: SKIP
+test-cpu-profiler/CollectCpuProfile: PASS || FAIL
+test-cpu-profiler/SampleWhenFrameIsNotSetup: PASS || FAIL
 
 ##############################################################################
 [ $arch == android_arm || $arch == android_ia32 ]
index 56aa9a7..22af9e7 100644 (file)
@@ -608,7 +608,9 @@ TEST(SampleWhenFrameIsNotSetup) {
   CheckChildrenNames(root, names);
 
   const v8::CpuProfileNode* startNode = FindChild(root, "start");
-  if (startNode->GetChildrenCount() > 0) {
+  // On slow machines there may be no meaningfull samples at all, skip the
+  // check there.
+  if (startNode && startNode->GetChildrenCount() > 0) {
     CHECK_EQ(1, startNode->GetChildrenCount());
     const v8::CpuProfileNode* delayNode = FindChild(startNode, "delay");
     if (delayNode->GetChildrenCount() > 0) {