X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9bfc714f74d8044a224b5c94ad3f69e540361841..c25a26b26202c93dc2bfa44d214b8f804b78b8b3:/teshsuite/msg/host_on_off_processes/host_on_off_processes.cpp diff --git a/teshsuite/msg/host_on_off_processes/host_on_off_processes.cpp b/teshsuite/msg/host_on_off_processes/host_on_off_processes.cpp index 9d311e570e..eb6b46359e 100644 --- a/teshsuite/msg/host_on_off_processes/host_on_off_processes.cpp +++ b/teshsuite/msg/host_on_off_processes/host_on_off_processes.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2010-2018. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2010-2019. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -61,7 +61,7 @@ static int commRX(int /*argc*/, char** /*argv*/) XBT_INFO(" Start RX"); msg_error_t error = MSG_task_receive(&(task), mailbox); if (error == MSG_OK) { - XBT_INFO(" Receive message: %s", task->name); + XBT_INFO(" Receive message: %s", MSG_task_get_name(task)); MSG_task_destroy(task); } else if (error == MSG_HOST_FAILURE) { XBT_INFO(" Receive message: HOST_FAILURE"); @@ -170,6 +170,7 @@ static int test_launcher(int /*argc*/, char** /*argv*/) test = 6; if (xbt_dynar_search_or_negative(tests, &test) != -1) { XBT_INFO("Test 6: Turn on Jupiter, assign a VM on Jupiter, launch a process inside the VM, and turn off the node"); + MSG_process_set_data_cleanup(nullptr); // If set for test 6, cleanup handler gives double-free errors. // Create VM0 msg_vm_t vm0 = MSG_vm_create_core(jupiter, "vm0"); @@ -224,6 +225,7 @@ int main(int argc, char* argv[]) MSG_create_environment(argv[1]); + MSG_process_set_data_cleanup(task_cleanup_handler); MSG_process_create("test_launcher", test_launcher, NULL, MSG_get_host_by_name("Tremblay")); res = MSG_main();