diff options
author | LRN <LRN@140774ce-b5e7-0310-ab8b-a85725594a96> | 2012-07-22 13:47:09 +0000 |
---|---|---|
committer | LRN <LRN@140774ce-b5e7-0310-ab8b-a85725594a96> | 2012-07-22 13:47:09 +0000 |
commit | 4f25e5dde406dd28902e929d3108a73bb22db202 (patch) | |
tree | f7d5d820b49c7c7f5c86cb3156666dfc4d778a1e /src | |
parent | 033166b9452d431904b7e0a46972bd92c983f407 (diff) |
Fix hostkey loading for old testing framework
git-svn-id: https://gnunet.org/svn/gnunet@22818 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src')
22 files changed, 39 insertions, 22 deletions
diff --git a/src/ats-test/test_transport_ats_1addr.conf b/src/ats-test/test_transport_ats_1addr.conf index ab6e9cb5ae..e01f743d27 100644 --- a/src/ats-test/test_transport_ats_1addr.conf +++ b/src/ats-test/test_transport_ats_1addr.conf @@ -4,7 +4,7 @@ SERVICEHOME = /tmp/test-gnunet-testing/ DEFAULTCONFIG = test_testing_data.conf [TESTING] -HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat +HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat [nat] ALLOW_NAT = NO diff --git a/src/ats-test/test_transport_ats_2addr.conf b/src/ats-test/test_transport_ats_2addr.conf index 3b5a6a87a8..ce7d104aec 100644 --- a/src/ats-test/test_transport_ats_2addr.conf +++ b/src/ats-test/test_transport_ats_2addr.conf @@ -4,7 +4,7 @@ SERVICEHOME = /tmp/test-gnunet-testing/ DEFAULTCONFIG = test_testing_data.conf [TESTING] -HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat +HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat [transport-udp] PORT = 2571 diff --git a/src/ats-test/test_transport_ats_4addr.conf b/src/ats-test/test_transport_ats_4addr.conf index 830cd88100..cd224e6b04 100644 --- a/src/ats-test/test_transport_ats_4addr.conf +++ b/src/ats-test/test_transport_ats_4addr.conf @@ -4,7 +4,7 @@ SERVICEHOME = /tmp/test-gnunet-testing/ DEFAULTCONFIG = test_testing_data.conf [TESTING] -HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat +HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat [nat] ALLOW_NAT = NO diff --git a/src/dht/test_dht_2dtorus.conf b/src/dht/test_dht_2dtorus.conf index 459ebf376d..33d5a3624c 100644 --- a/src/dht/test_dht_2dtorus.conf +++ b/src/dht/test_dht_2dtorus.conf @@ -66,7 +66,7 @@ F2F = NO CONNECT_TIMEOUT = 60 s CONNECT_ATTEMPTS = 3 DEBUG = YES -HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat +HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat MAX_CONCURRENT_SSH = 20 USE_PROGRESSBARS = YES PEERGROUP_TIMEOUT = 2400 s diff --git a/src/dht/test_dht_api_data.conf b/src/dht/test_dht_api_data.conf index 06f9e46ef7..e68e887c12 100644 --- a/src/dht/test_dht_api_data.conf +++ b/src/dht/test_dht_api_data.conf @@ -61,7 +61,7 @@ PORT = 2094 WEAKRANDOM = NO [testing_old] -HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat +HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat [gnunetd] HOSTKEY = $SERVICEHOME/.hostkey diff --git a/src/dht/test_dht_line.conf b/src/dht/test_dht_line.conf index 56c03f61a3..884341dc71 100644 --- a/src/dht/test_dht_line.conf +++ b/src/dht/test_dht_line.conf @@ -66,7 +66,7 @@ F2F = NO CONNECT_TIMEOUT = 60 s CONNECT_ATTEMPTS = 3 DEBUG = YES -HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat +HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat MAX_CONCURRENT_SSH = 10 USE_PROGRESSBARS = YES PEERGROUP_TIMEOUT = 2400 s diff --git a/src/dht/test_dht_multipeer_data.conf b/src/dht/test_dht_multipeer_data.conf index eae68f9484..790421c690 100644 --- a/src/dht/test_dht_multipeer_data.conf +++ b/src/dht/test_dht_multipeer_data.conf @@ -101,7 +101,7 @@ USE_PROGRESSBARS = YES #LOGNMODIFIER = .65 #PERCENTAGE = .75 NUM_PEERS = 10 -HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat +HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat [gnunetd] HOSTKEY = $SERVICEHOME/.hostkey diff --git a/src/dht/test_dht_twopeer_data.conf b/src/dht/test_dht_twopeer_data.conf index cc47c6f363..8ff7020475 100644 --- a/src/dht/test_dht_twopeer_data.conf +++ b/src/dht/test_dht_twopeer_data.conf @@ -48,7 +48,7 @@ WEAKRANDOM = YES [testing_old] NUM_PEERS = 2 -HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat +HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat [gnunetd] HOSTKEY = $SERVICEHOME/.hostkey diff --git a/src/dv/test_transport_dv_data.conf b/src/dv/test_transport_dv_data.conf index 80eb873292..1078c369ff 100644 --- a/src/dv/test_transport_dv_data.conf +++ b/src/dv/test_transport_dv_data.conf @@ -54,7 +54,7 @@ CONNECT_TOPOLOGY = LINE BLACKLIST_TOPOLOGY = LINE BLACKLIST_TRANSPORTS = tcp F2F = YES -HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat +HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat [fs] AUTOSTART = NO diff --git a/src/fs/test_fs_defaults.conf b/src/fs/test_fs_defaults.conf index 671a43336e..e0e697ec71 100644 --- a/src/fs/test_fs_defaults.conf +++ b/src/fs/test_fs_defaults.conf @@ -61,7 +61,7 @@ DELAY = YES WEAKRANDOM = YES [testing_old] -HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat +HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat [dhtcache] QUOTA=65536 diff --git a/src/gns/test_gns_defaults.conf b/src/gns/test_gns_defaults.conf index 1afd61ed7b..f2ce34e2b2 100644 --- a/src/gns/test_gns_defaults.conf +++ b/src/gns/test_gns_defaults.conf @@ -29,7 +29,7 @@ PORT = 2570 NUM_PEERS = 5 WEAKRANDOM = YES F2F = YES -HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat +HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat [dht] AUTOSTART = NO diff --git a/src/gns/test_gns_proxy.conf b/src/gns/test_gns_proxy.conf index 9dd4a472b3..8083b4ccc7 100644 --- a/src/gns/test_gns_proxy.conf +++ b/src/gns/test_gns_proxy.conf @@ -12,7 +12,7 @@ ALLOW_SHUTDOWN = YES [testing] WEAKRANDOM = YES -HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat +HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat [gns] AUTOSTART = YES diff --git a/src/integration-tests/test_connection_stability.conf b/src/integration-tests/test_connection_stability.conf index b3845452ad..a0400d8191 100644 --- a/src/integration-tests/test_connection_stability.conf +++ b/src/integration-tests/test_connection_stability.conf @@ -32,7 +32,7 @@ WEAKRANDOM = YES [testing_old] NUM_PEERS = 5 F2F = YES -HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat +HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat [dht] AUTOSTART = NO diff --git a/src/mesh/test_mesh_2dtorus.conf b/src/mesh/test_mesh_2dtorus.conf index 5d91a8b439..e247f9f8c1 100644 --- a/src/mesh/test_mesh_2dtorus.conf +++ b/src/mesh/test_mesh_2dtorus.conf @@ -77,7 +77,7 @@ F2F = NO CONNECT_TIMEOUT = 600 s CONNECT_ATTEMPTS = 2 DEBUG = YES -HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat +HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat MAX_CONCURRENT_SSH = 10 USE_PROGRESSBARS = YES PEERGROUP_TIMEOUT = 2400 s diff --git a/src/mesh/test_mesh_small.conf b/src/mesh/test_mesh_small.conf index 1792644585..5d49443f03 100644 --- a/src/mesh/test_mesh_small.conf +++ b/src/mesh/test_mesh_small.conf @@ -81,7 +81,7 @@ F2F = NO CONNECT_TIMEOUT = 660 s CONNECT_ATTEMPTS = 2 DEBUG = YES -HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat +HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat MAX_CONCURRENT_SSH = 10 USE_PROGRESSBARS = YES PEERGROUP_TIMEOUT = 2400 s diff --git a/src/nse/test_nse.conf b/src/nse/test_nse.conf index 4508e9ca7a..66075d7929 100644 --- a/src/nse/test_nse.conf +++ b/src/nse/test_nse.conf @@ -69,7 +69,7 @@ F2F = NO CONNECT_TIMEOUT = 60 s CONNECT_ATTEMPTS = 3 #DEBUG = YES -HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat +HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat MAX_CONCURRENT_SSH = 20 USE_PROGRESSBARS = YES PEERGROUP_TIMEOUT = 1000 s diff --git a/src/stream/test_stream_local.conf b/src/stream/test_stream_local.conf index 09929ca277..603a87a1c6 100644 --- a/src/stream/test_stream_local.conf +++ b/src/stream/test_stream_local.conf @@ -64,7 +64,7 @@ WEAKRANDOM = YES [testing_old] NUM_PEERS = 5 DEBUG = YES -HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat +HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat MAX_CONCURRENT_SSH = 10 USE_PROGRESSBARS = YES PEERGROUP_TIMEOUT = 2400 s diff --git a/src/testing/test_testing_defaults.conf b/src/testing/test_testing_defaults.conf index 0705b2d15d..80049ba4c2 100644 --- a/src/testing/test_testing_defaults.conf +++ b/src/testing/test_testing_defaults.conf @@ -33,7 +33,7 @@ PORT = 2570 NUM_PEERS = 5 WEAKRANDOM = YES F2F = YES -HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat +HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat [dht] AUTOSTART = NO diff --git a/src/testing_old/test_testing_2dtorus.conf b/src/testing_old/test_testing_2dtorus.conf index d69969f1ab..69c59567d2 100644 --- a/src/testing_old/test_testing_2dtorus.conf +++ b/src/testing_old/test_testing_2dtorus.conf @@ -68,7 +68,7 @@ F2F = NO CONNECT_TIMEOUT = 600 s CONNECT_ATTEMPTS = 2 DEBUG = YES -HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat +HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat MAX_CONCURRENT_SSH = 10 USE_PROGRESSBARS = YES PEERGROUP_TIMEOUT = 2400 s diff --git a/src/testing_old/test_testing_defaults.conf b/src/testing_old/test_testing_defaults.conf index a89064f813..a28baa7be3 100644 --- a/src/testing_old/test_testing_defaults.conf +++ b/src/testing_old/test_testing_defaults.conf @@ -30,7 +30,7 @@ PORT = 2570 NUM_PEERS = 5 WEAKRANDOM = YES F2F = YES -HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat +HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat [dht] AUTOSTART = NO diff --git a/src/testing_old/testing_group.c b/src/testing_old/testing_group.c index 62cc185ce9..9191b9fdda 100644 --- a/src/testing_old/testing_group.c +++ b/src/testing_old/testing_group.c @@ -5940,9 +5940,26 @@ GNUNET_TESTING_daemons_start (const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_CONFIGURATION_get_value_string (cfg, "TESTING_OLD", "HOSTKEYSFILE", &hostkeys_file)) { + /* This is a hack to make old testing able to load keys from datadir, + * just as new testing does. + * No need to document it, just convert everything to the new testing + * framework... + */ + char *DATADIR = "${DATADIR}"; + size_t ddl = strlen (DATADIR); + if (strncmp (hostkeys_file, DATADIR, ddl) == 0) + { + char *data_dir; + char *filename; + data_dir = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_DATADIR); + GNUNET_asprintf (&filename, "%s%s", data_dir, &hostkeys_file[ddl]); + GNUNET_free (data_dir); + GNUNET_free (hostkeys_file); + hostkeys_file = filename; + } if (GNUNET_YES != GNUNET_DISK_file_test (hostkeys_file)) GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - _("Could not read hostkeys file!\n")); + _("Could not read hostkeys file `%s'!\n"), hostkeys_file); else { /* Check hostkey file size, read entire thing into memory */ diff --git a/src/topology/test_gnunet_daemon_topology_data.conf b/src/topology/test_gnunet_daemon_topology_data.conf index d98dc9de73..c4e01acedc 100644 --- a/src/topology/test_gnunet_daemon_topology_data.conf +++ b/src/topology/test_gnunet_daemon_topology_data.conf @@ -53,7 +53,7 @@ AUTOSTART = NO WEAKRANDOM = YES [testing_old] -HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat +HOSTKEYSFILE = ${DATADIR}/testing_hostkeys.dat [dns] AUTOSTART = NO |