From: Martin Quinson Date: Tue, 3 Apr 2018 11:45:39 +0000 (+0200) Subject: s4u: test what happens when we kill a newborn actor (seems to work) X-Git-Tag: v3.20~546 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/ca112da1ded1f7e3308c4186e4188ad96b3b4032 s4u: test what happens when we kill a newborn actor (seems to work) --- diff --git a/examples/s4u/actor-kill/s4u-actor-kill.cpp b/examples/s4u/actor-kill/s4u-actor-kill.cpp index 366364088e..51c90b62d0 100644 --- a/examples/s4u/actor-kill/s4u-actor-kill.cpp +++ b/examples/s4u/actor-kill/s4u-actor-kill.cpp @@ -52,6 +52,13 @@ static void killer() simgrid::s4u::this_actor::sleep_for(1); + XBT_INFO("Start a new actor, and kill it right away"); + simgrid::s4u::ActorPtr victimC = + simgrid::s4u::Actor::createActor("victim C", simgrid::s4u::Host::by_name("Jupiter"), victimA_fun); + victimC->kill(); + + simgrid::s4u::this_actor::sleep_for(1); + XBT_INFO("Killing everybody but myself"); simgrid::s4u::Actor::killAll(); @@ -72,7 +79,5 @@ int main(int argc, char* argv[]) e.run(); /* - Run the simulation */ - XBT_INFO("Simulation time %g", e.getClock()); - return 0; } diff --git a/examples/s4u/actor-kill/s4u-actor-kill.tesh b/examples/s4u/actor-kill/s4u-actor-kill.tesh index eca4cd3996..ba2afdcb46 100644 --- a/examples/s4u/actor-kill/s4u-actor-kill.tesh +++ b/examples/s4u/actor-kill/s4u-actor-kill.tesh @@ -10,6 +10,7 @@ $ $SG_TEST_EXENV ${bindir:=.}/s4u-actor-kill ${platfdir}/small_platform.xml "--l > [ 12.000000] (killer@Tremblay) Kill the victim A > [ 12.000000] (victim A@Fafard) I have been killed! > [ 13.000000] (killer@Tremblay) Kill victimB, even if it's already dead -> [ 14.000000] (killer@Tremblay) Killing everybody but myself -> [ 14.000000] (killer@Tremblay) OK, goodbye now. I commit a suicide. -> [ 14.000000] (maestro@) Simulation time 14 +> [ 14.000000] (killer@Tremblay) Start a new actor, and kill it right away +> [ 14.000000] (victim C@Jupiter) I have been killed! +> [ 15.000000] (killer@Tremblay) Killing everybody but myself +> [ 15.000000] (killer@Tremblay) OK, goodbye now. I commit a suicide.