gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r31536 - gnunet/src/transport
Date: Wed, 18 Dec 2013 16:06:30 +0100

Author: wachs
Date: 2013-12-18 16:06:30 +0100 (Wed, 18 Dec 2013)
New Revision: 31536

Added:
   gnunet/src/transport/test_transport_api_timeout_bluetooth_peer1.conf
   gnunet/src/transport/test_transport_api_timeout_bluetooth_peer2.conf
   gnunet/src/transport/test_transport_api_timeout_wlan_peer1.conf
   gnunet/src/transport/test_transport_api_timeout_wlan_peer2.conf
Modified:
   gnunet/src/transport/Makefile.am
   gnunet/src/transport/plugin_transport_wlan.c
Log:
new timeout tests for WLAN and bluetooth
session timeout for WLAN


Modified: gnunet/src/transport/Makefile.am
===================================================================
--- gnunet/src/transport/Makefile.am    2013-12-18 14:39:57 UTC (rev 31535)
+++ gnunet/src/transport/Makefile.am    2013-12-18 15:06:30 UTC (rev 31536)
@@ -53,6 +53,7 @@
  WLAN_PLUGIN_LA = libgnunet_plugin_transport_wlan.la
  WLAN_PLUGIN_TEST = test_plugin_wlan
  WLAN_API_TEST = test_transport_api_wlan
+ WLAN_TIMEOUT_TEST = test_transport_api_timeout_wlan
  WLAN_REL_TEST = test_transport_api_reliability_wlan
  WLAN_UREL_TEST = test_transport_api_unreliability_wlan
  WLAN_QUOTA_TEST = test_quota_compliance_wlan \
@@ -72,6 +73,7 @@
  BT_PLUGIN_LA = libgnunet_plugin_transport_bluetooth.la
  BT_PLUGIN_TEST = test_plugin_bluetooth
  BT_API_TEST = test_transport_api_bluetooth
+ BT_TIMEOUT_TEST = test_transport_api_timeout_bluetooth
  BT_REL_TEST = test_transport_api_reliability_bluetooth
  BT_UREL_TEST = test_transport_api_unreliability_bluetooth
  BT_QUOTA_TEST = test_quota_compliance_bluetooth \
@@ -398,7 +400,9 @@
  $(HTTPS_API_TEST) \
  $(HTTPS_API_TIMEOUT_TEST) \
  $(WLAN_API_TEST) \
+ $(WLAN_TIMEOUT_TEST) \
  $(BT_API_TEST) \
+ $(BT_TIMEOUT_TEST) \
  test_transport_api_multi \
  test_transport_blacklisting_no_bl \
  test_transport_blacklisting_outbound_bl_full \
@@ -786,6 +790,22 @@
  $(top_builddir)/src/util/libgnunetutil.la \
  $(top_builddir)/src/transport/libgnunettransporttesting.la
 
+test_transport_api_timeout_wlan_SOURCES = \
+ test_transport_api_timeout.c
+test_transport_api_timeout_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_transport_api_timeout_bluetooth_SOURCES = \
+ test_transport_api_timeout.c
+test_transport_api_timeout_bluetooth_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_reliability_tcp_nat_SOURCES = \
  test_transport_api_reliability.c
 test_transport_api_reliability_tcp_nat_LDADD = \
@@ -1155,6 +1175,10 @@
 test_transport_api_unix_peer2.conf\
 test_transport_api_timeout_unix_peer1.conf\
 test_transport_api_timeout_unix_peer2.conf\
+test_transport_api_timeout_wlan_peer1.conf \
+test_transport_api_timeout_wlan_peer2.conf \
+test_transport_api_timeout_bluetooth_peer1.conf\
+test_transport_api_timeout_bluetooth_peer2.conf\
 test_transport_api_unreliability_udp_peer1.conf\
 test_transport_api_unreliability_udp_peer2.conf\
 test_transport_api_unreliability_unix_peer1.conf\

