From 9f9f48f0a6f81b5770bc8040c5c0826ceb9d3a15 Mon Sep 17 00:00:00 2001 From: David Barksdale Date: Thu, 1 Jan 2015 19:22:03 +0000 Subject: Add a test to reproduce issue #3554 --- src/transport/Makefile.am | 20 ++++++++++++++++---- src/transport/test_delay | 18 ++++++++++++++++++ src/transport/test_transport_api_slow_ats_peer1.conf | 7 +++++++ src/transport/test_transport_api_slow_ats_peer2.conf | 9 +++++++++ 4 files changed, 50 insertions(+), 4 deletions(-) create mode 100755 src/transport/test_delay create mode 100644 src/transport/test_transport_api_slow_ats_peer1.conf create mode 100644 src/transport/test_transport_api_slow_ats_peer2.conf diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am index 6866ea0ee..d2dcd4236 100644 --- a/src/transport/Makefile.am +++ b/src/transport/Makefile.am @@ -486,7 +486,8 @@ check_PROGRAMS = \ $(HTTP_QUOTA_TEST) \ $(HTTPS_QUOTA_TEST) \ $(WLAN_QUOTA_TEST) \ - $(BT_QUOTA_TEST) + $(BT_QUOTA_TEST) \ + test_transport_api_slow_ats endif if ENABLE_TEST_RUN @@ -555,7 +556,8 @@ TESTS = \ test_quota_compliance_udp \ $(UNIX_QUOTA_TEST) \ $(HTTP_QUOTA_TEST) \ - $(HTTPS_QUOTA_TEST) + $(HTTPS_QUOTA_TEST) \ + test_transport_api_slow_ats endif test_transport_testing_startstop_SOURCES = \ @@ -1211,10 +1213,19 @@ test_transport_api_monitor_validation_LDADD = \ $(top_builddir)/src/util/libgnunetutil.la \ libgnunettransporttesting.la +test_transport_api_slow_ats_SOURCES = \ + test_transport_api.c +test_transport_api_slow_ats_LDADD = \ + libgnunettransport.la \ + $(top_builddir)/src/hello/libgnunethello.la \ + $(top_builddir)/src/util/libgnunetutil.la \ + libgnunettransporttesting.la + EXTRA_DIST = \ test_plugin_hostkey \ test_plugin_hostkey.ecc \ +test_delay \ template_cfg_peer1.conf\ template_cfg_peer2.conf\ test_plugin_transport_data.conf\ @@ -1340,5 +1351,6 @@ test_transport_blacklisting_cfg_blp_peer2_multiple_plugins.conf \ test_transport_api_http_reverse_peer1.conf \ test_transport_api_http_reverse_peer2.conf \ perf_tcp_peer1.conf \ -perf_tcp_peer2.conf - +perf_tcp_peer2.conf \ +test_transport_api_slow_ats_peer1.conf \ +test_transport_api_slow_ats_peer2.conf diff --git a/src/transport/test_delay b/src/transport/test_delay new file mode 100755 index 000000000..31c7777c4 --- /dev/null +++ b/src/transport/test_delay @@ -0,0 +1,18 @@ +#!/bin/sh + +TEMP=$(getopt -o t: -- "$@") + +if [ $? != 0 ] ; then + exit 1 +fi + +eval set -- "$TEMP" + +while true ; do + case "$1" in + (-t) sleep "$2" ; shift 2 ;; + (--) shift ; break ;; + (*) echo "Error parsing getopt output" ; exit 1 ;; + esac +done +exec "$@" diff --git a/src/transport/test_transport_api_slow_ats_peer1.conf b/src/transport/test_transport_api_slow_ats_peer1.conf new file mode 100644 index 000000000..5d50d5375 --- /dev/null +++ b/src/transport/test_transport_api_slow_ats_peer1.conf @@ -0,0 +1,7 @@ +@INLINE@ template_cfg_peer1.conf +[PATHS] +GNUNET_TEST_HOME = /tmp/test-transport/api-slow-ats-p1/ + +[transport] +PLUGINS = tcp + diff --git a/src/transport/test_transport_api_slow_ats_peer2.conf b/src/transport/test_transport_api_slow_ats_peer2.conf new file mode 100644 index 000000000..4895e4c4f --- /dev/null +++ b/src/transport/test_transport_api_slow_ats_peer2.conf @@ -0,0 +1,9 @@ +@INLINE@ template_cfg_peer2.conf +[PATHS] +GNUNET_TEST_HOME = /tmp/test-transport/api-slow-ats-p2/ + +[transport] +PLUGINS = tcp + +[ats] +PREFIX = ./test_delay -t 30 -- -- cgit v1.2.3