[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r22530 - gnunet/src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r22530 - gnunet/src/transport |
Date: |
Fri, 6 Jul 2012 17:24:37 +0200 |
Author: wachs
Date: 2012-07-06 17:24:37 +0200 (Fri, 06 Jul 2012)
New Revision: 22530
Added:
gnunet/src/transport/test_quota_compliance_wlan_asymmetric_peer1.conf
gnunet/src/transport/test_quota_compliance_wlan_asymmetric_peer2.conf
gnunet/src/transport/test_quota_compliance_wlan_peer1.conf
gnunet/src/transport/test_quota_compliance_wlan_peer2.conf
Modified:
gnunet/src/transport/Makefile.am
gnunet/src/transport/gnunet-service-transport_neighbours.c
gnunet/src/transport/test_quota_compliance.c
gnunet/src/transport/transport_api.c
Log:
quota tests for wlan
Modified: gnunet/src/transport/Makefile.am
===================================================================
--- gnunet/src/transport/Makefile.am 2012-07-06 15:13:24 UTC (rev 22529)
+++ gnunet/src/transport/Makefile.am 2012-07-06 15:24:37 UTC (rev 22530)
@@ -40,6 +40,8 @@
WLAN_API_TEST = test_transport_api_wlan
WLAN_REL_TEST = test_transport_api_reliability_wlan
WLAN_UREL_TEST = test_transport_api_unreliability_wlan
+ WLAN_QUOTA_TEST = test_quota_compliance_wlan \
+ test_quota_compliance_wlan_asymmetric
endif
@@ -276,6 +278,7 @@
$(HTTPS_API_TEST) \
$(HTTPS_NAT_API_TEST) \
$(HTTPS_API_TIMEOUT_TEST) \
+ $(WLAN_API_TEST) \
test_transport_api_multi \
test_transport_api_reliability_tcp \
test_transport_api_reliability_tcp_nat \
@@ -286,15 +289,14 @@
$(HTTP_NAT_REL_TEST) \
$(HTTPS_REL_TEST) \
$(HTTPS_NAT_REL_TEST) \
+ $(WLAN_REL_TEST) \
+ $(WLAN_UREL_TEST) \
test_quota_compliance_tcp \
test_quota_compliance_tcp_asymmetric \
test_quota_compliance_udp \
$(UNIX_QUOTA_TEST) \
$(HTTP_QUOTA_TEST) \
- $(HTTPS_QUOTA_TEST) \
- $(WLAN_API_TEST) \
- $(WLAN_REL_TEST) \
- $(WLAN_UREL_TEST)
+ $(WLAN_QUOTA_TEST)
if ENABLE_TEST_RUN
TESTS = \
@@ -322,6 +324,7 @@
$(HTTPS_API_TEST) \
$(HTTPS_NAT_API_TEST) \
$(HTTPS_API_TIMEOUT_TEST) \
+ $(WLAN_API_TEST) \
test_transport_api_multi \
test_transport_api_reliability_tcp \
test_transport_api_reliability_tcp_nat \
@@ -332,15 +335,14 @@
$(HTTP_NAT_REL_TEST) \
$(HTTPS_REL_TEST) \
$(HTTPS_NAT_REL_TEST) \
+ $(WLAN_REL_TEST) \
+ $(WLAN_UREL_TEST) \
test_quota_compliance_tcp \
test_quota_compliance_tcp_asymmetric \
test_quota_compliance_udp \
$(UNIX_QUOTA_TEST) \
$(HTTP_QUOTA_TEST) \
- $(HTTPS_QUOTA_TEST) \
- $(WLAN_API_TEST) \
- $(WLAN_REL_TEST) \
- $(WLAN_UREL_TEST)
+ $(HTTPS_QUOTA_TEST)
endif
test_transport_testing_startstop_SOURCES = \
@@ -655,12 +657,6 @@
$(top_builddir)/src/util/libgnunetutil.la \
$(top_builddir)/src/transport/libgnunettransporttesting.la
-#test_quota_compliance_tcp_asymmetric_send_constant_SOURCES = \
-# test_quota_compliance.c
-#test_quota_compliance_tcp_asymmetric_send_constant_LDADD = \
-# $(top_builddir)/src/transport/libgnunettransport.la \
-# $(top_builddir)/src/util/libgnunetutil.la
-
test_quota_compliance_http_SOURCES = \
test_quota_compliance.c
test_quota_compliance_http_LDADD = \
@@ -677,12 +673,6 @@
$(top_builddir)/src/util/libgnunetutil.la \
$(top_builddir)/src/transport/libgnunettransporttesting.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
test_quota_compliance_https_LDADD = \
@@ -699,12 +689,6 @@
$(top_builddir)/src/util/libgnunetutil.la \
$(top_builddir)/src/transport/libgnunettransporttesting.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 = \
@@ -729,6 +713,22 @@
$(top_builddir)/src/util/libgnunetutil.la \
$(top_builddir)/src/transport/libgnunettransporttesting.la
+test_quota_compliance_wlan_SOURCES = \
+ test_quota_compliance.c
+test_quota_compliance_wlan_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/util/libgnunetutil.la \
+ $(top_builddir)/src/transport/libgnunettransporttesting.la
+
+test_quota_compliance_wlan_asymmetric_SOURCES = \
+ test_quota_compliance.c
+test_quota_compliance_wlan_asymmetric_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/util/libgnunetutil.la \
+ $(top_builddir)/src/transport/libgnunettransporttesting.la
+
test_transport_api_multi_SOURCES = \
test_transport_api.c
test_transport_api_multi_LDADD = \
Modified: gnunet/src/transport/gnunet-service-transport_neighbours.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_neighbours.c 2012-07-06
15:13:24 UTC (rev 22529)
+++ gnunet/src/transport/gnunet-service-transport_neighbours.c 2012-07-06
15:24:37 UTC (rev 22530)
@@ -2169,7 +2169,7 @@
return;
}
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"ATS tells us to switch to address '%s' session %p for "
"peer `%s' in state %s (quota in/out %u %u )\n",
(address->address_length != 0) ? GST_plugins_a2s (address):
"<inbound>",
Modified: gnunet/src/transport/test_quota_compliance.c
===================================================================
--- gnunet/src/transport/test_quota_compliance.c 2012-07-06 15:13:24 UTC
(rev 22529)
+++ gnunet/src/transport/test_quota_compliance.c 2012-07-06 15:24:37 UTC
(rev 22530)
@@ -529,7 +529,7 @@
if (NULL != strstr (test_name, "asymmetric"))
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Running asymmetric test with sending peer unlimited,
receiving peer (in/out): %llu/%llu b/s \n",
p2_quota_in, p2_quota_out);
p1_quota_out = 1024 * 1024 * 1024;
@@ -537,7 +537,7 @@
}
else
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Running symmetric test with (in/out) %llu/%llu b/s \n",
p2_quota_in, p2_quota_out);
}
Added: gnunet/src/transport/test_quota_compliance_wlan_asymmetric_peer1.conf
===================================================================
--- gnunet/src/transport/test_quota_compliance_wlan_asymmetric_peer1.conf
(rev 0)
+++ gnunet/src/transport/test_quota_compliance_wlan_asymmetric_peer1.conf
2012-07-06 15:24:37 UTC (rev 22530)
@@ -0,0 +1,30 @@
address@hidden@ template_cfg_peer1.conf
+[PATHS]
+SERVICEHOME = /tmp/test-transport/api-wlan-p1/
+DEFAULTCONFIG = test_transport_api_wlan_peer1.conf
+
+[transport-wlan]
+TESTMODE = 1
+
+[arm]
+PORT = 12164
+UNIXPATH = /tmp/gnunet-p1-service-arm.sock
+
+[statistics]
+PORT = 12163
+UNIXPATH = /tmp/gnunet-p1-service-statistics.sock
+
+[resolver]
+PORT = 12162
+UNIXPATH = /tmp/gnunet-p1-service-resolver.sock
+
+[peerinfo]
+PORT = 12161
+UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock
+
+[transport]
+PORT = 12160
+PLUGINS = wlan
+UNIXPATH = /tmp/gnunet-p1-service-transport.sock
+
+
Added: gnunet/src/transport/test_quota_compliance_wlan_asymmetric_peer2.conf
===================================================================
--- gnunet/src/transport/test_quota_compliance_wlan_asymmetric_peer2.conf
(rev 0)
+++ gnunet/src/transport/test_quota_compliance_wlan_asymmetric_peer2.conf
2012-07-06 15:24:37 UTC (rev 22530)
@@ -0,0 +1,30 @@
address@hidden@ template_cfg_peer2.conf
+[PATHS]
+SERVICEHOME = /tmp/test-transport/api-wlan-p2/
+DEFAULTCONFIG = test_transport_api_wlan_peer2.conf
+
+[transport-wlan]
+INTERFACE = mon1
+TESTMODE = 2
+
+[arm]
+PORT = 12174
+UNIXPATH = /tmp/gnunet-p2-service-arm.sock
+
+[statistics]
+PORT = 12173
+UNIXPATH = /tmp/gnunet-p2-service-statistics.sock
+
+[resolver]
+PORT = 12172
+UNIXPATH = /tmp/gnunet-p2-service-resolver.sock
+
+[peerinfo]
+PORT = 12171
+UNIXPATH = /tmp/gnunet-p2-service-peerinfo.sock
+
+[transport]
+PORT = 12170
+PLUGINS = wlan
+UNIXPATH = /tmp/gnunet-p2-service-transport.sock
+
Added: gnunet/src/transport/test_quota_compliance_wlan_peer1.conf
===================================================================
--- gnunet/src/transport/test_quota_compliance_wlan_peer1.conf
(rev 0)
+++ gnunet/src/transport/test_quota_compliance_wlan_peer1.conf 2012-07-06
15:24:37 UTC (rev 22530)
@@ -0,0 +1,30 @@
address@hidden@ template_cfg_peer1.conf
+[PATHS]
+SERVICEHOME = /tmp/test-transport/api-wlan-p1/
+DEFAULTCONFIG = test_transport_api_wlan_peer1.conf
+
+[transport-wlan]
+TESTMODE = 1
+
+[arm]
+PORT = 12164
+UNIXPATH = /tmp/gnunet-p1-service-arm.sock
+
+[statistics]
+PORT = 12163
+UNIXPATH = /tmp/gnunet-p1-service-statistics.sock
+
+[resolver]
+PORT = 12162
+UNIXPATH = /tmp/gnunet-p1-service-resolver.sock
+
+[peerinfo]
+PORT = 12161
+UNIXPATH = /tmp/gnunet-p1-service-peerinfo.sock
+
+[transport]
+PORT = 12160
+PLUGINS = wlan
+UNIXPATH = /tmp/gnunet-p1-service-transport.sock
+
+
Added: gnunet/src/transport/test_quota_compliance_wlan_peer2.conf
===================================================================
--- gnunet/src/transport/test_quota_compliance_wlan_peer2.conf
(rev 0)
+++ gnunet/src/transport/test_quota_compliance_wlan_peer2.conf 2012-07-06
15:24:37 UTC (rev 22530)
@@ -0,0 +1,30 @@
address@hidden@ template_cfg_peer2.conf
+[PATHS]
+SERVICEHOME = /tmp/test-transport/api-wlan-p2/
+DEFAULTCONFIG = test_transport_api_wlan_peer2.conf
+
+[transport-wlan]
+INTERFACE = mon1
+TESTMODE = 2
+
+[arm]
+PORT = 12174
+UNIXPATH = /tmp/gnunet-p2-service-arm.sock
+
+[statistics]
+PORT = 12173
+UNIXPATH = /tmp/gnunet-p2-service-statistics.sock
+
+[resolver]
+PORT = 12172
+UNIXPATH = /tmp/gnunet-p2-service-resolver.sock
+
+[peerinfo]
+PORT = 12171
+UNIXPATH = /tmp/gnunet-p2-service-peerinfo.sock
+
+[transport]
+PORT = 12170
+PLUGINS = wlan
+UNIXPATH = /tmp/gnunet-p2-service-transport.sock
+
Modified: gnunet/src/transport/transport_api.c
===================================================================
--- gnunet/src/transport/transport_api.c 2012-07-06 15:13:24 UTC (rev
22529)
+++ gnunet/src/transport/transport_api.c 2012-07-06 15:24:37 UTC (rev
22530)
@@ -477,6 +477,8 @@
break;
}
n = neighbour_add (h, &cim->id);
+ LOG (GNUNET_ERROR_TYPE_ERROR, "Receiving `%s' message for `%4s' with quota
%u\n",
+ "CONNECT", GNUNET_i2s (&cim->id), ntohl (cim->quota_out.value__));
GNUNET_BANDWIDTH_tracker_update_quota (&n->out_tracker, cim->quota_out);
if (h->nc_cb != NULL)
h->nc_cb (h->cls, &n->id, ats, ats_count);
@@ -564,6 +566,8 @@
n = neighbour_find (h, &qm->peer);
if (n == NULL)
break;
+ LOG (GNUNET_ERROR_TYPE_ERROR, "Receiving `%s' message for `%4s' with quota
%u\n",
+ "SET_QUOTA", GNUNET_i2s (&qm->peer), ntohl (qm->quota.value__));
GNUNET_BANDWIDTH_tracker_update_quota (&n->out_tracker, qm->quota);
break;
default:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r22530 - gnunet/src/transport,
gnunet <=