aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_exec_bash_script.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing_api_cmd_exec_bash_script.c')
-rw-r--r--src/testing/testing_api_cmd_exec_bash_script.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/testing/testing_api_cmd_exec_bash_script.c b/src/testing/testing_api_cmd_exec_bash_script.c
index 5b9f5cbbb..7e7aafb69 100644
--- a/src/testing/testing_api_cmd_exec_bash_script.c
+++ b/src/testing/testing_api_cmd_exec_bash_script.c
@@ -37,7 +37,7 @@ struct BashScriptState
37 struct GNUNET_TESTING_AsyncContext ac; 37 struct GNUNET_TESTING_AsyncContext ac;
38 38
39 /** 39 /**
40 * Callback handed over to the command, which should 40 * Callback handed over to the command, which should
41 * be called upon death or completion of the script. 41 * be called upon death or completion of the script.
42 */ 42 */
43 GNUNET_ChildCompletedCallback cb; 43 GNUNET_ChildCompletedCallback cb;
@@ -55,13 +55,13 @@ struct BashScriptState
55 */ 55 */
56 const char *script; 56 const char *script;
57 57
58 58
59 /** 59 /**
60 * Arguments for the script 60 * Arguments for the script
61 */ 61 */
62 char **script_argv; 62 char **script_argv;
63 63
64 /** 64 /**
65 * Size of script_argv. 65 * Size of script_argv.
66 */ 66 */
67 int argc; 67 int argc;
@@ -115,8 +115,7 @@ child_completed_callback (void *cls,
115 if (0 == exit_code) 115 if (0 == exit_code)
116 { 116 {
117 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 117 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
118 "Child succeeded!\n", 118 "Child succeeded!\n");
119 exit_code);
120 GNUNET_TESTING_async_finish (&bss->ac); 119 GNUNET_TESTING_async_finish (&bss->ac);
121 } 120 }
122 else 121 else
@@ -141,7 +140,7 @@ exec_bash_script_run (void *cls,
141 struct BashScriptState *bss = cls; 140 struct BashScriptState *bss = cls;
142 enum GNUNET_GenericReturnValue helper_check; 141 enum GNUNET_GenericReturnValue helper_check;
143 char *argv[bss->argc + 2]; 142 char *argv[bss->argc + 2];
144 143
145 char *data_dir; 144 char *data_dir;
146 char *script_name; 145 char *script_name;
147 146
@@ -180,7 +179,7 @@ exec_bash_script_run (void *cls,
180 argv[i + 1] = bss->script_argv[i]; 179 argv[i + 1] = bss->script_argv[i];
181 } 180 }
182 argv[bss->argc] = NULL; 181 argv[bss->argc] = NULL;
183 182
184 bss->start_proc = GNUNET_OS_start_process_vap (GNUNET_OS_INHERIT_STD_ERR, 183 bss->start_proc = GNUNET_OS_start_process_vap (GNUNET_OS_INHERIT_STD_ERR,
185 NULL, 184 NULL,
186 NULL, 185 NULL,
@@ -204,7 +203,7 @@ GNUNET_TESTING_cmd_exec_bash_script (const char *label,
204 203
205 bss = GNUNET_new (struct BashScriptState); 204 bss = GNUNET_new (struct BashScriptState);
206 bss->script = script; 205 bss->script = script;
207 bss->script_argv = script_argv; 206 bss->script_argv = script_argv; // FIXME this is not just a cast to fix
208 bss->argc = argc; 207 bss->argc = argc;
209 bss->cb = cb; 208 bss->cb = cb;
210 209