Modified: gnunet/src/transport/plugin_transport_wlan.c
===================================================================
--- gnunet/src/transport/plugin_transport_wlan.c        2013-12-18 14:39:57 UTC 
(rev 31535)
+++ gnunet/src/transport/plugin_transport_wlan.c        2013-12-18 15:06:30 UTC 
(rev 31536)
@@ -1861,7 +1861,11 @@
                                   const struct GNUNET_PeerIdentity *peer,
                                   struct Session *session)
 {
+  if (session->timeout_task != GNUNET_SCHEDULER_NO_TASK)
+    GNUNET_SCHEDULER_cancel (session->timeout_task);
 
+  session->timeout_task = GNUNET_SCHEDULER_add_delayed (
+      GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT, &session_timeout, session);
 }
 
 /**

Added: gnunet/src/transport/test_transport_api_timeout_bluetooth_peer1.conf
===================================================================
--- gnunet/src/transport/test_transport_api_timeout_bluetooth_peer1.conf        
                        (rev 0)
+++ gnunet/src/transport/test_transport_api_timeout_bluetooth_peer1.conf        
2013-12-18 15:06:30 UTC (rev 31536)
@@ -0,0 +1,35 @@
address@hidden@ template_cfg_peer1.conf
+[PATHS]
+GNUNET_TEST_HOME = /tmp/test-transport/api-bluetooth-p1/
+
+[transport-bluetooth]
+INTERFACE = hci0
+TESTMODE = 1
+
+[arm]
+PORT = 12164
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-arm.sock
+
+[statistics]
+PORT = 12163
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-statistics.sock
+
+[resolver]
+PORT = 12162
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-resolver.sock
+
+[peerinfo]
+PORT = 12161
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-peerinfo.sock
+
+[transport]
+PORT = 12160
+PLUGINS = bluetooth
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-transport.sock
+#PREFIX = xterm -T transport2 -e gdb --command=cmd --args
+#PREFIX = valgrind --leak-check=full --show-reachable=yes 
--main-stacksize=104857600
+#PREFIX = valgrind --leak-check=full --show-reachable=yes
+#PREFIX = valgrind --leak-check=full
+#PREFIX = valgrind --tool=massif
+#PREFIX = gdbserver :2345
+

Added: gnunet/src/transport/test_transport_api_timeout_bluetooth_peer2.conf
===================================================================
--- gnunet/src/transport/test_transport_api_timeout_bluetooth_peer2.conf        
                        (rev 0)
+++ gnunet/src/transport/test_transport_api_timeout_bluetooth_peer2.conf        
2013-12-18 15:06:30 UTC (rev 31536)
@@ -0,0 +1,34 @@
address@hidden@ template_cfg_peer2.conf
+[PATHS]
+GNUNET_TEST_HOME = /tmp/test-transport/api-bluetooth-p2/
+
+[transport-bluetooth]
+INTERFACE = hci1
+TESTMODE = 2
+
+[arm]
+PORT = 12174
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-arm.sock
+
+[statistics]
+PORT = 12173
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-statistics.sock
+
+[resolver]
+PORT = 12172
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-resolver.sock
+
+[peerinfo]
+PORT = 12171
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-peerinfo.sock
+
+[transport]
+PORT = 12170
+PLUGINS = bluetooth
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-transport.sock
+#PREFIX = xterm -T transport2 -e gdb --command=cmd --args
+#PREFIX = valgrind --leak-check=full --show-reachable=yes 
--main-stacksize=104857600
+#PREFIX = valgrind --leak-check=full --show-reachable=yes
+#PREFIX = valgrind --leak-check=full
+#PREFIX = valgrind --tool=massif
+#PREFIX = gdbserver :2345

Added: gnunet/src/transport/test_transport_api_timeout_wlan_peer1.conf
===================================================================
--- gnunet/src/transport/test_transport_api_timeout_wlan_peer1.conf             
                (rev 0)
+++ gnunet/src/transport/test_transport_api_timeout_wlan_peer1.conf     
2013-12-18 15:06:30 UTC (rev 31536)
@@ -0,0 +1,35 @@
address@hidden@ template_cfg_peer1.conf
+[PATHS]
+GNUNET_TEST_HOME = /tmp/test-transport/api-wlan-p1/
+
+[transport-wlan]
+INTERFACE = mon0
+TESTMODE = 1
+
+[arm]
+PORT = 12164
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-arm.sock
+
+[statistics]
+PORT = 12163
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-statistics.sock
+
+[resolver]
+PORT = 12162
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-resolver.sock
+
+[peerinfo]
+PORT = 12161
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-peerinfo.sock
+
+[transport]
+PORT = 12160
+PLUGINS = wlan
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p1-service-transport.sock
+#PREFIX = xterm -T transport2 -e gdb --command=cmd --args
+#PREFIX = valgrind --leak-check=full --show-reachable=yes 
--main-stacksize=104857600
+#PREFIX = valgrind --leak-check=full --show-reachable=yes
+#PREFIX = valgrind --leak-check=full
+#PREFIX = valgrind --tool=massif
+#PREFIX = gdbserver :2345
+

Added: gnunet/src/transport/test_transport_api_timeout_wlan_peer2.conf
===================================================================
--- gnunet/src/transport/test_transport_api_timeout_wlan_peer2.conf             
                (rev 0)
+++ gnunet/src/transport/test_transport_api_timeout_wlan_peer2.conf     
2013-12-18 15:06:30 UTC (rev 31536)
@@ -0,0 +1,34 @@
address@hidden@ template_cfg_peer2.conf
+[PATHS]
+GNUNET_TEST_HOME = /tmp/test-transport/api-wlan-p2/
+
+[transport-wlan]
+INTERFACE = mon1
+TESTMODE = 2
+
+[arm]
+PORT = 12174
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-arm.sock
+
+[statistics]
+PORT = 12173
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-statistics.sock
+
+[resolver]
+PORT = 12172
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-resolver.sock
+
+[peerinfo]
+PORT = 12171
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-peerinfo.sock
+
+[transport]
+PORT = 12170
+PLUGINS = wlan
+UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-p2-service-transport.sock
+#PREFIX = xterm -T transport2 -e gdb --command=cmd --args
+#PREFIX = valgrind --leak-check=full --show-reachable=yes 
--main-stacksize=104857600
+#PREFIX = valgrind --leak-check=full --show-reachable=yes
+#PREFIX = valgrind --leak-check=full
+#PREFIX = valgrind --tool=massif
+#PREFIX = gdbserver :2345




reply via email to

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