mirror of
https://github.com/dart-lang/sdk
synced 2024-09-04 16:03:44 +00:00
Updated SimpleManyTasksWithZones test to not use PrintJSONForVM
Fixed test to not use PrintJSONForVM to get isolate information since it only returns @Isolates. Also removed some unnecessary comments and checks for isolate ids. BUG= R=johnmccutchan@google.com Review-Url: https://codereview.chromium.org/2567153002 .
This commit is contained in:
parent
c4ed99acc9
commit
0d16859d87
|
@ -9,8 +9,6 @@ cc/IsolateReload_PendingConstructorCall_ConcreteToAbstract: Fail, Crash
|
|||
cc/IsolateReload_PendingStaticCall_DefinedToNSM: Fail, Crash
|
||||
cc/IsolateReload_PendingStaticCall_NSMToDefined: Fail, Crash
|
||||
|
||||
cc/ManySimpleTasksWithZones: Fail, Crash # Just temporary
|
||||
|
||||
# These tests are expected to crash on all platforms.
|
||||
cc/ArrayNew_Overflow_Crash: Crash, Timeout
|
||||
cc/AllocGeneric_Overflow: Crash, Timeout
|
||||
|
|
|
@ -313,17 +313,16 @@ TEST_CASE(ManySimpleTasksWithZones) {
|
|||
done_count = 0;
|
||||
}
|
||||
|
||||
// Get the information for the current isolate.
|
||||
// We only need to check the current isolate since all tasks are spawned
|
||||
// inside this single isolate.
|
||||
JSONStream stream;
|
||||
Service::PrintJSONForVM(&stream, false);
|
||||
isolate->PrintJSON(&stream, false);
|
||||
const char* json = stream.ToCString();
|
||||
|
||||
// Confirm all expected entries are in the JSON output.
|
||||
for (intptr_t i = 0; i < kTaskCount + 1; i++) {
|
||||
Thread* thread = threads[i];
|
||||
Isolate* thread_isolate = thread->isolate();
|
||||
// Buffer can handle any possible input length given types.
|
||||
// char thread_address_buf[96];
|
||||
// char isolate_address_buf[64];
|
||||
Zone* top_zone = thread->zone();
|
||||
|
||||
Thread* current_thread = Thread::Current();
|
||||
|
@ -350,17 +349,7 @@ TEST_CASE(ManySimpleTasksWithZones) {
|
|||
"\"id\":\"threads\\/%" Pd "",
|
||||
OSThread::ThreadIdToIntPtr(thread->os_thread()->trace_id()));
|
||||
|
||||
// Ensure the isolate for each thread is valid.
|
||||
|
||||
char* isolate_info_buf =
|
||||
OS::SCreate(current_zone,
|
||||
"\"type\":\"Isolate\","
|
||||
"\"fixedId\":true,"
|
||||
"\"id\":\"isolates\\/%" Pd64 "",
|
||||
static_cast<int64_t>(thread_isolate->main_port()));
|
||||
|
||||
EXPECT_SUBSTRING(thread_info_buf, json);
|
||||
EXPECT_SUBSTRING(isolate_info_buf, json);
|
||||
}
|
||||
|
||||
// Unblock the tasks so they can finish.
|
||||
|
|
Loading…
Reference in a new issue