return 0;
}
-static int process_sleep(int /*argc*/, char** /*argv*/)
-{
- for (;;) {
- XBT_INFO(" I'm alive but I should sleep");
- int res = MSG_process_sleep(10);
- if (res == MSG_HOST_FAILURE) {
- XBT_INFO("Host as died as expected, do nothing else");
- return 0;
- }
- }
- XBT_INFO(" I'm done. See you!");
- return 0;
-}
-
static int commTX(int /*argc*/, char** /*argv*/)
{
const char* mailbox = "comm";
test = 3;
// Create a process running sucessive 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_INFO("Test 3:");
- MSG_host_on(jupiter);
- argvF = xbt_new(char*, 2);
- argvF[0] = xbt_strdup("process_sleep");
- MSG_process_create_with_arguments("process_sleep", process_sleep, NULL, jupiter, 1, argvF);
- MSG_process_sleep(100);
- XBT_INFO(" Turn off");
- MSG_host_off(jupiter);
- XBT_INFO(" sleep for 10 seconds");
- MSG_process_sleep(10000);
- XBT_INFO("number of Process : %d it should be 1 (i.e. the Test one))", MSG_process_get_number());
+ xbt_die("Test 3 is superseeded by activity-lifecycle");
}
test = 4;
> [Jupiter:process_daemon:(2) 2.000000] [msg_test/INFO] Execute daemon
> [Tremblay:test_launcher:(1) 3.000000] [msg_test/INFO] Turn off Jupiter
> [Jupiter:process_daemon:(2) 3.000000] [msg_test/INFO] Execute daemon
-> [Jupiter:process_daemon:(2) 3.000000] [msg_test/INFO] Host as died as expected, do nothing else
-> [Tremblay:test_launcher:(1) 13.000000] [msg_test/INFO] Test 1 seems ok, cool !(#Processes: 1, it should be 1; #tasks: 4)
+> [Tremblay:test_launcher:(1) 13.000000] [msg_test/INFO] Test 1 seems ok, cool !(#Processes: 1, it should be 1; #tasks: 3)
> [Tremblay:test_launcher:(1) 13.000000] [msg_test/INFO] Test done. See you!
> [13.000000] [msg_test/INFO] Simulation time 13
> [Tremblay:test_launcher:(1) 20.000000] [msg_test/INFO] Test done. See you!
> [20.000000] [msg_test/INFO] Simulation time 20
-$ ${bindir}/host_on_off_processes ${platfdir}/small_platform.xml 3 --log=no_loc
-> [Tremblay:test_launcher:(1) 0.000000] [msg_test/INFO] Test 3:
-> [Jupiter:process_sleep:(2) 0.000000] [msg_test/INFO] I'm alive but I should sleep
-> [Jupiter:process_sleep:(2) 10.000000] [msg_test/INFO] I'm alive but I should sleep
-> [Jupiter:process_sleep:(2) 20.000000] [msg_test/INFO] I'm alive but I should sleep
-> [Jupiter:process_sleep:(2) 30.000000] [msg_test/INFO] I'm alive but I should sleep
-> [Jupiter:process_sleep:(2) 40.000000] [msg_test/INFO] I'm alive but I should sleep
-> [Jupiter:process_sleep:(2) 50.000000] [msg_test/INFO] I'm alive but I should sleep
-> [Jupiter:process_sleep:(2) 60.000000] [msg_test/INFO] I'm alive but I should sleep
-> [Jupiter:process_sleep:(2) 70.000000] [msg_test/INFO] I'm alive but I should sleep
-> [Jupiter:process_sleep:(2) 80.000000] [msg_test/INFO] I'm alive but I should sleep
-> [Jupiter:process_sleep:(2) 90.000000] [msg_test/INFO] I'm alive but I should sleep
-> [Tremblay:test_launcher:(1) 100.000000] [msg_test/INFO] Turn off
-> [Jupiter:process_sleep:(2) 100.000000] [msg_test/INFO] I'm alive but I should sleep
-> [Tremblay:test_launcher:(1) 100.000000] [msg_test/INFO] sleep for 10 seconds
-> [Jupiter:process_sleep:(2) 100.000000] [msg_test/INFO] Host as died as expected, do nothing else
-> [Tremblay:test_launcher:(1) 10100.000000] [msg_test/INFO] number of Process : 1 it should be 1 (i.e. the Test one))
-> [Tremblay:test_launcher:(1) 10100.000000] [msg_test/INFO] Test done. See you!
-> [10100.000000] [msg_test/INFO] Simulation time 10100
-
$ ${bindir}/host_on_off_processes ${platfdir}/small_platform.xml 4 --log=no_loc
> [Tremblay:test_launcher:(1) 0.000000] [msg_test/INFO] Test 4 (turn off src during a communication) : Create a Process/task to make a communication between Jupiter and Tremblay and turn off Jupiter during the communication
> [Tremblay:commRX:(2) 10.000000] [msg_test/INFO] Start RX
> [Tremblay:test_launcher:(1) 20.000000] [msg_test/INFO] Turn Jupiter off
> [Tremblay:test_launcher:(1) 20.000000] [msg_test/INFO] Test 4 is ok. (number of Process : 2, it should be 1 or 2 if RX has not been satisfied). An exception is raised when we turn off a node that has a process sleeping
> [Tremblay:test_launcher:(1) 20.000000] [msg_test/INFO] Test done. See you!
-> [Jupiter:commTX:(3) 20.000000] [msg_test/INFO] The host has died ... as expected.
-> [Jupiter:commTX:(3) 20.000000] [msg_test/INFO] TX done
> [Tremblay:commRX:(2) 20.000000] [msg_test/INFO] Receive message: TRANSFER_FAILURE
> [Tremblay:commRX:(2) 20.000000] [msg_test/INFO] RX Done
> [20.000000] [msg_test/INFO] Simulation time 20