| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include <fcntl.h> | 5 #include <fcntl.h> |
| 6 #include <launchpad/launchpad.h> | 6 #include <launchpad/launchpad.h> |
| 7 #include <launchpad/vmo.h> | 7 #include <launchpad/vmo.h> |
| 8 #include <magenta/status.h> | 8 #include <magenta/status.h> |
| 9 #include <magenta/syscalls.h> | 9 #include <magenta/syscalls.h> |
| 10 #include <magenta/syscalls/object.h> | 10 #include <magenta/syscalls/object.h> |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // TODO(zra): Make this a command line argument | 25 // TODO(zra): Make this a command line argument |
| 26 const char* kRunVmTestsPath = "/system/bin/dart_vm_tests"; | 26 const char* kRunVmTestsPath = "/system/bin/dart_vm_tests"; |
| 27 | 27 |
| 28 // clang-format off | 28 // clang-format off |
| 29 // Tests that are invalid, wedge, or cause panics. | 29 // Tests that are invalid, wedge, or cause panics. |
| 30 const char* kSkip[] = { | 30 const char* kSkip[] = { |
| 31 // These expect a file to exist that we aren't putting in the image. | 31 // These expect a file to exist that we aren't putting in the image. |
| 32 "Read", | 32 "Read", |
| 33 "FileLength", | 33 "FileLength", |
| 34 "FilePosition", | 34 "FilePosition", |
| 35 // Crash in abort() and then hang. (MG-252) | 35 // No realpath, files not in image. |
| 36 "ArrayLengthMaxElements", | 36 "Dart2JSCompilerStats", |
| 37 "Int8ListLengthMaxElements", | 37 "Dart2JSCompileAll", |
| 38 "ArrayNew_Overflow_Crash", | |
| 39 "SNPrint_BadArgs", | |
| 40 "IsolateReload_PendingUnqualifiedCall_InstanceToStatic", | |
| 41 "IsolateReload_PendingUnqualifiedCall_StaticToInstance", | |
| 42 "IsolateReload_PendingConstructorCall_AbstractToConcrete", | |
| 43 "IsolateReload_PendingConstructorCall_ConcreteToAbstract", | |
| 44 "IsolateReload_PendingStaticCall_DefinedToNSM", | |
| 45 "IsolateReload_PendingStaticCall_NSMToDefined", | |
| 46 // The profiler is turned off. | 38 // The profiler is turned off. |
| 47 "Profiler_AllocationSampleTest", | 39 "Profiler_AllocationSampleTest", |
| 48 "Profiler_ArrayAllocation", | 40 "Profiler_ArrayAllocation", |
| 49 "Profiler_BasicSourcePosition", | 41 "Profiler_BasicSourcePosition", |
| 50 "Profiler_BasicSourcePositionOptimized", | 42 "Profiler_BasicSourcePositionOptimized", |
| 51 "Profiler_BinaryOperatorSourcePosition", | 43 "Profiler_BinaryOperatorSourcePosition", |
| 52 "Profiler_BinaryOperatorSourcePositionOptimized", | 44 "Profiler_BinaryOperatorSourcePositionOptimized", |
| 53 "Profiler_ChainedSamples", | 45 "Profiler_ChainedSamples", |
| 54 "Profiler_ClosureAllocation", | 46 "Profiler_ClosureAllocation", |
| 55 "Profiler_CodeTicks", | 47 "Profiler_CodeTicks", |
| 56 "Profiler_ContextAllocation", | 48 "Profiler_ContextAllocation", |
| 57 "Profiler_FunctionInline", | 49 "Profiler_FunctionInline", |
| 58 "Profiler_FunctionTicks", | 50 "Profiler_FunctionTicks", |
| 59 "Profiler_InliningIntervalBoundry", | 51 "Profiler_InliningIntervalBoundry", |
| 60 "Profiler_IntrinsicAllocation", | 52 "Profiler_IntrinsicAllocation", |
| 61 "Profiler_SampleBufferIterateTest", | 53 "Profiler_SampleBufferIterateTest", |
| 62 "Profiler_SampleBufferWrapTest", | 54 "Profiler_SampleBufferWrapTest", |
| 63 "Profiler_SourcePosition", | 55 "Profiler_SourcePosition", |
| 64 "Profiler_SourcePositionOptimized", | 56 "Profiler_SourcePositionOptimized", |
| 65 "Profiler_StringAllocation", | 57 "Profiler_StringAllocation", |
| 66 "Profiler_StringInterpolation", | 58 "Profiler_StringInterpolation", |
| 67 "Profiler_ToggleRecordAllocation", | 59 "Profiler_ToggleRecordAllocation", |
| 68 "Profiler_TrivialRecordAllocation", | 60 "Profiler_TrivialRecordAllocation", |
| 69 "Profiler_TypedArrayAllocation", | 61 "Profiler_TypedArrayAllocation", |
| 70 "Profiler_GetSourceReport", | 62 "Profiler_GetSourceReport", |
| 71 "Service_Profile", | 63 "Service_Profile", |
| 72 // No realpath, files not in image. | 64 }; |
| 73 "Dart2JSCompilerStats", | 65 |
| 74 "Dart2JSCompileAll", | 66 // Expected to fail/crash. |
| 75 // Uses too much memory. | 67 const char* kExpectFail[] = { |
| 76 "PrintJSON", | 68 "Fail0", |
| 69 "Fail1", |
| 70 "Fail2", |
| 71 "AllocGeneric_Overflow", |
| 72 "CodeImmutability", |
| 73 "IsolateReload_PendingUnqualifiedCall_StaticToInstance", |
| 74 "IsolateReload_PendingConstructorCall_AbstractToConcrete", |
| 75 "IsolateReload_PendingConstructorCall_ConcreteToAbstract", |
| 76 "IsolateReload_PendingUnqualifiedCall_InstanceToStatic", |
| 77 "IsolateReload_PendingStaticCall_DefinedToNSM", |
| 78 "IsolateReload_PendingStaticCall_NSMToDefined", |
| 79 "ArrayNew_Overflow_Crash", |
| 80 "SNPrint_BadArgs", |
| 81 }; |
| 82 |
| 83 // Bugs to fix, or things that are not yet implemented. |
| 84 const char* kBugs[] = { |
| 77 // Need OS::GetCurrentThreadCPUMicros. | 85 // Need OS::GetCurrentThreadCPUMicros. |
| 78 // Skipping because they crash and hang. (MG-252) | |
| 79 "Timeline_Dart_TimelineGetTrace", | |
| 80 "Timeline_Dart_TimelineGetTraceOnlyDartEvents", | 86 "Timeline_Dart_TimelineGetTraceOnlyDartEvents", |
| 81 "Timeline_Dart_TimelineGetTraceWithDartEvents", | 87 "Timeline_Dart_TimelineGetTraceWithDartEvents", |
| 82 "Timeline_Dart_TimelineGetTraceGlobalOverride", | |
| 83 "Timeline_Dart_GlobalTimelineGetTrace", | 88 "Timeline_Dart_GlobalTimelineGetTrace", |
| 84 "Timeline_Dart_GlobalTimelineGetTrace_Threaded", | |
| 85 "TimelineEventDuration", | 89 "TimelineEventDuration", |
| 86 "TimelineEventDurationPrintJSON", | 90 "TimelineEventDurationPrintJSON", |
| 87 "TimelineEventArguments", | 91 "TimelineEventArguments", |
| 88 "TimelineEventArgumentsPrintJSON", | 92 "TimelineEventArgumentsPrintJSON", |
| 89 "TimelineEventCallbackRecorderBasic", | 93 "TimelineEventCallbackRecorderBasic", |
| 90 "TimelineAnalysis_ThreadBlockCount", | 94 "TimelineAnalysis_ThreadBlockCount", |
| 91 "TimelineRingRecorderJSONOrder", | 95 "TimelineRingRecorderJSONOrder", |
| 92 "TimelinePauses_BeginEnd", | 96 "TimelinePauses_BeginEnd", |
| 93 }; | 97 "Timeline_Dart_TimelineGetTrace", |
| 98 "Timeline_Dart_TimelineGetTraceGlobalOverride", |
| 99 "Timeline_Dart_GlobalTimelineGetTrace_Threaded", |
| 94 | 100 |
| 95 // Expected to fail/crash. | 101 // Need VirtualMemory reservation with mmap. |
| 96 const char* kExpectFail[] = { | 102 "ArrayLengthMaxElements", |
| 97 "Fail0", | 103 "Int8ListLengthMaxElements", |
| 98 "Fail1", | 104 |
| 99 "Fail2", | |
| 100 "AllocGeneric_Overflow", | |
| 101 "CodeImmutability", | |
| 102 // Assumes initial thread's stack is the same size as spawned thread stacks. | 105 // Assumes initial thread's stack is the same size as spawned thread stacks. |
| 103 "StackOverflowStacktraceInfo", | 106 "StackOverflowStacktraceInfo", |
| 104 }; | 107 }; |
| 105 | |
| 106 // Bugs to fix, or things that are not yet implemented. | |
| 107 const char* kBugs[] = { | |
| 108 // Needs read of RSS. | |
| 109 "InitialRSS", | |
| 110 }; | |
| 111 // clang-format on | 108 // clang-format on |
| 112 | 109 |
| 113 static bool contains(const char** list, intptr_t len, const char* str) { | 110 static bool contains(const char** list, intptr_t len, const char* str) { |
| 114 for (intptr_t i = 0; i < len; i++) { | 111 for (intptr_t i = 0; i < len; i++) { |
| 115 if (strcmp(list[i], str) == 0) { | 112 if (strcmp(list[i], str) == 0) { |
| 116 return true; | 113 return true; |
| 117 } | 114 } |
| 118 } | 115 } |
| 119 return false; | 116 return false; |
| 120 } | 117 } |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 RETURN_IF_ERROR(status); | 444 RETURN_IF_ERROR(status); |
| 448 | 445 |
| 449 // Complain if we didn't try to run all of the tests. | 446 // Complain if we didn't try to run all of the tests. |
| 450 if (test_list_index != lines_count) { | 447 if (test_list_index != lines_count) { |
| 451 fprintf(stderr, "Failed to attempt all the tests!\n"); | 448 fprintf(stderr, "Failed to attempt all the tests!\n"); |
| 452 fflush(0); | 449 fflush(0); |
| 453 return -1; | 450 return -1; |
| 454 } | 451 } |
| 455 return 0; | 452 return 0; |
| 456 } | 453 } |
| OLD | NEW |