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

Unified Diff: runtime/bin/run_vm_tests_fuchsia.cc

Issue 2475543004: Move to the new mx_handle syscall argument order (Closed)
Patch Set: Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/run_vm_tests_fuchsia.cc
diff --git a/runtime/bin/run_vm_tests_fuchsia.cc b/runtime/bin/run_vm_tests_fuchsia.cc
index fca5a6fe62ea6076a5f0e7c4ff9fd3b90cd95b5b..e9b7121f32b40f7e2727610994f24e2aeaeb14e1 100644
--- a/runtime/bin/run_vm_tests_fuchsia.cc
+++ b/runtime/bin/run_vm_tests_fuchsia.cc
@@ -324,7 +324,8 @@ static void* test_runner_thread(void* arg) {
const char* test = args->test_list[index];
char* test_stdout = NULL;
char* test_stderr = NULL;
- mx_handle_t vmo_dup = mx_handle_duplicate(binary_vmo, MX_RIGHT_SAME_RIGHTS);
+ mx_handle_t vmo_dup = MX_HANDLE_INVALID;
+ mx_handle_duplicate(binary_vmo, MX_RIGHT_SAME_RIGHTS, &vmo_dup);
int test_status = run_test(vmo_dup, test, &test_stdout, &test_stderr);
handle_result(test_status, test_stdout, test_stderr, test);
free(test_stdout);
@@ -392,8 +393,10 @@ int main(int argc, char** argv) {
// Run with --list to grab the list of tests.
char* list_stdout = NULL;
char* list_stderr = NULL;
- mx_handle_t list_vmo = mx_handle_duplicate(binary_vmo, MX_RIGHT_SAME_RIGHTS);
- RETURN_IF_ERROR(list_vmo);
+ mx_handle_t list_vmo = MX_HANDLE_INVALID;
+ mx_status_t status =
+ mx_handle_duplicate(binary_vmo, MX_RIGHT_SAME_RIGHTS, &list_vmo);
+ RETURN_IF_ERROR(status);
int list_result = run_test(list_vmo, "--list", &list_stdout, &list_stderr);
if (list_result != 0) {
fprintf(stderr, "Failed to list tests: %s\n%s\n", list_stdout, list_stderr);
@@ -430,7 +433,7 @@ int main(int argc, char** argv) {
}
free(test_list);
pthread_mutex_destroy(&args_mutex);
- mx_status_t status = mx_handle_close(binary_vmo);
+ status = mx_handle_close(binary_vmo);
RETURN_IF_ERROR(status);
// Complain if we didn't try to run all of the tests.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698