gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r13470 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r13470 - gnunet/src/transport
Date: Fri, 29 Oct 2010 18:12:26 +0200

Author: wachs
Date: 2010-10-29 18:12:25 +0200 (Fri, 29 Oct 2010)
New Revision: 13470

Modified:
   gnunet/src/transport/Makefile.am
   gnunet/src/transport/test_quota_compliance.c
Log:
a lot of new testcases


Modified: gnunet/src/transport/Makefile.am
===================================================================
--- gnunet/src/transport/Makefile.am    2010-10-29 15:41:17 UTC (rev 13469)
+++ gnunet/src/transport/Makefile.am    2010-10-29 16:12:25 UTC (rev 13470)
@@ -18,13 +18,17 @@
  HTTP_PLUGIN_TEST = test_plugin_transport_http
  HTTP_API_TEST = test_transport_api_http
  HTTP_REL_TEST = test_transport_api_reliability_http
- HTTP_QUOTA_TEST = test_quota_compliance_http
+ HTTP_QUOTA_TEST = test_quota_compliance_http \
+                                  
test_quota_compliance_http_asymmetric_recv_constant \
+                                  
test_quota_compliance_http_asymmetric_send_constant
 
  HTTPS_PLUGIN_LA = libgnunet_plugin_transport_https.la
  HTTPS_PLUGIN_TEST = test_plugin_transport_https
  HTTPS_API_TEST = test_transport_api_https
  HTTPS_REL_TEST = test_transport_api_reliability_https
- HTTPS_QUOTA_TEST = test_quota_compliance_https                      
+ HTTPS_QUOTA_TEST = test_quota_compliance_https \
+                                       
test_quota_compliance_https_asymmetric_recv_constant \
+                                       
test_quota_compliance_https_asymmetric_send_constant
 endif
 
 if USE_COVERAGE
@@ -207,6 +211,8 @@
  test_quota_compliance_tcp_asymmetric_recv_constant \
  test_quota_compliance_tcp_asymmetric_send_constant \
  test_quota_compliance_udp \
+ test_quota_compliance_udp_asymmetric_send_constant \
+ test_quota_compliance_udp_asymmetric_recv_constant \
  $(HTTP_QUOTA_TEST) \
  $(HTTPS_QUOTA_TEST)
 # TODO: add tests for nat, etc.
@@ -229,6 +235,8 @@
  test_quota_compliance_tcp_asymmetric_recv_constant \
  test_quota_compliance_tcp_asymmetric_send_constant \
  test_quota_compliance_udp \
+ test_quota_compliance_udp_asymmetric_send_constant \
+ test_quota_compliance_udp_asymmetric_recv_constant \
  $(HTTP_QUOTA_TEST) \
  $(HTTPS_QUOTA_TEST)
 endif
@@ -340,6 +348,18 @@
 test_quota_compliance_http_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
  $(top_builddir)/src/util/libgnunetutil.la
+ 
+ test_quota_compliance_http_asymmetric_recv_constant_SOURCES = \
+ test_quota_compliance.c
+test_quota_compliance_http_asymmetric_recv_constant_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/util/libgnunetutil.la
+ 
+ test_quota_compliance_http_asymmetric_send_constant_SOURCES = \
+ test_quota_compliance.c
+test_quota_compliance_http_asymmetric_send_constant_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/util/libgnunetutil.la
 
 test_quota_compliance_https_SOURCES = \
  test_quota_compliance.c
@@ -347,11 +367,36 @@
  $(top_builddir)/src/transport/libgnunettransport.la \
  $(top_builddir)/src/util/libgnunetutil.la
 
+ test_quota_compliance_https_asymmetric_recv_constant_SOURCES = \
+ test_quota_compliance.c
+test_quota_compliance_https_asymmetric_recv_constant_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/util/libgnunetutil.la
+ 
+ test_quota_compliance_https_asymmetric_send_constant_SOURCES = \
+ test_quota_compliance.c
+test_quota_compliance_https_asymmetric_send_constant_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/util/libgnunetutil.la
+
+
 test_quota_compliance_udp_SOURCES = \
  test_quota_compliance.c
 test_quota_compliance_udp_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
  $(top_builddir)/src/util/libgnunetutil.la
+ 
+test_quota_compliance_udp_asymmetric_recv_constant_SOURCES = \
+ test_quota_compliance.c
+test_quota_compliance_udp_asymmetric_recv_constant_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/util/libgnunetutil.la
+ 
+test_quota_compliance_udp_asymmetric_send_constant_SOURCES = \
+ test_quota_compliance.c
+test_quota_compliance_udp_asymmetric_send_constant_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/util/libgnunetutil.la 
 
 endif
 

