diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-12-09 12:07:26 +0900 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-12-09 12:07:26 +0900 |
commit | 4f46e2f2e72a07871b14c0a9aed70438616c4dd5 (patch) | |
tree | f4b904d75ec9fc977aa662d6c8ed0a4d71a22097 /src/include/gnunet_testing_plugin.h | |
parent | 1b3f6f366fc62e5519bb73fefe8c21c2eed20edf (diff) | |
download | gnunet-4f46e2f2e72a07871b14c0a9aed70438616c4dd5.tar.gz gnunet-4f46e2f2e72a07871b14c0a9aed70438616c4dd5.zip |
TESTING: Fix TESTING-NG API to follow naming conventions
Rename structs and functions to follow GNUnet naming conventions.
Some structs may actually also be private, a review is necessary.
The barrier API was modified in order to untangle Barriers and
lists of Barriers.
This is a rough draft, it needs fixes wrt memory leaks.
Diffstat (limited to 'src/include/gnunet_testing_plugin.h')
-rw-r--r-- | src/include/gnunet_testing_plugin.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/include/gnunet_testing_plugin.h b/src/include/gnunet_testing_plugin.h index 312a7bfe5..d986fabcd 100644 --- a/src/include/gnunet_testing_plugin.h +++ b/src/include/gnunet_testing_plugin.h | |||
@@ -38,18 +38,21 @@ extern "C" | |||
38 | #endif | 38 | #endif |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | struct GNUNET_TESTING_Barrier; | ||
42 | |||
43 | //FIXME documentation for both functions | ||
41 | typedef void | 44 | typedef void |
42 | (*TESTING_CMD_HELPER_write_cb) (struct GNUNET_MessageHeader *message, | 45 | (*GNUNET_TESTING_cmd_helper_write_cb) (struct GNUNET_MessageHeader *message, |
43 | size_t msg_length); | 46 | size_t msg_length); |
44 | 47 | ||
45 | typedef void | 48 | typedef void |
46 | (*TESTING_CMD_HELPER_finish_cb) (); | 49 | (*GNUNET_TESTING_cmd_helper_finish_cb) (); |
47 | 50 | ||
48 | // FIXME documentation | 51 | // FIXME documentation |
49 | // FIXME: Why are n, m, local_m strings? | 52 | // FIXME: Why are n, m, local_m strings? |
50 | // FIXME: Why is topology_data a string and not a GNUNET_TESTING_NetworkTopology?? | 53 | // FIXME: Why is topology_data a string and not a GNUNET_TESTING_NetworkTopology?? |
51 | typedef void | 54 | typedef void |
52 | (*GNUNET_TESTING_PLUGIN_StartTestCase) (TESTING_CMD_HELPER_write_cb | 55 | (*GNUNET_TESTING_PLUGIN_StartTestCase) (GNUNET_TESTING_cmd_helper_write_cb |
53 | write_message, | 56 | write_message, |
54 | const char *router_ip, | 57 | const char *router_ip, |
55 | const char *node_ip, | 58 | const char *node_ip, |
@@ -58,7 +61,7 @@ typedef void | |||
58 | const char *local_m, | 61 | const char *local_m, |
59 | const char *topology_data, | 62 | const char *topology_data, |
60 | unsigned int *read_file, | 63 | unsigned int *read_file, |
61 | TESTING_CMD_HELPER_finish_cb finish_cb); | 64 | GNUNET_TESTING_cmd_helper_finish_cb finish_cb); |
62 | 65 | ||
63 | 66 | ||
64 | typedef void | 67 | typedef void |
@@ -71,8 +74,8 @@ typedef void | |||
71 | typedef void | 74 | typedef void |
72 | (*GNUNET_TESTING_PLUGIN_BARRIER_ADVANCED) (const char *barrier_name); | 75 | (*GNUNET_TESTING_PLUGIN_BARRIER_ADVANCED) (const char *barrier_name); |
73 | 76 | ||
74 | typedef struct GNUNET_TESTING_Barrier * | 77 | typedef struct GNUNET_TESTING_BarrierList* |
75 | (*GNUNET_TESTING_PLUGIN_GET_WAITING_FOR_BARRIERS) (); | 78 | (*GNUNET_TESTING_PLUGIN_GET_WAITING_FOR_BARRIERS) (void); |
76 | 79 | ||
77 | 80 | ||
78 | // FIXME documentation | 81 | // FIXME documentation |