static void task_cleanup_handler(void *task)
{
- MSG_task_destroy(task);
+ if (task)
+ MSG_task_destroy(task);
}
static int process_daemon(int argc, char *argv[])
MSG_process_sleep(10);
XBT_INFO(" Turn Jupiter off");
MSG_host_off(jupiter);
- XBT_INFO("Test 5 seems ok, cool !(number of Process : %d, it should be 2", MSG_process_get_number());
+ XBT_INFO("Test 5 seems ok (number of Process: %d, it should be 2)", MSG_process_get_number());
}
test =6;
if (xbt_dynar_search_or_negative(tests, &test)!=-1){
- MSG_process_set_data_cleanup(NULL); /* FIXME: we are leaking here, but removing this line changes the test output */
XBT_INFO("Test 6: Turn on Jupiter, assign a VM on Jupiter, launch a process inside the VM, and turn off the node");
// Create VM0
- int dpRate = 70;
- msg_vm_t vm0;
- msg_process_t daemon;
-
- vm0 = MSG_vm_create(jupiter, "vm0", 1, 2048, 125, dpRate);
+ msg_vm_t vm0 = MSG_vm_create_core(jupiter, "vm0");
MSG_vm_start(vm0);
argvF = xbt_new(char*, 2);
argvF[0] = xbt_strdup("process_daemon");
- daemon = MSG_process_create_with_arguments("process_daemon", process_daemon, NULL, (msg_host_t)vm0, 1, argvF);
+ msg_process_t daemon =
+ MSG_process_create_with_arguments("process_daemon", process_daemon, NULL, (msg_host_t)vm0, 1, argvF);
argvF = xbt_new(char*, 2);
argvF[0] = xbt_strdup("process_daemonJUPI");