+static void test_comm_dsend_and_quit_get_before_put()
+{
+ XBT_INFO("%s: Launch a detached communication and end right after", __func__);
+ bool dsend_done = false;
+ bool recv_done = false;
+
+ simgrid::s4u::ActorPtr sender = simgrid::s4u::Actor::create("sender", all_hosts[1], [&dsend_done]() {
+ assert_exit(false, 2);
+ char* payload = xbt_strdup("toto");
+ simgrid::s4u::this_actor::sleep_for(2);
+ simgrid::s4u::Mailbox::by_name("mb")->put_init(payload, 1000)->detach();
+ dsend_done = true;
+ return;
+ });
+
+ simgrid::s4u::Actor::create("receiver", all_hosts[2], [&recv_done]() {
+ assert_exit(false, 3);
+ void* payload = simgrid::s4u::Mailbox::by_name("mb")->get();
+ xbt_free(payload);
+ recv_done = true;
+ return;
+ });
+
+ // Sleep long enough to let the test ends by itself. 3 + surf_precision should be enough.
+ simgrid::s4u::this_actor::sleep_for(4);
+ xbt_assert(dsend_done, "Sender killed somehow. It shouldn't");
+ xbt_assert(recv_done, "Receiver killed somehow. It shouldn't");
+}
+
+