Modified: gnunet/src/transport/test_quota_compliance.c
===================================================================
--- gnunet/src/transport/test_quota_compliance.c        2010-10-29 15:41:17 UTC 
(rev 13469)
+++ gnunet/src/transport/test_quota_compliance.c        2010-10-29 16:12:25 UTC 
(rev 13470)
@@ -680,6 +680,57 @@
       is_udp = GNUNET_YES;
     }
 
+  if (strstr(argv[0], "asymmetric_recv") != NULL)
+  {
+      is_asymmetric_recv_constant = GNUNET_YES;
+  }
+  else
+         is_asymmetric_recv_constant = GNUNET_NO;
+  if (strstr(argv[0], "asymmetric_send") != NULL)
+  {
+      is_asymmetric_send_constant = GNUNET_YES;
+  }
+  else
+         is_asymmetric_send_constant = GNUNET_NO;
+
+  char * logger;
+  if (is_tcp == GNUNET_YES)
+  {
+         if (is_asymmetric_recv_constant == GNUNET_YES)
+                 GNUNET_asprintf(&logger, 
"test-quota-compliance-%s-%s","tcp","asymmetric_recv_constant");
+         else if (is_asymmetric_send_constant == GNUNET_YES)
+                 GNUNET_asprintf(&logger, 
"test-quota-compliance-%s-%s","tcp","asymmetric_send_constant");
+         else
+                 GNUNET_asprintf(&logger, 
"test-quota-compliance-%s-%s","tcp","symmetric");
+  }
+  if (is_udp == GNUNET_YES)
+  {
+         if (is_asymmetric_recv_constant == GNUNET_YES)
+                 GNUNET_asprintf(&logger, 
"test-quota-compliance-%s-%s","udp","asymmetric_recv_constant");
+         else if (is_asymmetric_send_constant == GNUNET_YES)
+                 GNUNET_asprintf(&logger, 
"test-quota-compliance-%s-%s","udp","asymmetric_send_constant");
+         else
+                 GNUNET_asprintf(&logger, 
"test-quota-compliance-%s-%s","udp","symmetric");
+  }
+  if (is_http == GNUNET_YES)
+  {
+         if (is_asymmetric_recv_constant == GNUNET_YES)
+                 GNUNET_asprintf(&logger, 
"test-quota-compliance-%s-%s","http","asymmetric_recv_constant");
+         else if (is_asymmetric_send_constant == GNUNET_YES)
+                 GNUNET_asprintf(&logger, 
"test-quota-compliance-%s-%s","http","asymmetric_send_constant");
+         else
+                 GNUNET_asprintf(&logger, 
"test-quota-compliance-%s-%s","http","symmetric");
+  }
+  if (is_https == GNUNET_YES)
+  {
+         if (is_asymmetric_recv_constant == GNUNET_YES)
+                 GNUNET_asprintf(&logger, 
"test-quota-compliance-%s-%s","https","asymmetric_recv_constant");
+         else if (is_asymmetric_send_constant == GNUNET_YES)
+                 GNUNET_asprintf(&logger, 
"test-quota-compliance-%s-%s","https","asymmetric_send_constant");
+         else
+                 GNUNET_asprintf(&logger, 
"test-quota-compliance-%s-%s","https","symmetric");
+  }
+
   GNUNET_log_setup ("test-quota-compliance",
 #if VERBOSE
                     "DEBUG",
@@ -698,26 +749,14 @@
   struct GNUNET_GETOPT_CommandLineOption options[] = {
     GNUNET_GETOPT_OPTION_END
   };
-
-  if (strstr(argv[0], "asymmetric_recv") != NULL)
-  {
-      is_asymmetric_recv_constant = GNUNET_YES;
-  }
-  else
-         is_asymmetric_recv_constant = GNUNET_NO;
-  if (strstr(argv[0], "asymmetric_send") != NULL)
-  {
-      is_asymmetric_send_constant = GNUNET_YES;
-  }
-  else
-         is_asymmetric_send_constant = GNUNET_NO;
   ok = 1;
   GNUNET_PROGRAM_run ((sizeof (argv1) / sizeof (char *)) - 1,
-                      argv1, "test-quota-compliance", "nohelp",
+                      argv1, logger , "nohelp",
                       options, &run, &ok);
   ret = ok;
   stop_arm (&p1);
   stop_arm (&p2);
+  GNUNET_free(logger);
   GNUNET_DISK_directory_remove ("/tmp/test_quota_compliance_peer1");
   GNUNET_DISK_directory_remove ("/tmp/test_quota_compliance_peer2");
   return ret;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]