From: Frederic Suter Date: Fri, 26 Apr 2019 12:22:58 +0000 (+0200) Subject: kill some dead code X-Git-Tag: v3.22.2~41 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/9f5732b35067b725950b05551481179bbb378ea1?hp=4ca7055f4a76fa00332cfa1b80f0759cc1c0dd12 kill some dead code --- diff --git a/examples/deprecated/msg/platform-failures/platform-failures.c b/examples/deprecated/msg/platform-failures/platform-failures.c index f575ea86c2..229a92993b 100644 --- a/examples/deprecated/msg/platform-failures/platform-failures.c +++ b/examples/deprecated/msg/platform-failures/platform-failures.c @@ -31,11 +31,6 @@ static int master(int argc, char *argv[]) XBT_INFO("Send to %s completed", mailbox); break; - case MSG_HOST_FAILURE: - XBT_INFO("Gloups. The cpu on which I'm running just turned off!. See you!"); - MSG_task_destroy(task); - return 0; - case MSG_TRANSFER_FAILURE: XBT_INFO("Mmh. Something went wrong with '%s'. Nevermind. Let's keep going!", mailbox); MSG_task_destroy(task); @@ -58,10 +53,6 @@ static int master(int argc, char *argv[]) msg_task_t task = MSG_task_create("finalize", 0, 0, FINALIZE); switch (MSG_task_send_with_timeout(task,mailbox,1.0)) { - case MSG_HOST_FAILURE: - XBT_INFO("Gloups. The cpu on which I'm running just turned off!. See you!"); - MSG_task_destroy(task); - break; case MSG_TRANSFER_FAILURE: XBT_INFO("Mmh. Can't reach '%s'! Nevermind. Let's keep going!", mailbox); @@ -108,17 +99,10 @@ static int worker(int argc, char *argv[]) if (retcode == MSG_OK) { XBT_INFO("Execution complete."); MSG_task_destroy(task); - } else if (retcode == MSG_HOST_FAILURE) { - XBT_INFO("Gloups. The cpu on which I'm running just turned off!. See you!"); - MSG_task_destroy(task); - return 0; } else { XBT_INFO("Hey ?! What's up ? "); xbt_die("Unexpected behavior"); } - } else if (retcode == MSG_HOST_FAILURE) { - XBT_INFO("Gloups. The cpu on which I'm running just turned off!. See you!"); - return 0; } else if (retcode == MSG_TRANSFER_FAILURE) { XBT_INFO("Mmh. Something went wrong. Nevermind. Let's keep going!"); } else { diff --git a/examples/s4u/platform-failures/s4u-platform-failures.cpp b/examples/s4u/platform-failures/s4u-platform-failures.cpp index 75669f5597..dea2f30316 100644 --- a/examples/s4u/platform-failures/s4u-platform-failures.cpp +++ b/examples/s4u/platform-failures/s4u-platform-failures.cpp @@ -58,10 +58,6 @@ static int master(int argc, char* argv[]) double* payload = new double(-1.0); try { mailbox->put(payload, 0, 1.0); - } catch (simgrid::HostFailureException& e) { - delete payload; - XBT_INFO("Gloups. The cpu on which I'm running just turned off!. See you!"); - return -1; } catch (simgrid::TimeoutError& e) { delete payload; XBT_INFO("Mmh. Got timeouted while speaking to '%s'. Nevermind. Let's keep going!", mailbox->get_cname()); @@ -99,10 +95,6 @@ static int worker(int argc, char* argv[]) XBT_INFO("Start execution..."); simgrid::s4u::this_actor::execute(comp_size); XBT_INFO("Execution complete."); - } catch (simgrid::HostFailureException& e) { - XBT_INFO("Gloups. The cpu on which I'm running just turned off!. See you!"); - delete payload; - return -1; } catch (xbt_ex& e) { if (e.category != network_error) xbt_die("Unexpected behavior. Category: %s", xbt_ex_catname(e.category)); diff --git a/teshsuite/s4u/activity-lifecycle/activity-lifecycle.cpp b/teshsuite/s4u/activity-lifecycle/activity-lifecycle.cpp index 1b83b80c44..f324b173df 100644 --- a/teshsuite/s4u/activity-lifecycle/activity-lifecycle.cpp +++ b/teshsuite/s4u/activity-lifecycle/activity-lifecycle.cpp @@ -366,10 +366,6 @@ static void test_host_off_while_receive() assert_exit(true, 1); try { simgrid::s4u::Mailbox::by_name("mb")->get(); - } catch (simgrid::HostFailureException const&) { - // Shouldn't get in here - in_catch_before_on_exit = not in_on_exit; - in_catch_after_on_exit = in_on_exit; } catch (simgrid::NetworkFailureException const&) { // Shouldn't get in here in_catch_before_on_exit = not in_on_exit; diff --git a/teshsuite/s4u/actor-autorestart/actor-autorestart.cpp b/teshsuite/s4u/actor-autorestart/actor-autorestart.cpp index c52156e769..cc861427e3 100644 --- a/teshsuite/s4u/actor-autorestart/actor-autorestart.cpp +++ b/teshsuite/s4u/actor-autorestart/actor-autorestart.cpp @@ -10,12 +10,8 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this s4u example") static void dummy() { XBT_INFO("I start"); - try { simgrid::s4u::this_actor::sleep_for(200); XBT_INFO("I stop"); - } catch (simgrid::HostFailureException& e) { - XBT_DEBUG("The host has died ... as expected. This actor silently stops"); - } } static void dummy_daemon()