diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-10-18 10:04:57 +0900 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-10-18 10:04:57 +0900 |
commit | c9562b8cf7a29f4ec2457cb9d9d4530c24225da1 (patch) | |
tree | fb7d0296af5537ddda7e772a46e959c8ed64fbac /src/testing | |
parent | 9173da4f8c1f4b50ccd9d61f6fa138904740ecfa (diff) | |
parent | d748b0c920b0581ca65962f34d1f2e94c9a89926 (diff) | |
download | gnunet-c9562b8cf7a29f4ec2457cb9d9d4530c24225da1.tar.gz gnunet-c9562b8cf7a29f4ec2457cb9d9d4530c24225da1.zip |
-fix conflict
Diffstat (limited to 'src/testing')
-rw-r--r-- | src/testing/testing.c | 60 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_local_test_prepared.c | 8 | ||||
-rw-r--r-- | src/testing/testing_api_loop.c | 12 |
3 files changed, 0 insertions, 80 deletions
diff --git a/src/testing/testing.c b/src/testing/testing.c index 95651830f..22375bc98 100644 --- a/src/testing/testing.c +++ b/src/testing/testing.c | |||
@@ -1503,17 +1503,6 @@ disconn_status (void *cls, int connected) | |||
1503 | } | 1503 | } |
1504 | 1504 | ||
1505 | 1505 | ||
1506 | /** | ||
1507 | * Stop a peer asynchronously using ARM API. Peer's shutdown is signaled | ||
1508 | * through the GNUNET_TESTING_PeerStopCallback(). | ||
1509 | * | ||
1510 | * @param peer the peer to stop | ||
1511 | * @param cb the callback to signal peer shutdown | ||
1512 | * @param cb_cls closure for the above callback | ||
1513 | * @return #GNUNET_OK upon successfully giving the request to the ARM API (this | ||
1514 | * does not mean that the peer is successfully stopped); #GNUNET_SYSERR | ||
1515 | * upon any error. | ||
1516 | */ | ||
1517 | int | 1506 | int |
1518 | GNUNET_TESTING_peer_stop_async (struct GNUNET_TESTING_Peer *peer, | 1507 | GNUNET_TESTING_peer_stop_async (struct GNUNET_TESTING_Peer *peer, |
1519 | GNUNET_TESTING_PeerStopCallback cb, | 1508 | GNUNET_TESTING_PeerStopCallback cb, |
@@ -1581,22 +1570,6 @@ GNUNET_TESTING_peer_destroy (struct GNUNET_TESTING_Peer *peer) | |||
1581 | } | 1570 | } |
1582 | 1571 | ||
1583 | 1572 | ||
1584 | /** | ||
1585 | * Start a single peer and run a test using the testing library. | ||
1586 | * Starts a peer using the given configuration and then invokes the | ||
1587 | * given callback. This function ALSO initializes the scheduler loop | ||
1588 | * and should thus be called directly from "main". The testcase | ||
1589 | * should self-terminate by invoking #GNUNET_SCHEDULER_shutdown(). | ||
1590 | * | ||
1591 | * @param testdir only the directory name without any path. This is used for | ||
1592 | * all service homes; the directory will be created in a temporary | ||
1593 | * location depending on the underlying OS | ||
1594 | * @param cfgfilename name of the configuration file to use; | ||
1595 | * use NULL to only run with defaults | ||
1596 | * @param tm main function of the testcase | ||
1597 | * @param tm_cls closure for @a tm | ||
1598 | * @return 0 on success, 1 on error | ||
1599 | */ | ||
1600 | int | 1573 | int |
1601 | GNUNET_TESTING_peer_run (const char *testdir, | 1574 | GNUNET_TESTING_peer_run (const char *testdir, |
1602 | const char *cfgfilename, | 1575 | const char *cfgfilename, |
@@ -1648,27 +1621,6 @@ service_run_main (void *cls) | |||
1648 | } | 1621 | } |
1649 | 1622 | ||
1650 | 1623 | ||
1651 | /** | ||
1652 | * Start a single service (no ARM, except of course if the given | ||
1653 | * service name is 'arm') and run a test using the testing library. | ||
1654 | * Starts a service using the given configuration and then invokes the | ||
1655 | * given callback. This function ALSO initializes the scheduler loop | ||
1656 | * and should thus be called directly from "main". The testcase | ||
1657 | * should self-terminate by invoking #GNUNET_SCHEDULER_shutdown(). | ||
1658 | * | ||
1659 | * This function is useful if the testcase is for a single service | ||
1660 | * and if that service doesn't itself depend on other services. | ||
1661 | * | ||
1662 | * @param testdir only the directory name without any path. This is used for | ||
1663 | * all service homes; the directory will be created in a temporary | ||
1664 | * location depending on the underlying OS | ||
1665 | * @param service_name name of the service to run | ||
1666 | * @param cfgfilename name of the configuration file to use; | ||
1667 | * use NULL to only run with defaults | ||
1668 | * @param tm main function of the testcase | ||
1669 | * @param tm_cls closure for @a tm | ||
1670 | * @return 0 on success, 1 on error | ||
1671 | */ | ||
1672 | int | 1624 | int |
1673 | GNUNET_TESTING_service_run (const char *testdir, | 1625 | GNUNET_TESTING_service_run (const char *testdir, |
1674 | const char *service_name, | 1626 | const char *service_name, |
@@ -2208,13 +2160,6 @@ GNUNET_TESTING_get_connections (unsigned int num, | |||
2208 | } | 2160 | } |
2209 | 2161 | ||
2210 | 2162 | ||
2211 | /** | ||
2212 | * Retrieve the public key from the test system with the unique node id. | ||
2213 | * | ||
2214 | * @param num The unique node id. | ||
2215 | * @param tl_system The test system. | ||
2216 | * @return The peer identity wrapping the public key. | ||
2217 | */ | ||
2218 | struct GNUNET_PeerIdentity * | 2163 | struct GNUNET_PeerIdentity * |
2219 | GNUNET_TESTING_get_pub_key (unsigned int num, | 2164 | GNUNET_TESTING_get_pub_key (unsigned int num, |
2220 | const struct GNUNET_TESTING_System *tl_system) | 2165 | const struct GNUNET_TESTING_System *tl_system) |
@@ -2418,11 +2363,6 @@ GNUNET_TESTING_get_additional_connects (unsigned int num, | |||
2418 | } | 2363 | } |
2419 | 2364 | ||
2420 | 2365 | ||
2421 | /** | ||
2422 | * Create a GNUNET_CMDS_LOCAL_FINISHED message. | ||
2423 | * | ||
2424 | * @return The GNUNET_CMDS_LOCAL_FINISHED message. | ||
2425 | */ | ||
2426 | struct GNUNET_MessageHeader * | 2366 | struct GNUNET_MessageHeader * |
2427 | GNUNET_TESTING_send_local_test_finished_msg () | 2367 | GNUNET_TESTING_send_local_test_finished_msg () |
2428 | { | 2368 | { |
diff --git a/src/testing/testing_api_cmd_local_test_prepared.c b/src/testing/testing_api_cmd_local_test_prepared.c index 1f470a6c1..e71d3ef45 100644 --- a/src/testing/testing_api_cmd_local_test_prepared.c +++ b/src/testing/testing_api_cmd_local_test_prepared.c | |||
@@ -92,14 +92,6 @@ local_test_prepared_run (void *cls, | |||
92 | } | 92 | } |
93 | 93 | ||
94 | 94 | ||
95 | /** | ||
96 | * Create command. | ||
97 | * | ||
98 | * @param label name for command. | ||
99 | * @param write_message Callback to write messages to the master loop. | ||
100 | * @param all_local_tests_prepared Flag which will be set from outside. | ||
101 | * @return command. | ||
102 | */ | ||
103 | struct GNUNET_TESTING_Command | 95 | struct GNUNET_TESTING_Command |
104 | GNUNET_TESTING_cmd_local_test_prepared (const char *label, | 96 | GNUNET_TESTING_cmd_local_test_prepared (const char *label, |
105 | TESTING_CMD_HELPER_write_cb | 97 | TESTING_CMD_HELPER_write_cb |
diff --git a/src/testing/testing_api_loop.c b/src/testing/testing_api_loop.c index 283284f26..90713e45e 100644 --- a/src/testing/testing_api_loop.c +++ b/src/testing/testing_api_loop.c | |||
@@ -429,12 +429,6 @@ do_timeout (void *cls) | |||
429 | } | 429 | } |
430 | 430 | ||
431 | 431 | ||
432 | /** | ||
433 | * Check if the command is running. | ||
434 | * | ||
435 | * @param cmd The command to check. | ||
436 | * @return GNUNET_NO if the command is not running, GNUNET_YES if it is running. | ||
437 | */ | ||
438 | enum GNUNET_GenericReturnValue | 432 | enum GNUNET_GenericReturnValue |
439 | GNUNET_TESTING_running (const struct GNUNET_TESTING_Command *command) | 433 | GNUNET_TESTING_running (const struct GNUNET_TESTING_Command *command) |
440 | { | 434 | { |
@@ -443,12 +437,6 @@ GNUNET_TESTING_running (const struct GNUNET_TESTING_Command *command) | |||
443 | } | 437 | } |
444 | 438 | ||
445 | 439 | ||
446 | /** | ||
447 | * Check if a command is finished. | ||
448 | * | ||
449 | * @param cmd The command to check. | ||
450 | * @return GNUNET_NO if the command is not finished, GNUNET_YES if it is finished. | ||
451 | */ | ||
452 | enum GNUNET_GenericReturnValue | 440 | enum GNUNET_GenericReturnValue |
453 | GNUNET_TESTING_finished (struct GNUNET_TESTING_Command *command) | 441 | GNUNET_TESTING_finished (struct GNUNET_TESTING_Command *command) |
454 | { | 442 | { |