X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f2572574976b4fee3c4dc79ea83c34ddcd5917d0..84402e8e2ee2a2d0bef25fdceb0a263ed8b471f6:/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 85eab76b4f..4f772e820e 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-2019. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2010-2020. 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. */ @@ -15,8 +15,7 @@ int tasks_done = 0; static void task_cleanup_handler(void* task) { - if (task) - MSG_task_destroy(static_cast(task)); + MSG_task_destroy(static_cast(task)); } static int process_daemon(int /*argc*/, char** /*argv*/) @@ -27,13 +26,9 @@ static int process_daemon(int /*argc*/, char** /*argv*/) msg_task_t task = MSG_task_create("daemon", MSG_host_get_speed(MSG_host_self()), 0, NULL); MSG_process_set_data(self, task); XBT_INFO(" Execute daemon"); - msg_error_t res = MSG_task_execute(task); + MSG_task_execute(task); MSG_task_destroy(task); tasks_done++; - if (res == MSG_HOST_FAILURE) { - XBT_INFO("Host has died as expected, do nothing else"); - return 0; - } } XBT_INFO(" daemon done. See you!"); return 0; @@ -112,7 +107,7 @@ static int test_launcher(int /*argc*/, char** /*argv*/) } test = 3; - // Create a process running sucessive sleeps on a host and turn the host off during the execution of the process. + // Create a process running successive sleeps on a host and turn the host off during the execution of the process. if (xbt_dynar_search_or_negative(tests, &test) != -1) { xbt_die("Test 3 is superseeded by activity-lifecycle"); } @@ -160,7 +155,6 @@ 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");