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/syscalls.h> | 8 #include <magenta/syscalls.h> |
9 #include <mxio/util.h> | 9 #include <mxio/util.h> |
10 #include <pthread.h> | 10 #include <pthread.h> |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 102 |
103 // Bugs to fix, or things that are not yet implemented. | 103 // Bugs to fix, or things that are not yet implemented. |
104 const char* kBugs[] = { | 104 const char* kBugs[] = { |
105 // Needs NativeSymbolResolver | 105 // Needs NativeSymbolResolver |
106 "Service_PersistentHandles", | 106 "Service_PersistentHandles", |
107 // Needs lstat | 107 // Needs lstat |
108 "DirectoryCreateTemp", | 108 "DirectoryCreateTemp", |
109 "DirectoryCreateDelete", | 109 "DirectoryCreateDelete", |
110 // Needs rename | 110 // Needs rename |
111 "DirectoryRename", | 111 "DirectoryRename", |
| 112 // Needs read of RSS. |
| 113 "InitialRSS", |
112 }; | 114 }; |
113 | 115 |
114 | 116 |
115 static bool contains(const char** list, intptr_t len, const char* str) { | 117 static bool contains(const char** list, intptr_t len, const char* str) { |
116 for (intptr_t i = 0; i < len; i++) { | 118 for (intptr_t i = 0; i < len; i++) { |
117 if (strcmp(list[i], str) == 0) { | 119 if (strcmp(list[i], str) == 0) { |
118 return true; | 120 return true; |
119 } | 121 } |
120 } | 122 } |
121 return false; | 123 return false; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 status = launchpad_create(argv[0], &lp); | 163 status = launchpad_create(argv[0], &lp); |
162 RETURN_IF_ERROR(status); | 164 RETURN_IF_ERROR(status); |
163 status = launchpad_arguments(lp, argc, argv); | 165 status = launchpad_arguments(lp, argc, argv); |
164 RETURN_IF_ERROR(status); | 166 RETURN_IF_ERROR(status); |
165 status = launchpad_clone_mxio_root(lp); | 167 status = launchpad_clone_mxio_root(lp); |
166 RETURN_IF_ERROR(status); | 168 RETURN_IF_ERROR(status); |
167 status = launchpad_add_pipe(lp, stdout_out, 1); | 169 status = launchpad_add_pipe(lp, stdout_out, 1); |
168 RETURN_IF_ERROR(status); | 170 RETURN_IF_ERROR(status); |
169 status = launchpad_add_pipe(lp, stderr_out, 2); | 171 status = launchpad_add_pipe(lp, stderr_out, 2); |
170 RETURN_IF_ERROR(status); | 172 RETURN_IF_ERROR(status); |
| 173 status = launchpad_add_vdso_vmo(lp); |
| 174 RETURN_IF_ERROR(status); |
171 status = launchpad_elf_load(lp, binary_vmo); | 175 status = launchpad_elf_load(lp, binary_vmo); |
172 RETURN_IF_ERROR(status); | 176 RETURN_IF_ERROR(status); |
173 status = launchpad_load_vdso(lp, MX_HANDLE_INVALID); | 177 status = launchpad_load_vdso(lp, MX_HANDLE_INVALID); |
174 RETURN_IF_ERROR(status); | 178 RETURN_IF_ERROR(status); |
175 *lp_out = lp; | 179 *lp_out = lp; |
176 return status; | 180 return status; |
177 } | 181 } |
178 | 182 |
179 | 183 |
180 // Start the test running and return file descriptors for the stdout and stderr | 184 // Start the test running and return file descriptors for the stdout and stderr |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 RETURN_IF_ERROR(status); | 442 RETURN_IF_ERROR(status); |
439 | 443 |
440 // Complain if we didn't try to run all of the tests. | 444 // Complain if we didn't try to run all of the tests. |
441 if (test_list_index != lines_count) { | 445 if (test_list_index != lines_count) { |
442 fprintf(stderr, "Failed to attempt all the tests!\n"); | 446 fprintf(stderr, "Failed to attempt all the tests!\n"); |
443 fflush(0); | 447 fflush(0); |
444 return -1; | 448 return -1; |
445 } | 449 } |
446 return 0; | 450 return 0; |
447 } | 451 } |
OLD | NEW |