diff options
author | t3sserakt <t3ss@posteo.de> | 2021-10-15 21:02:03 +0200 |
---|---|---|
committer | t3sserakt <t3ss@posteo.de> | 2021-10-15 21:02:03 +0200 |
commit | 513f23e74650db9408267e82ef8bcb8f770d1015 (patch) | |
tree | 312db7072dc444e9d1e6a13000b79482eb14de82 /src/testing/testing.c | |
parent | d190d23831dae1a77075557f2ff6e0c713d747d5 (diff) | |
parent | d64ac269856744b9bab170964e1d6f36896ecc55 (diff) | |
download | gnunet-513f23e74650db9408267e82ef8bcb8f770d1015.tar.gz gnunet-513f23e74650db9408267e82ef8bcb8f770d1015.zip |
Merge branch 'master' into dev/t3ss/tng
Diffstat (limited to 'src/testing/testing.c')
-rw-r--r-- | src/testing/testing.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/testing/testing.c b/src/testing/testing.c index d3acd4689..4d9b7c0cb 100644 --- a/src/testing/testing.c +++ b/src/testing/testing.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include "gnunet_arm_service.h" | 34 | #include "gnunet_arm_service.h" |
35 | #include "gnunet_testing_lib.h" | 35 | #include "gnunet_testing_lib.h" |
36 | #include "gnunet_testing_ng_lib.h" | 36 | #include "gnunet_testing_ng_lib.h" |
37 | #include "testing_cmds.h" | ||
37 | 38 | ||
38 | #define LOG(kind, ...) GNUNET_log_from (kind, "testing-api", __VA_ARGS__) | 39 | #define LOG(kind, ...) GNUNET_log_from (kind, "testing-api", __VA_ARGS__) |
39 | 40 | ||
@@ -2259,6 +2260,31 @@ GNUNET_TESTING_get_address (struct GNUNET_TESTING_NodeConnection *connection, | |||
2259 | 2260 | ||
2260 | 2261 | ||
2261 | /** | 2262 | /** |
2263 | * Create a GNUNET_CMDS_LOCAL_FINISHED message. | ||
2264 | * | ||
2265 | * @param rv The result of the local test as GNUNET_GenericReturnValue. | ||
2266 | * @return The GNUNET_CMDS_LOCAL_FINISHED message. | ||
2267 | */ | ||
2268 | struct GNUNET_MessageHeader * | ||
2269 | GNUNET_TESTING_send_local_test_finished_msg (enum GNUNET_GenericReturnValue rv) | ||
2270 | { | ||
2271 | struct GNUNET_CMDS_LOCAL_FINISHED *reply; | ||
2272 | size_t msg_length; | ||
2273 | |||
2274 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
2275 | "Local test exits with status %d\n", | ||
2276 | rv); | ||
2277 | msg_length = sizeof(struct GNUNET_CMDS_LOCAL_FINISHED); | ||
2278 | reply = GNUNET_new (struct GNUNET_CMDS_LOCAL_FINISHED); | ||
2279 | reply->header.type = htons (GNUNET_MESSAGE_TYPE_CMDS_HELPER_LOCAL_FINISHED); | ||
2280 | reply->header.size = htons ((uint16_t) msg_length); | ||
2281 | reply->result = htons (rv); | ||
2282 | |||
2283 | return (struct GNUNET_MessageHeader *) reply; | ||
2284 | } | ||
2285 | |||
2286 | |||
2287 | /** | ||
2262 | * Getting the topology from file. | 2288 | * Getting the topology from file. |
2263 | * | 2289 | * |
2264 | * @param filename The name of the topology file. | 2290 | * @param filename The name of the topology file. |