Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
test that joining a terminated process still works
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 6 Feb 2017 20:47:51 +0000 (21:47 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 6 Feb 2017 20:47:57 +0000 (21:47 +0100)
This patch was provided by Samuel Thibault and (fix #135).

As noted by Samuel, this feature used to fail for SimGrid 3.12 and
3.13 but seems to work since 3.14. This new test intends to make sure
that it remains this way.

Many thanks for that Sam!

teshsuite/msg/process_join/process_join.c
teshsuite/msg/process_join/process_join.tesh

index 67cb1ad..a19aa05 100644 (file)
@@ -35,6 +35,13 @@ static int master(int argc, char *argv[])
   XBT_INFO("Join the slave (timeout 2)");
   MSG_process_join(process, 2);
 
+  XBT_INFO("Start slave");
+  process = MSG_process_create("slave from master", slave, NULL, MSG_host_self());
+  XBT_INFO("Waiting 4");
+  MSG_process_sleep(4);
+  XBT_INFO("Join the slave (timeout 1)");
+  MSG_process_join(process, 1);
+
   XBT_INFO("Goodbye now!");
 
   MSG_process_sleep(1);
index 1eb59c7..33a956d 100644 (file)
@@ -11,7 +11,12 @@ $ ./process_join$EXEEXT ${srcdir:=.}/../../../examples/platforms/small_platform.
 > [Tremblay:master:(1) 5.000000] [msg_test/INFO] Start slave
 > [Tremblay:slave from master:(4) 5.000000] [msg_test/INFO] Slave started
 > [Tremblay:master:(1) 5.000000] [msg_test/INFO] Join the slave (timeout 2)
-> [Tremblay:master:(1) 7.000000] [msg_test/INFO] Goodbye now!
+> [Tremblay:master:(1) 7.000000] [msg_test/INFO] Start slave
+> [Tremblay:slave from master:(5) 7.000000] [msg_test/INFO] Slave started
+> [Tremblay:master:(1) 7.000000] [msg_test/INFO] Waiting 4
 > [Tremblay:slave from master:(4) 8.000000] [msg_test/INFO] I'm done. See you!
-> [Tremblay:master:(1) 8.000000] [msg_test/INFO] Goodbye now!
-> [8.000000] [msg_test/INFO] Simulation time 8
+> [Tremblay:slave from master:(5) 10.000000] [msg_test/INFO] I'm done. See you!
+> [Tremblay:master:(1) 11.000000] [msg_test/INFO] Join the slave (timeout 1)
+> [Tremblay:master:(1) 11.000000] [msg_test/INFO] Goodbye now!
+> [Tremblay:master:(1) 12.000000] [msg_test/INFO] Goodbye now!
+> [12.000000] [msg_test/INFO] Simulation time 12