From 89ef52f7b2f57280e81f67d226b1052123e67596 Mon Sep 17 00:00:00 2001 From: Frederic Suter Date: Mon, 4 Apr 2016 13:31:02 +0200 Subject: [PATCH] fix this untested example + exception use absolute path in trace, hardly reproducible --- examples/msg/exception/exception.c | 3 +-- examples/msg/exception/exception.tesh | 10 ++++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/msg/exception/exception.c b/examples/msg/exception/exception.c index 56b06f7862..e505e7595b 100644 --- a/examples/msg/exception/exception.c +++ b/examples/msg/exception/exception.c @@ -108,11 +108,10 @@ int main(int argc, char *argv[]) { msg_error_t res = MSG_OK; MSG_init(&argc, argv); - xbt_assert(argc > 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]); + xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]); MSG_create_environment(argv[1]); MSG_process_create("terrorist", terrorist, NULL, MSG_get_host_by_name("Jacquelin")); - MSG_launch_application(argv[2]); // Launch the simulation res = MSG_main(); diff --git a/examples/msg/exception/exception.tesh b/examples/msg/exception/exception.tesh index db3b7a7754..4dff602278 100644 --- a/examples/msg/exception/exception.tesh +++ b/examples/msg/exception/exception.tesh @@ -18,13 +18,15 @@ $ $SG_TEST_EXENV exception/exception ${srcdir:=.}/../platforms/platform.xml "--l > [ 3.000000] (2:victim@Jacquelin) The received exception resumed my suspension. Good. Here is it: ----------------------->8---- > ** SimGrid: UNCAUGHT EXCEPTION received on exception/exception(2): category: action canceled; value: 0 > ** Canceled -> ** Thrown by () on process 0 +> ** Thrown by maestro() on process 0 > [ 0.000000] (0:maestro@) Configuration change: Set 'exception/cutpath' to '1' > [ 3.000000] (2:victim@Jacquelin) Canceled > -> ** In SIMIX_execution_finish() at smx_host.c -> ** In SIMIX_run() at smx_global.c -> ** In MSG_main() at msg_global.c +> ** In SIMIX_execution_finish() at smx_host.cpp +> ** In SIMIX_post_host_execute() at smx_host.cpp +> ** In SIMIX_run() at src/simix/smx_global.cpp:482 (discriminator smx_global.cpp:482 (discriminator 1) +> ** In SIMIX_simcall_exit() at popping.cpp +> ** In MSG_main() at msg_global.cpp > ** In main() at exception.c > [ 3.000000] (2:victim@Jacquelin) (end of the second exception) ----8<------------------------ > [ 3.000000] (2:victim@Jacquelin) Let's sleep for 10 seconds. -- 2.20.1