diff options
author | ng0 <ng0@n0.is> | 2019-09-08 12:33:09 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-09-08 12:33:09 +0000 |
commit | d41ed82a4ea0cc8e1674b6d5d2c49fd6462610bb (patch) | |
tree | 9efd18ea7d425652085ed0bd5e8e45604bc5f6b9 /src/include/gnunet_testing_lib.h | |
parent | a0fce305c565c0937d917a92712f15e9c5736260 (diff) | |
download | gnunet-d41ed82a4ea0cc8e1674b6d5d2c49fd6462610bb.tar.gz gnunet-d41ed82a4ea0cc8e1674b6d5d2c49fd6462610bb.zip |
uncrustify as demanded.
Diffstat (limited to 'src/include/gnunet_testing_lib.h')
-rw-r--r-- | src/include/gnunet_testing_lib.h | 101 |
1 files changed, 50 insertions, 51 deletions
diff --git a/src/include/gnunet_testing_lib.h b/src/include/gnunet_testing_lib.h index 0317b2007..370360eb1 100644 --- a/src/include/gnunet_testing_lib.h +++ b/src/include/gnunet_testing_lib.h | |||
@@ -11,7 +11,7 @@ | |||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Affero General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Affero General Public License | 15 | You should have received a copy of the GNU Affero General Public License |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | ||
@@ -56,7 +56,7 @@ extern "C" | |||
56 | /** | 56 | /** |
57 | * Size of each hostkey in the hostkey file (in BYTES). | 57 | * Size of each hostkey in the hostkey file (in BYTES). |
58 | */ | 58 | */ |
59 | #define GNUNET_TESTING_HOSTKEYFILESIZE sizeof (struct GNUNET_CRYPTO_EddsaPrivateKey) | 59 | #define GNUNET_TESTING_HOSTKEYFILESIZE sizeof(struct GNUNET_CRYPTO_EddsaPrivateKey) |
60 | 60 | ||
61 | /** | 61 | /** |
62 | * The environmental variable, if set, that dictates where testing should place | 62 | * The environmental variable, if set, that dictates where testing should place |
@@ -81,8 +81,7 @@ struct GNUNET_TESTING_Peer; | |||
81 | /** | 81 | /** |
82 | * Specification of a service that is to be shared among peers | 82 | * Specification of a service that is to be shared among peers |
83 | */ | 83 | */ |
84 | struct GNUNET_TESTING_SharedService | 84 | struct GNUNET_TESTING_SharedService { |
85 | { | ||
86 | /** | 85 | /** |
87 | * The name of the service. | 86 | * The name of the service. |
88 | */ | 87 | */ |
@@ -122,11 +121,11 @@ struct GNUNET_TESTING_SharedService | |||
122 | * @return handle to this system, NULL on error | 121 | * @return handle to this system, NULL on error |
123 | */ | 122 | */ |
124 | struct GNUNET_TESTING_System * | 123 | struct GNUNET_TESTING_System * |
125 | GNUNET_TESTING_system_create (const char *testdir, | 124 | GNUNET_TESTING_system_create(const char *testdir, |
126 | const char *trusted_ip, | 125 | const char *trusted_ip, |
127 | const char *hostname, | 126 | const char *hostname, |
128 | const struct GNUNET_TESTING_SharedService * | 127 | const struct GNUNET_TESTING_SharedService * |
129 | shared_services); | 128 | shared_services); |
130 | 129 | ||
131 | 130 | ||
132 | /** | 131 | /** |
@@ -154,12 +153,12 @@ GNUNET_TESTING_system_create (const char *testdir, | |||
154 | * @return handle to this system, NULL on error | 153 | * @return handle to this system, NULL on error |
155 | */ | 154 | */ |
156 | struct GNUNET_TESTING_System * | 155 | struct GNUNET_TESTING_System * |
157 | GNUNET_TESTING_system_create_with_portrange (const char *testdir, | 156 | GNUNET_TESTING_system_create_with_portrange(const char *testdir, |
158 | const char *trusted_ip, | 157 | const char *trusted_ip, |
159 | const char *hostname, | 158 | const char *hostname, |
160 | const struct GNUNET_TESTING_SharedService *shared_services, | 159 | const struct GNUNET_TESTING_SharedService *shared_services, |
161 | uint16_t lowport, | 160 | uint16_t lowport, |
162 | uint16_t highport); | 161 | uint16_t highport); |
163 | 162 | ||
164 | 163 | ||
165 | /** | 164 | /** |
@@ -170,8 +169,8 @@ GNUNET_TESTING_system_create_with_portrange (const char *testdir, | |||
170 | * be removed (clean up on shutdown)? | 169 | * be removed (clean up on shutdown)? |
171 | */ | 170 | */ |
172 | void | 171 | void |
173 | GNUNET_TESTING_system_destroy (struct GNUNET_TESTING_System *system, | 172 | GNUNET_TESTING_system_destroy(struct GNUNET_TESTING_System *system, |
174 | int remove_paths); | 173 | int remove_paths); |
175 | 174 | ||
176 | 175 | ||
177 | /** | 176 | /** |
@@ -192,9 +191,9 @@ GNUNET_TESTING_system_destroy (struct GNUNET_TESTING_System *system, | |||
192 | * @return NULL on error (not enough keys) | 191 | * @return NULL on error (not enough keys) |
193 | */ | 192 | */ |
194 | struct GNUNET_CRYPTO_EddsaPrivateKey * | 193 | struct GNUNET_CRYPTO_EddsaPrivateKey * |
195 | GNUNET_TESTING_hostkey_get (const struct GNUNET_TESTING_System *system, | 194 | GNUNET_TESTING_hostkey_get(const struct GNUNET_TESTING_System *system, |
196 | uint32_t key_number, | 195 | uint32_t key_number, |
197 | struct GNUNET_PeerIdentity *id); | 196 | struct GNUNET_PeerIdentity *id); |
198 | 197 | ||
199 | 198 | ||
200 | /** | 199 | /** |
@@ -204,7 +203,7 @@ GNUNET_TESTING_hostkey_get (const struct GNUNET_TESTING_System *system, | |||
204 | * @return 0 if no free port was available | 203 | * @return 0 if no free port was available |
205 | */ | 204 | */ |
206 | uint16_t | 205 | uint16_t |
207 | GNUNET_TESTING_reserve_port (struct GNUNET_TESTING_System *system); | 206 | GNUNET_TESTING_reserve_port(struct GNUNET_TESTING_System *system); |
208 | 207 | ||
209 | 208 | ||
210 | /** | 209 | /** |
@@ -215,8 +214,8 @@ GNUNET_TESTING_reserve_port (struct GNUNET_TESTING_System *system); | |||
215 | * @param port reserved port to release | 214 | * @param port reserved port to release |
216 | */ | 215 | */ |
217 | void | 216 | void |
218 | GNUNET_TESTING_release_port (struct GNUNET_TESTING_System *system, | 217 | GNUNET_TESTING_release_port(struct GNUNET_TESTING_System *system, |
219 | uint16_t port); | 218 | uint16_t port); |
220 | 219 | ||
221 | 220 | ||
222 | /** | 221 | /** |
@@ -237,8 +236,8 @@ GNUNET_TESTING_release_port (struct GNUNET_TESTING_System *system, | |||
237 | * be incomplete and should not be used there upon | 236 | * be incomplete and should not be used there upon |
238 | */ | 237 | */ |
239 | int | 238 | int |
240 | GNUNET_TESTING_configuration_create (struct GNUNET_TESTING_System *system, | 239 | GNUNET_TESTING_configuration_create(struct GNUNET_TESTING_System *system, |
241 | struct GNUNET_CONFIGURATION_Handle *cfg); | 240 | struct GNUNET_CONFIGURATION_Handle *cfg); |
242 | // FIXME: add dual to 'release' ports again... | 241 | // FIXME: add dual to 'release' ports again... |
243 | 242 | ||
244 | 243 | ||
@@ -256,11 +255,11 @@ GNUNET_TESTING_configuration_create (struct GNUNET_TESTING_System *system, | |||
256 | * @return handle to the peer, NULL on error | 255 | * @return handle to the peer, NULL on error |
257 | */ | 256 | */ |
258 | struct GNUNET_TESTING_Peer * | 257 | struct GNUNET_TESTING_Peer * |
259 | GNUNET_TESTING_peer_configure (struct GNUNET_TESTING_System *system, | 258 | GNUNET_TESTING_peer_configure(struct GNUNET_TESTING_System *system, |
260 | struct GNUNET_CONFIGURATION_Handle *cfg, | 259 | struct GNUNET_CONFIGURATION_Handle *cfg, |
261 | uint32_t key_number, | 260 | uint32_t key_number, |
262 | struct GNUNET_PeerIdentity *id, | 261 | struct GNUNET_PeerIdentity *id, |
263 | char **emsg); | 262 | char **emsg); |
264 | 263 | ||
265 | 264 | ||
266 | /** | 265 | /** |
@@ -270,8 +269,8 @@ GNUNET_TESTING_peer_configure (struct GNUNET_TESTING_System *system, | |||
270 | * @param id identifier for the daemon, will be set | 269 | * @param id identifier for the daemon, will be set |
271 | */ | 270 | */ |
272 | void | 271 | void |
273 | GNUNET_TESTING_peer_get_identity (struct GNUNET_TESTING_Peer *peer, | 272 | GNUNET_TESTING_peer_get_identity(struct GNUNET_TESTING_Peer *peer, |
274 | struct GNUNET_PeerIdentity *id); | 273 | struct GNUNET_PeerIdentity *id); |
275 | 274 | ||
276 | 275 | ||
277 | /** | 276 | /** |
@@ -282,7 +281,7 @@ GNUNET_TESTING_peer_get_identity (struct GNUNET_TESTING_Peer *peer, | |||
282 | * #GNUNET_SYSERR on error (i.e. peer already running) | 281 | * #GNUNET_SYSERR on error (i.e. peer already running) |
283 | */ | 282 | */ |
284 | int | 283 | int |
285 | GNUNET_TESTING_peer_start (struct GNUNET_TESTING_Peer *peer); | 284 | GNUNET_TESTING_peer_start(struct GNUNET_TESTING_Peer *peer); |
286 | 285 | ||
287 | 286 | ||
288 | /** | 287 | /** |
@@ -295,7 +294,7 @@ GNUNET_TESTING_peer_start (struct GNUNET_TESTING_Peer *peer); | |||
295 | * #GNUNET_SYSERR on error (i.e. peer not running) | 294 | * #GNUNET_SYSERR on error (i.e. peer not running) |
296 | */ | 295 | */ |
297 | int | 296 | int |
298 | GNUNET_TESTING_peer_stop (struct GNUNET_TESTING_Peer *peer); | 297 | GNUNET_TESTING_peer_stop(struct GNUNET_TESTING_Peer *peer); |
299 | 298 | ||
300 | 299 | ||
301 | /** | 300 | /** |
@@ -306,7 +305,7 @@ GNUNET_TESTING_peer_stop (struct GNUNET_TESTING_Peer *peer); | |||
306 | * @param peer peer to destroy | 305 | * @param peer peer to destroy |
307 | */ | 306 | */ |
308 | void | 307 | void |
309 | GNUNET_TESTING_peer_destroy (struct GNUNET_TESTING_Peer *peer); | 308 | GNUNET_TESTING_peer_destroy(struct GNUNET_TESTING_Peer *peer); |
310 | 309 | ||
311 | 310 | ||
312 | /** | 311 | /** |
@@ -317,7 +316,7 @@ GNUNET_TESTING_peer_destroy (struct GNUNET_TESTING_Peer *peer); | |||
317 | * or upon any error while sending SIGTERM | 316 | * or upon any error while sending SIGTERM |
318 | */ | 317 | */ |
319 | int | 318 | int |
320 | GNUNET_TESTING_peer_kill (struct GNUNET_TESTING_Peer *peer); | 319 | GNUNET_TESTING_peer_kill(struct GNUNET_TESTING_Peer *peer); |
321 | 320 | ||
322 | 321 | ||
323 | /** | 322 | /** |
@@ -328,7 +327,7 @@ GNUNET_TESTING_peer_kill (struct GNUNET_TESTING_Peer *peer); | |||
328 | * or upon any error while waiting | 327 | * or upon any error while waiting |
329 | */ | 328 | */ |
330 | int | 329 | int |
331 | GNUNET_TESTING_peer_wait (struct GNUNET_TESTING_Peer *peer); | 330 | GNUNET_TESTING_peer_wait(struct GNUNET_TESTING_Peer *peer); |
332 | 331 | ||
333 | 332 | ||
334 | /** | 333 | /** |
@@ -357,9 +356,9 @@ typedef void | |||
357 | * upon any error. | 356 | * upon any error. |
358 | */ | 357 | */ |
359 | int | 358 | int |
360 | GNUNET_TESTING_peer_stop_async (struct GNUNET_TESTING_Peer *peer, | 359 | GNUNET_TESTING_peer_stop_async(struct GNUNET_TESTING_Peer *peer, |
361 | GNUNET_TESTING_PeerStopCallback cb, | 360 | GNUNET_TESTING_PeerStopCallback cb, |
362 | void *cb_cls); | 361 | void *cb_cls); |
363 | 362 | ||
364 | 363 | ||
365 | /** | 364 | /** |
@@ -372,7 +371,7 @@ GNUNET_TESTING_peer_stop_async (struct GNUNET_TESTING_Peer *peer, | |||
372 | * before. | 371 | * before. |
373 | */ | 372 | */ |
374 | void | 373 | void |
375 | GNUNET_TESTING_peer_stop_async_cancel (struct GNUNET_TESTING_Peer *peer); | 374 | GNUNET_TESTING_peer_stop_async_cancel(struct GNUNET_TESTING_Peer *peer); |
376 | 375 | ||
377 | 376 | ||
378 | /** | 377 | /** |
@@ -406,10 +405,10 @@ typedef void | |||
406 | * @return 0 on success, 1 on error | 405 | * @return 0 on success, 1 on error |
407 | */ | 406 | */ |
408 | int | 407 | int |
409 | GNUNET_TESTING_peer_run (const char *testdir, | 408 | GNUNET_TESTING_peer_run(const char *testdir, |
410 | const char *cfgfilename, | 409 | const char *cfgfilename, |
411 | GNUNET_TESTING_TestMain tm, | 410 | GNUNET_TESTING_TestMain tm, |
412 | void *tm_cls); | 411 | void *tm_cls); |
413 | 412 | ||
414 | 413 | ||
415 | /** | 414 | /** |
@@ -434,11 +433,11 @@ GNUNET_TESTING_peer_run (const char *testdir, | |||
434 | * @return 0 on success, 1 on error | 433 | * @return 0 on success, 1 on error |
435 | */ | 434 | */ |
436 | int | 435 | int |
437 | GNUNET_TESTING_service_run (const char *testdir, | 436 | GNUNET_TESTING_service_run(const char *testdir, |
438 | const char *service_name, | 437 | const char *service_name, |
439 | const char *cfgfilename, | 438 | const char *cfgfilename, |
440 | GNUNET_TESTING_TestMain tm, | 439 | GNUNET_TESTING_TestMain tm, |
441 | void *tm_cls); | 440 | void *tm_cls); |
442 | 441 | ||
443 | 442 | ||
444 | /** | 443 | /** |
@@ -455,7 +454,7 @@ GNUNET_TESTING_service_run (const char *testdir, | |||
455 | * NULL if argv0 has no '_' | 454 | * NULL if argv0 has no '_' |
456 | */ | 455 | */ |
457 | char * | 456 | char * |
458 | GNUNET_TESTING_get_testname_from_underscore (const char *argv0); | 457 | GNUNET_TESTING_get_testname_from_underscore(const char *argv0); |
459 | 458 | ||
460 | 459 | ||
461 | #if 0 /* keep Emacsens' auto-indent happy */ | 460 | #if 0 /* keep Emacsens' auto-indent happy */ |