X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/094f8030615de0e14e62998639191349da06ddef..347996b4a10c4e8579080692afa60e0afb88b60a:/teshsuite/msg/host_on_off_processes/host_on_off_processes.c diff --git a/teshsuite/msg/host_on_off_processes/host_on_off_processes.c b/teshsuite/msg/host_on_off_processes/host_on_off_processes.c index b0ab9426bf..c6e82220cb 100644 --- a/teshsuite/msg/host_on_off_processes/host_on_off_processes.c +++ b/teshsuite/msg/host_on_off_processes/host_on_off_processes.c @@ -21,6 +21,7 @@ int commRX(int argc, char *argv[]); int commTX(int argc, char *argv[]); xbt_dynar_t tests; +int tasks_done = 0; int test_launcher(int argc, char *argv[]) { @@ -42,7 +43,7 @@ int test_launcher(int argc, char *argv[]) XBT_INFO(" Turn off Jupiter"); MSG_host_off(jupiter); MSG_process_sleep(10); - XBT_INFO("Test 1 seems ok, cool !(number of Process : %d, it should be 1 (i.e. the Test one))", MSG_process_get_number()); + XBT_INFO("Test 1 seems ok, cool !(#Processes: %d, it should be 1; #tasks: %d)", MSG_process_get_number(), tasks_done); } test = 2; @@ -172,7 +173,6 @@ int test_launcher(int argc, char *argv[]) return 0; } -// adsein: Is this really a daemon ? it ran only one task ? I just added a stupid loop int process_daemon(int argc, char *argv[]) { msg_task_t task = NULL; @@ -182,6 +182,7 @@ int process_daemon(int argc, char *argv[]) XBT_INFO(" Execute daemon"); MSG_task_execute(task); MSG_task_destroy(task); + tasks_done ++; } XBT_INFO(" daemon done. See you!"); return 0; @@ -273,8 +274,5 @@ int main(int argc, char *argv[]) XBT_INFO("Simulation time %g", MSG_get_clock()); - if (res == MSG_OK) - return 0; - else - return 1; + return res != MSG_OK; } /* end_of_main */