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
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.
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
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
$(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
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",
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;