aboutsummaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2022-10-25 09:59:23 +0200
committert3sserakt <t3ss@posteo.de>2022-10-25 10:02:01 +0200
commitb3a76100568e15660211945d931173f858156169 (patch)
tree54d89d7a0b743df81b5df095f60c3f13c016c69d /src/testing
parentc5f3eb40c97b2bcad7537607ca870a925aa9bed8 (diff)
parentfa48dbb242415a8dc06465863054b8d61c0e26bb (diff)
downloadgnunet-b3a76100568e15660211945d931173f858156169.tar.gz
gnunet-b3a76100568e15660211945d931173f858156169.zip
Merge branch 'master' of ssh://git.gnunet.org/gnunet
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/testing.c60
-rw-r--r--src/testing/testing_api_cmd_local_test_prepared.c8
-rw-r--r--src/testing/testing_api_loop.c12
3 files changed, 0 insertions, 80 deletions
diff --git a/src/testing/testing.c b/src/testing/testing.c
index 956820a15..aa8dd339c 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 */
1517int 1506int
1518GNUNET_TESTING_peer_stop_async (struct GNUNET_TESTING_Peer *peer, 1507GNUNET_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 */
1600int 1573int
1601GNUNET_TESTING_peer_run (const char *testdir, 1574GNUNET_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 */
1672int 1624int
1673GNUNET_TESTING_service_run (const char *testdir, 1625GNUNET_TESTING_service_run (const char *testdir,
1674 const char *service_name, 1626 const char *service_name,
@@ -2207,13 +2159,6 @@ GNUNET_TESTING_get_connections (unsigned int num,
2207} 2159}
2208 2160
2209 2161
2210/**
2211 * Retrieve the public key from the test system with the unique node id.
2212 *
2213 * @param num The unique node id.
2214 * @param tl_system The test system.
2215 * @return The peer identity wrapping the public key.
2216 */
2217struct GNUNET_PeerIdentity * 2162struct GNUNET_PeerIdentity *
2218GNUNET_TESTING_get_pub_key (unsigned int num, 2163GNUNET_TESTING_get_pub_key (unsigned int num,
2219 const struct GNUNET_TESTING_System *tl_system) 2164 const struct GNUNET_TESTING_System *tl_system)
@@ -2417,11 +2362,6 @@ GNUNET_TESTING_get_additional_connects (unsigned int num,
2417} 2362}
2418 2363
2419 2364
2420/**
2421 * Create a GNUNET_CMDS_LOCAL_FINISHED message.
2422 *
2423 * @return The GNUNET_CMDS_LOCAL_FINISHED message.
2424*/
2425struct GNUNET_MessageHeader * 2365struct GNUNET_MessageHeader *
2426GNUNET_TESTING_send_local_test_finished_msg () 2366GNUNET_TESTING_send_local_test_finished_msg ()
2427{ 2367{
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 */
103struct GNUNET_TESTING_Command 95struct GNUNET_TESTING_Command
104GNUNET_TESTING_cmd_local_test_prepared (const char *label, 96GNUNET_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 */
438enum GNUNET_GenericReturnValue 432enum GNUNET_GenericReturnValue
439GNUNET_TESTING_running (const struct GNUNET_TESTING_Command *command) 433GNUNET_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 */
452enum GNUNET_GenericReturnValue 440enum GNUNET_GenericReturnValue
453GNUNET_TESTING_finished (struct GNUNET_TESTING_Command *command) 441GNUNET_TESTING_finished (struct GNUNET_TESTING_Command *command)
454{ 442{