Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(435)

Side by Side Diff: runtime/bin/run_vm_tests_fuchsia.cc

Issue 2438843002: Fuchsia: Add native symbol resolver. Small fixes. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/bin/log_fuchsia.cc ('k') | runtime/platform/utils_fuchsia.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 "TimelinePauses_BeginEnd", 91 "TimelinePauses_BeginEnd",
92 }; 92 };
93 93
94 // Expected to fail/crash. 94 // Expected to fail/crash.
95 const char* kExpectFail[] = { 95 const char* kExpectFail[] = {
96 "Fail0", 96 "Fail0",
97 "Fail1", 97 "Fail1",
98 "Fail2", 98 "Fail2",
99 "AllocGeneric_Overflow", 99 "AllocGeneric_Overflow",
100 "CodeImmutability", 100 "CodeImmutability",
101 // Assumes initial thread's stack is the same size as spawned thread stacks.
102 "StackOverflowStacktraceInfo",
101 }; 103 };
102 104
103 // Bugs to fix, or things that are not yet implemented. 105 // Bugs to fix, or things that are not yet implemented.
104 const char* kBugs[] = { 106 const char* kBugs[] = {
105 // Needs NativeSymbolResolver
106 "Service_PersistentHandles",
107 // Needs lstat
108 "DirectoryCreateTemp",
109 "DirectoryCreateDelete",
110 // Needs rename
111 "DirectoryRename",
112 // Needs read of RSS. 107 // Needs read of RSS.
113 "InitialRSS", 108 "InitialRSS",
114 }; 109 };
115 110
116 111
117 static bool contains(const char** list, intptr_t len, const char* str) { 112 static bool contains(const char** list, intptr_t len, const char* str) {
118 for (intptr_t i = 0; i < len; i++) { 113 for (intptr_t i = 0; i < len; i++) {
119 if (strcmp(list[i], str) == 0) { 114 if (strcmp(list[i], str) == 0) {
120 return true; 115 return true;
121 } 116 }
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 } 334 }
340 pthread_mutex_unlock(args->test_list_lock); 335 pthread_mutex_unlock(args->test_list_lock);
341 336
342 return NULL; 337 return NULL;
343 } 338 }
344 339
345 340
346 static void run_all_tests(runner_args_t* args) { 341 static void run_all_tests(runner_args_t* args) {
347 const intptr_t num_cpus = sysconf(_SC_NPROCESSORS_CONF); 342 const intptr_t num_cpus = sysconf(_SC_NPROCESSORS_CONF);
348 pthread_t* threads = 343 pthread_t* threads =
349 reinterpret_cast<pthread_t*>(malloc(num_cpus * sizeof(pthread_t))); 344 reinterpret_cast<pthread_t*>(malloc(num_cpus * sizeof(pthread_t)));
350 for (int i = 0; i < num_cpus; i++) { 345 for (int i = 0; i < num_cpus; i++) {
351 pthread_create(&threads[i], NULL, test_runner_thread, args); 346 pthread_create(&threads[i], NULL, test_runner_thread, args);
352 } 347 }
353 for (int i = 0; i < num_cpus; i++) { 348 for (int i = 0; i < num_cpus; i++) {
354 pthread_join(threads[i], NULL); 349 pthread_join(threads[i], NULL);
355 } 350 }
356 free(threads); 351 free(threads);
357 } 352 }
358 353
359 354
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 RETURN_IF_ERROR(status); 435 RETURN_IF_ERROR(status);
441 436
442 // Complain if we didn't try to run all of the tests. 437 // Complain if we didn't try to run all of the tests.
443 if (test_list_index != lines_count) { 438 if (test_list_index != lines_count) {
444 fprintf(stderr, "Failed to attempt all the tests!\n"); 439 fprintf(stderr, "Failed to attempt all the tests!\n");
445 fflush(0); 440 fflush(0);
446 return -1; 441 return -1;
447 } 442 }
448 return 0; 443 return 0;
449 } 444 }
OLDNEW
« no previous file with comments | « runtime/bin/log_fuchsia.cc ('k') | runtime/platform/utils_fuchsia.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698