A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use listen_from in s4u test and kill the MSG one
[simgrid.git]
/
teshsuite
/
s4u
/
listen_async
/
listen_async.cpp
diff --git
a/teshsuite/s4u/listen_async/listen_async.cpp
b/teshsuite/s4u/listen_async/listen_async.cpp
index
20172e5
..
e277a3d
100644
(file)
--- a/
teshsuite/s4u/listen_async/listen_async.cpp
+++ b/
teshsuite/s4u/listen_async/listen_async.cpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2017-20
19
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2017-20
20
. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
@@
-6,7
+6,7
@@
/* Bug report: https://github.com/simgrid/simgrid/issues/40
*
* Task.listen used to be on async mailboxes as it always returned false.
/* Bug report: https://github.com/simgrid/simgrid/issues/40
*
* Task.listen used to be on async mailboxes as it always returned false.
- * This occur
e
s in Java and C, but is only tested here in C.
+ * This occurs in Java and C, but is only tested here in C.
*/
#include "simgrid/s4u.hpp"
*/
#include "simgrid/s4u.hpp"
@@
-21,7
+21,10
@@
static void server()
xbt_assert(mailbox->listen()); // True (1)
XBT_INFO("Task listen works on regular mailboxes");
xbt_assert(mailbox->listen()); // True (1)
XBT_INFO("Task listen works on regular mailboxes");
- std::string* res = static_cast<std::string*>(mailbox->get());
+ XBT_INFO("Mailbox::listen_from() returns %ld (should return my pid, which is %ld)", mailbox->listen_from(),
+ simgrid::s4u::this_actor::get_pid());
+
+ const std::string* res = static_cast<std::string*>(mailbox->get());
xbt_assert(*res == "Some data", "Data received: %s", res->c_str());
XBT_INFO("Data successfully received from regular mailbox");
xbt_assert(*res == "Some data", "Data received: %s", res->c_str());
XBT_INFO("Data successfully received from regular mailbox");