summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-02-27 15:24:26 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-02-27 15:24:26 +0000
commit1b4e1f7577f04263bb959874c5ddc1ef1a9f1769 (patch)
tree6473912c77b32b92a0f19254776526353febb654
parent1ba0b6ccf604b30da51c7feba659b19d955e8b72 (diff)
- removing old nat server code
-rw-r--r--src/transport/test_quota_compliance.c20
-rw-r--r--src/transport/test_transport_api.c19
-rw-r--r--src/transport/test_transport_api_bidirectional_connect.c19
-rw-r--r--src/transport/test_transport_api_disconnect.c19
-rw-r--r--src/transport/test_transport_api_limited_sockets.c20
-rw-r--r--src/transport/test_transport_api_reliability.c19
-rw-r--r--src/transport/test_transport_api_restart_1peer.c2
-rw-r--r--src/transport/test_transport_api_restart_2peers.c2
-rw-r--r--src/transport/test_transport_api_timeout.c25
-rw-r--r--src/transport/test_transport_api_unreliability.c19
-rw-r--r--src/transport/test_transport_api_unreliability_constant.c19
11 files changed, 6 insertions, 177 deletions
diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c
index b0111cc89..8f4db5352 100644
--- a/src/transport/test_quota_compliance.c
+++ b/src/transport/test_quota_compliance.c
@@ -583,8 +583,6 @@ check ()
int
main (int argc, char *argv[])
{
- int nat_res;
-
GNUNET_TRANSPORT_TESTING_get_test_name (argv[0], &test_name);
GNUNET_log_setup (test_name,
@@ -601,24 +599,6 @@ main (int argc, char *argv[])
tth = GNUNET_TRANSPORT_TESTING_init ();
- if ((strcmp (test_plugin, "tcp_nat") == 0) ||
- (strcmp (test_plugin, "udp_nat") == 0))
- {
- nat_res = GNUNET_OS_check_helper_binary ("gnunet-nat-server");
- if (GNUNET_NO == nat_res)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Cannot run NAT test: `%s' %s \n",
- "gnunet-nat-server", "SUID not set");
- return 0;
- }
- if (GNUNET_SYSERR == nat_res)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Cannot run NAT test: `%s' %s \n",
- "gnunet-nat-server", "file not found");
- return 0;
- }
- }
-
GNUNET_TRANSPORT_TESTING_get_config_name (argv[0], &cfg_file_p1, 1);
GNUNET_TRANSPORT_TESTING_get_config_name (argv[0], &cfg_file_p2, 2);
diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c
index 021dec87a..5fb81e1af 100644
--- a/src/transport/test_transport_api.c
+++ b/src/transport/test_transport_api.c
@@ -406,7 +406,6 @@ int
main (int argc, char *argv[])
{
int ret;
- int nat_res;
GNUNET_TRANSPORT_TESTING_get_test_name (argv[0], &test_name);
GNUNET_TRANSPORT_TESTING_get_test_source_name (__FILE__, &test_source);
@@ -423,24 +422,6 @@ main (int argc, char *argv[])
tth = GNUNET_TRANSPORT_TESTING_init ();
- if ((strcmp (test_plugin, "tcp_nat") == 0) ||
- (strcmp (test_plugin, "udp_nat") == 0))
- {
- nat_res = GNUNET_OS_check_helper_binary ("gnunet-nat-server");
- if (GNUNET_NO == nat_res)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Cannot run NAT test: `%s' %s \n",
- "gnunet-nat-server", "SUID not set");
- return 0;
- }
- if (GNUNET_SYSERR == nat_res)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Cannot run NAT test: `%s' %s \n",
- "gnunet-nat-server", "file not found");
- return 0;
- }
- }
-
GNUNET_TRANSPORT_TESTING_get_config_name (argv[0], &cfg_file_p1, 1);
GNUNET_TRANSPORT_TESTING_get_config_name (argv[0], &cfg_file_p2, 2);
diff --git a/src/transport/test_transport_api_bidirectional_connect.c b/src/transport/test_transport_api_bidirectional_connect.c
index a54d0891a..604554c51 100644
--- a/src/transport/test_transport_api_bidirectional_connect.c
+++ b/src/transport/test_transport_api_bidirectional_connect.c
@@ -378,7 +378,6 @@ int
main (int argc, char *argv[])
{
int ret;
- int nat_res;
GNUNET_TRANSPORT_TESTING_get_test_name (argv[0], &test_name);
@@ -396,24 +395,6 @@ main (int argc, char *argv[])
tth = GNUNET_TRANSPORT_TESTING_init ();
- if ((strcmp (test_plugin, "tcp_nat") == 0) ||
- (strcmp (test_plugin, "udp_nat") == 0))
- {
- nat_res = GNUNET_OS_check_helper_binary ("gnunet-nat-server");
- if (GNUNET_NO == nat_res)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Cannot run NAT test: `%s' %s \n",
- "gnunet-nat-server", "SUID not set");
- return 0;
- }
- if (GNUNET_SYSERR == nat_res)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Cannot run NAT test: `%s' %s \n",
- "gnunet-nat-server", "file not found");
- return 0;
- }
- }
-
GNUNET_TRANSPORT_TESTING_get_config_name (argv[0], &cfg_file_p1, 1);
GNUNET_TRANSPORT_TESTING_get_config_name (argv[0], &cfg_file_p2, 2);
diff --git a/src/transport/test_transport_api_disconnect.c b/src/transport/test_transport_api_disconnect.c
index 99271446c..973c4cfbc 100644
--- a/src/transport/test_transport_api_disconnect.c
+++ b/src/transport/test_transport_api_disconnect.c
@@ -399,7 +399,6 @@ int
main (int argc, char *argv[])
{
int ret;
- int nat_res;
GNUNET_TRANSPORT_TESTING_get_test_name (argv[0], &test_name);
@@ -417,24 +416,6 @@ main (int argc, char *argv[])
tth = GNUNET_TRANSPORT_TESTING_init ();
- if ((strcmp (test_plugin, "tcp_nat") == 0) ||
- (strcmp (test_plugin, "udp_nat") == 0))
- {
- nat_res = GNUNET_OS_check_helper_binary ("gnunet-nat-server");
- if (GNUNET_NO == nat_res)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Cannot run NAT test: `%s' %s \n",
- "gnunet-nat-server", "SUID not set");
- return 0;
- }
- if (GNUNET_SYSERR == nat_res)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Cannot run NAT test: `%s' %s \n",
- "gnunet-nat-server", "file not found");
- return 0;
- }
- }
-
GNUNET_TRANSPORT_TESTING_get_config_name (argv[0], &cfg_file_p1, 1);
GNUNET_TRANSPORT_TESTING_get_config_name (argv[0], &cfg_file_p2, 2);
diff --git a/src/transport/test_transport_api_limited_sockets.c b/src/transport/test_transport_api_limited_sockets.c
index 015c28c16..8b8cdc07a 100644
--- a/src/transport/test_transport_api_limited_sockets.c
+++ b/src/transport/test_transport_api_limited_sockets.c
@@ -304,7 +304,6 @@ int
main (int argc, char *argv[])
{
int ret = 0;
- int nat_res;
test_plugin = NULL;
@@ -321,25 +320,6 @@ main (int argc, char *argv[])
#endif
NULL);
- if ((test_plugin != NULL) &&
- ((strcmp (test_plugin, "tcp_nat") == 0) ||
- (strcmp (test_plugin, "udp_nat") == 0)))
- {
- nat_res = GNUNET_OS_check_helper_binary ("gnunet-nat-server");
- if (GNUNET_NO == nat_res)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Cannot run NAT test: `%s' %s \n",
- "gnunet-nat-server", "SUID not set");
- return 0;
- }
- if (GNUNET_SYSERR == nat_res)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Cannot run NAT test: `%s' %s \n",
- "gnunet-nat-server", "file not found");
- return 0;
- }
- }
-
#if !HAVE_SETRLIMIT
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Cannot run test on this system\n");
diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c
index 521126885..f719a42af 100644
--- a/src/transport/test_transport_api_reliability.c
+++ b/src/transport/test_transport_api_reliability.c
@@ -502,7 +502,6 @@ int
main (int argc, char *argv[])
{
int ret;
- int nat_res;
GNUNET_TRANSPORT_TESTING_get_test_name (argv[0], &test_name);
@@ -520,24 +519,6 @@ main (int argc, char *argv[])
tth = GNUNET_TRANSPORT_TESTING_init ();
- if ((strcmp (test_plugin, "tcp_nat") == 0) ||
- (strcmp (test_plugin, "udp_nat") == 0))
- {
- nat_res = GNUNET_OS_check_helper_binary ("gnunet-nat-server");
- if (GNUNET_NO == nat_res)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Cannot run NAT test: `%s' %s \n",
- "gnunet-nat-server", "SUID not set");
- return 0;
- }
- if (GNUNET_SYSERR == nat_res)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Cannot run NAT test: `%s' %s \n",
- "gnunet-nat-server", "file not found");
- return 0;
- }
- }
-
GNUNET_TRANSPORT_TESTING_get_config_name (argv[0], &cfg_file_p1, 1);
GNUNET_TRANSPORT_TESTING_get_config_name (argv[0], &cfg_file_p2, 2);
diff --git a/src/transport/test_transport_api_restart_1peer.c b/src/transport/test_transport_api_restart_1peer.c
index c9db9da64..b414805d8 100644
--- a/src/transport/test_transport_api_restart_1peer.c
+++ b/src/transport/test_transport_api_restart_1peer.c
@@ -473,11 +473,9 @@ main (int argc, char *argv[])
tth = GNUNET_TRANSPORT_TESTING_init ();
-
GNUNET_asprintf (&cfg_file_p1, "test_transport_api_tcp_peer1.conf");
GNUNET_asprintf (&cfg_file_p2, "test_transport_api_tcp_peer2.conf");
-
ret = check ();
GNUNET_free (cfg_file_p1);
diff --git a/src/transport/test_transport_api_restart_2peers.c b/src/transport/test_transport_api_restart_2peers.c
index ef97911c0..86758dfe6 100644
--- a/src/transport/test_transport_api_restart_2peers.c
+++ b/src/transport/test_transport_api_restart_2peers.c
@@ -459,11 +459,9 @@ main (int argc, char *argv[])
tth = GNUNET_TRANSPORT_TESTING_init ();
-
GNUNET_asprintf (&cfg_file_p1, "test_transport_api_tcp_peer1.conf");
GNUNET_asprintf (&cfg_file_p2, "test_transport_api_tcp_peer2.conf");
-
ret = check ();
GNUNET_free (cfg_file_p1);
diff --git a/src/transport/test_transport_api_timeout.c b/src/transport/test_transport_api_timeout.c
index 8a392949c..9ce701a6f 100644
--- a/src/transport/test_transport_api_timeout.c
+++ b/src/transport/test_transport_api_timeout.c
@@ -235,6 +235,12 @@ testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls)
shutdown_flag = GNUNET_NO;
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Waiting for %llu seconds\n", (WAIT.rel_value) / 1000);
+
+ if (die_task != GNUNET_SCHEDULER_NO_TASK)
+ GNUNET_SCHEDULER_cancel (die_task);
+ die_task = GNUNET_SCHEDULER_add_delayed (WAIT, &end_badly, NULL);
+
timer_task = GNUNET_SCHEDULER_add_now (&timer, NULL);
}
@@ -319,7 +325,6 @@ int
main (int argc, char *argv[])
{
int ret;
- int nat_res;
GNUNET_TRANSPORT_TESTING_get_test_name (argv[0], &test_name);
@@ -337,24 +342,6 @@ main (int argc, char *argv[])
tth = GNUNET_TRANSPORT_TESTING_init ();
- if ((strcmp (test_plugin, "tcp_nat") == 0) ||
- (strcmp (test_plugin, "udp_nat") == 0))
- {
- nat_res = GNUNET_OS_check_helper_binary ("gnunet-nat-server");
- if (GNUNET_NO == nat_res)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Cannot run NAT test: `%s' %s \n",
- "gnunet-nat-server", "SUID not set");
- return 0;
- }
- if (GNUNET_SYSERR == nat_res)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Cannot run NAT test: `%s' %s \n",
- "gnunet-nat-server", "file not found");
- return 0;
- }
- }
-
GNUNET_TRANSPORT_TESTING_get_config_name (argv[0], &cfg_file_p1, 1);
GNUNET_TRANSPORT_TESTING_get_config_name (argv[0], &cfg_file_p2, 2);
diff --git a/src/transport/test_transport_api_unreliability.c b/src/transport/test_transport_api_unreliability.c
index fce8d8565..53de91ab1 100644
--- a/src/transport/test_transport_api_unreliability.c
+++ b/src/transport/test_transport_api_unreliability.c
@@ -549,7 +549,6 @@ int
main (int argc, char *argv[])
{
int ret;
- int nat_res;
GNUNET_TRANSPORT_TESTING_get_test_name (argv[0], &test_name);
@@ -567,24 +566,6 @@ main (int argc, char *argv[])
tth = GNUNET_TRANSPORT_TESTING_init ();
- if ((strcmp (test_plugin, "tcp_nat") == 0) ||
- (strcmp (test_plugin, "udp_nat") == 0))
- {
- nat_res = GNUNET_OS_check_helper_binary ("gnunet-nat-server");
- if (GNUNET_NO == nat_res)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Cannot run NAT test: `%s' %s \n",
- "gnunet-nat-server", "SUID not set");
- return 0;
- }
- if (GNUNET_SYSERR == nat_res)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Cannot run NAT test: `%s' %s \n",
- "gnunet-nat-server", "file not found");
- return 0;
- }
- }
-
GNUNET_TRANSPORT_TESTING_get_config_name (argv[0], &cfg_file_p1, 1);
GNUNET_TRANSPORT_TESTING_get_config_name (argv[0], &cfg_file_p2, 2);
diff --git a/src/transport/test_transport_api_unreliability_constant.c b/src/transport/test_transport_api_unreliability_constant.c
index a75f2953e..fb72b0f1c 100644
--- a/src/transport/test_transport_api_unreliability_constant.c
+++ b/src/transport/test_transport_api_unreliability_constant.c
@@ -488,7 +488,6 @@ int
main (int argc, char *argv[])
{
int ret;
- int nat_res;
GNUNET_TRANSPORT_TESTING_get_test_name (argv[0], &test_name);
@@ -506,24 +505,6 @@ main (int argc, char *argv[])
tth = GNUNET_TRANSPORT_TESTING_init ();
- if ((strcmp (test_plugin, "tcp_nat") == 0) ||
- (strcmp (test_plugin, "udp_nat") == 0))
- {
- nat_res = GNUNET_OS_check_helper_binary ("gnunet-nat-server");
- if (GNUNET_NO == nat_res)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Cannot run NAT test: `%s' %s \n",
- "gnunet-nat-server", "SUID not set");
- return 0;
- }
- if (GNUNET_SYSERR == nat_res)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Cannot run NAT test: `%s' %s \n",
- "gnunet-nat-server", "file not found");
- return 0;
- }
- }
-
GNUNET_TRANSPORT_TESTING_get_config_name (argv[0], &cfg_file_p1, 1);
GNUNET_TRANSPORT_TESTING_get_config_name (argv[0], &cfg_file_p2, 2);