aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_netjail_start_v2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing_api_cmd_netjail_start_v2.c')
-rw-r--r--src/testing/testing_api_cmd_netjail_start_v2.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/testing/testing_api_cmd_netjail_start_v2.c b/src/testing/testing_api_cmd_netjail_start_v2.c
index 9123148a7..faabed98e 100644
--- a/src/testing/testing_api_cmd_netjail_start_v2.c
+++ b/src/testing/testing_api_cmd_netjail_start_v2.c
@@ -19,7 +19,7 @@
19 */ 19 */
20 20
21/** 21/**
22 * @file testing/testing_api_cmd_hello_world.c 22 * @file testing/testing_api_cmd_netjail_start_v2.c
23 * @brief Command to start the netjail script. 23 * @brief Command to start the netjail script.
24 * @author t3sserakt 24 * @author t3sserakt
25 */ 25 */
@@ -59,8 +59,7 @@ struct NetJailState
59 * 59 *
60 */ 60 */
61static void 61static void
62netjail_start_cleanup (void *cls, 62netjail_start_cleanup (void *cls)
63 const struct GNUNET_TESTING_Command *cmd)
64{ 63{
65 struct NetJailState *ns = cls; 64 struct NetJailState *ns = cls;
66 65
@@ -90,13 +89,13 @@ netjail_start_cleanup (void *cls,
90 * Trait function of this cmd does nothing. 89 * Trait function of this cmd does nothing.
91 * 90 *
92 */ 91 */
93static int 92static enum GNUNET_GenericReturnValue
94netjail_start_traits (void *cls, 93netjail_start_traits (void *cls,
95 const void **ret, 94 const void **ret,
96 const char *trait, 95 const char *trait,
97 unsigned int index) 96 unsigned int index)
98{ 97{
99 return GNUNET_OK; 98 return GNUNET_NO;
100} 99}
101 100
102 101
@@ -127,17 +126,14 @@ child_completed_callback (void *cls,
127} 126}
128 127
129 128
130
131/** 129/**
132* The run method starts the script which setup the network namespaces. 130* The run method starts the script which setup the network namespaces.
133* 131*
134* @param cls closure. 132* @param cls closure.
135* @param cmd CMD being run.
136* @param is interpreter state. 133* @param is interpreter state.
137*/ 134*/
138static void 135static void
139netjail_start_run (void *cls, 136netjail_start_run (void *cls,
140 const struct GNUNET_TESTING_Command *cmd,
141 struct GNUNET_TESTING_Interpreter *is) 137 struct GNUNET_TESTING_Interpreter *is)
142{ 138{
143 struct NetJailState *ns = cls; 139 struct NetJailState *ns = cls;
@@ -157,7 +153,7 @@ netjail_start_run (void *cls,
157 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 153 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
158 "No SUID for %s!\n", 154 "No SUID for %s!\n",
159 NETJAIL_START_SCRIPT); 155 NETJAIL_START_SCRIPT);
160 GNUNET_TESTING_interpreter_fail (); 156 GNUNET_TESTING_interpreter_fail (is);
161 return; 157 return;
162 } 158 }
163 if (GNUNET_SYSERR == helper_check) 159 if (GNUNET_SYSERR == helper_check)
@@ -165,7 +161,7 @@ netjail_start_run (void *cls,
165 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 161 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
166 "%s not found!\n", 162 "%s not found!\n",
167 NETJAIL_START_SCRIPT); 163 NETJAIL_START_SCRIPT);
168 GNUNET_TESTING_interpreter_fail (); 164 GNUNET_TESTING_interpreter_fail (is);
169 return; 165 return;
170 } 166 }
171 167
@@ -180,7 +176,7 @@ netjail_start_run (void *cls,
180 pid, 176 pid,
181 NULL 177 NULL
182 }; 178 };
183 179
184 ns->start_proc 180 ns->start_proc
185 = GNUNET_OS_start_process_vap (GNUNET_OS_INHERIT_STD_ERR, 181 = GNUNET_OS_start_process_vap (GNUNET_OS_INHERIT_STD_ERR,
186 NULL, 182 NULL,
@@ -198,7 +194,7 @@ netjail_start_run (void *cls,
198 194
199/** 195/**
200 * This function checks the flag NetJailState 196 * This function checks the flag NetJailState
201 * 197 *
202 * FIXME: fix comment! 198 * FIXME: fix comment!
203 * #finished, if this cmd finished. 199 * #finished, if this cmd finished.
204 * 200 *