aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_netjail_start_testsystem.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing_api_cmd_netjail_start_testsystem.c')
-rw-r--r--src/testing/testing_api_cmd_netjail_start_testsystem.c31
1 files changed, 20 insertions, 11 deletions
diff --git a/src/testing/testing_api_cmd_netjail_start_testsystem.c b/src/testing/testing_api_cmd_netjail_start_testsystem.c
index 1222ae54b..4224a5736 100644
--- a/src/testing/testing_api_cmd_netjail_start_testsystem.c
+++ b/src/testing/testing_api_cmd_netjail_start_testsystem.c
@@ -62,6 +62,11 @@ struct HelperMessage
62struct NetJailState 62struct NetJailState
63{ 63{
64 /** 64 /**
65 * Context for our asynchronous completion.
66 */
67 struct GNUNET_TESTING_AsyncContext ac;
68
69 /**
65 * Pointer to the return value of the test. 70 * Pointer to the return value of the test.
66 * 71 *
67 */ 72 */
@@ -399,14 +404,16 @@ start_helper (struct NetJailState *ns, struct
399 struct GNUNET_HELPER_Handle *helper; 404 struct GNUNET_HELPER_Handle *helper;
400 struct GNUNET_CMDS_HelperInit *msg; 405 struct GNUNET_CMDS_HelperInit *msg;
401 struct TestingSystemCount *tbc; 406 struct TestingSystemCount *tbc;
402 char *const script_argv[] = {NETJAIL_EXEC_SCRIPT, 407 char *const script_argv[] = {
403 m_char, 408 NETJAIL_EXEC_SCRIPT,
404 n_char, 409 m_char,
405 GNUNET_OS_get_libexec_binary_path ( 410 n_char,
406 HELPER_CMDS_BINARY), 411 GNUNET_OS_get_libexec_binary_path (
407 ns->global_n, 412 HELPER_CMDS_BINARY),
408 ns->local_m, 413 ns->global_n,
409 NULL}; 414 ns->local_m,
415 NULL
416 };
410 unsigned int m = atoi (m_char); 417 unsigned int m = atoi (m_char);
411 unsigned int n = atoi (n_char); 418 unsigned int n = atoi (n_char);
412 unsigned int helper_check = GNUNET_OS_check_helper_binary ( 419 unsigned int helper_check = GNUNET_OS_check_helper_binary (
@@ -436,8 +443,9 @@ start_helper (struct NetJailState *ns, struct
436 NETJAIL_EXEC_SCRIPT); 443 NETJAIL_EXEC_SCRIPT);
437 *ns->rv = 1; 444 *ns->rv = 1;
438 } 445 }
439 446 GNUNET_array_append (ns->helper,
440 GNUNET_array_append (ns->helper, ns->n_helper, GNUNET_HELPER_start ( 447 ns->n_helper,
448 GNUNET_HELPER_start (
441 GNUNET_YES, 449 GNUNET_YES,
442 NETJAIL_EXEC_SCRIPT, 450 NETJAIL_EXEC_SCRIPT,
443 script_argv, 451 script_argv,
@@ -508,6 +516,7 @@ netjail_exec_run (void *cls,
508 * In this case a GNUNET_MESSAGE_TYPE_CMDS_HELPER_ALL_PEERS_STARTED is send to all peers. 516 * In this case a GNUNET_MESSAGE_TYPE_CMDS_HELPER_ALL_PEERS_STARTED is send to all peers.
509 * 3. Did all peers finished the test case. In this case interpreter_next will be called. 517 * 3. Did all peers finished the test case. In this case interpreter_next will be called.
510 * 518 *
519 * => FIXME: must change _completely_.
511 */ 520 */
512static int 521static int
513netjail_start_finish (void *cls, 522netjail_start_finish (void *cls,
@@ -598,7 +607,7 @@ GNUNET_TESTING_cmd_netjail_start_testing_system (const char *label,
598 .cls = ns, 607 .cls = ns,
599 .label = label, 608 .label = label,
600 .run = &netjail_exec_run, 609 .run = &netjail_exec_run,
601 .finish = &netjail_start_finish, 610 .ac = &ns->ac,
602 .cleanup = &netjail_exec_cleanup, 611 .cleanup = &netjail_exec_cleanup,
603 .traits = &netjail_exec_traits 612 .traits = &netjail_exec_traits
604 }; 613 };