gnunet

Main GNUnet Logic
Log | Files | Refs | Submodules | README | LICENSE

commit 74b0bddf4d918524b289bad209f78f493b8e2482
parent 2693666370956f84eb6cde80d47230859fbfa60b
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date:   Sun, 22 Dec 2024 23:03:46 +0100

testing: drop verbose plugin file name prefix from config

Diffstat:
Msrc/lib/testing/gnunet-cmds-helper.c | 6++++--
Msrc/lib/testing/testing_api_topology.c | 2+-
Msrc/lib/testing/testing_api_topology.h | 6+++++-
Msrc/service/arm/test_arm_probnat_topo.conf | 2+-
Msrc/service/transport/test_transport_simple_send_topo.conf | 2+-
5 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/lib/testing/gnunet-cmds-helper.c b/src/lib/testing/gnunet-cmds-helper.c @@ -175,6 +175,7 @@ do_shutdown_later (void *cls) { GNUNET_PLUGIN_unload (plugin_name, plugin); + GNUNET_free (plugin_name); plugin = NULL; } if (NULL != njt) @@ -355,8 +356,9 @@ handle_helper_init ( GNUNET_SCHEDULER_shutdown (); return; } - plugin_name = GNUNET_TESTING_get_plugin_from_topo (njt, - my_node_id); + GNUNET_asprintf (&plugin_name, "libgnunet_plugin_testing_%s", + GNUNET_TESTING_get_plugin_from_topo (njt, + my_node_id)); plugin = GNUNET_PLUGIN_load (pd, plugin_name, (void *) my_node_id); diff --git a/src/lib/testing/testing_api_topology.c b/src/lib/testing/testing_api_topology.c @@ -465,7 +465,7 @@ GNUNET_TESTING_get_additional_connects (unsigned int num, } -char * +const char * GNUNET_TESTING_get_plugin_from_topo ( struct GNUNET_TESTING_NetjailTopology *njt, const char *my_node_id) diff --git a/src/lib/testing/testing_api_topology.h b/src/lib/testing/testing_api_topology.h @@ -449,8 +449,12 @@ GNUNET_TESTING_get_address ( /** * Get the global plugin name form the topology file + * + * @param njt the netjail topology. + * @param my_node_id the node ID. + * @return the name of the plugin to use. */ -char * +const char * GNUNET_TESTING_get_plugin_from_topo ( struct GNUNET_TESTING_NetjailTopology *njt, const char *my_node_id); diff --git a/src/service/arm/test_arm_probnat_topo.conf b/src/service/arm/test_arm_probnat_topo.conf @@ -3,7 +3,7 @@ SUBNETS = 1 CARRIER_SETUP_PROGRAMMS = iptables -A INPUT -p icmp -j DROP;tc qdisc add dev $UPLINK root netm delay 100ms 10ms; SUBNET_SETUP_PROGRAMMS = iptables -A INPUT -p icmp -j DROP;tc qdisc add dev $UPLINK root netm delay 100ms 10ms; PEER_SETUP_PROGRAMMS = iptables -A INPUT -p icmp -j DROP;tc qdisc add dev $UPLINK root netm delay 100ms 10ms; -TESTBED_PLUGIN = libgnunet_plugin_testing_arm_probnat +TESTBED_PLUGIN = arm_probnat CARRIER_PEERS = 0 SUBNET_PEERS = 1 diff --git a/src/service/transport/test_transport_simple_send_topo.conf b/src/service/transport/test_transport_simple_send_topo.conf @@ -3,7 +3,7 @@ SUBNETS = 1 #CARRIER_SETUP_PROGRAMMS = iptables -A INPUT -p icmp -j DROP;tc qdisc add dev $UPLINK root netm delay 100ms 10ms; #SUBNET_SETUP_PROGRAMMS = iptables -A INPUT -p icmp -j DROP;tc qdisc add dev $UPLINK root netm delay 100ms 10ms; #PEER_SETUP_PROGRAMMS = iptables -A INPUT -p icmp -j DROP;tc qdisc add dev $UPLINK root netm delay 100ms 10ms; -TESTBED_PLUGIN = libgnunet_plugin_testing_transport_simple_send +TESTBED_PLUGIN = transport_simple_send CARRIER_PEERS = 0 SUBNET_PEERS = 2