diff options
author | David Barksdale <amatus.amongus@gmail.com> | 2015-01-01 19:22:03 +0000 |
---|---|---|
committer | David Barksdale <amatus.amongus@gmail.com> | 2015-01-01 19:22:03 +0000 |
commit | 9f9f48f0a6f81b5770bc8040c5c0826ceb9d3a15 (patch) | |
tree | 533507524f6488034f3cc1e85bd83220fcd4b877 | |
parent | bbe9fca99a417babc866ab4cd150fc62b1c7c8ef (diff) | |
download | gnunet-9f9f48f0a6f81b5770bc8040c5c0826ceb9d3a15.tar.gz gnunet-9f9f48f0a6f81b5770bc8040c5c0826ceb9d3a15.zip |
Add a test to reproduce issue #3554
-rw-r--r-- | src/transport/Makefile.am | 20 | ||||
-rwxr-xr-x | src/transport/test_delay | 18 | ||||
-rw-r--r-- | src/transport/test_transport_api_slow_ats_peer1.conf | 7 | ||||
-rw-r--r-- | src/transport/test_transport_api_slow_ats_peer2.conf | 9 |
4 files changed, 50 insertions, 4 deletions
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 = \ | |||
486 | $(HTTP_QUOTA_TEST) \ | 486 | $(HTTP_QUOTA_TEST) \ |
487 | $(HTTPS_QUOTA_TEST) \ | 487 | $(HTTPS_QUOTA_TEST) \ |
488 | $(WLAN_QUOTA_TEST) \ | 488 | $(WLAN_QUOTA_TEST) \ |
489 | $(BT_QUOTA_TEST) | 489 | $(BT_QUOTA_TEST) \ |
490 | test_transport_api_slow_ats | ||
490 | endif | 491 | endif |
491 | 492 | ||
492 | if ENABLE_TEST_RUN | 493 | if ENABLE_TEST_RUN |
@@ -555,7 +556,8 @@ TESTS = \ | |||
555 | test_quota_compliance_udp \ | 556 | test_quota_compliance_udp \ |
556 | $(UNIX_QUOTA_TEST) \ | 557 | $(UNIX_QUOTA_TEST) \ |
557 | $(HTTP_QUOTA_TEST) \ | 558 | $(HTTP_QUOTA_TEST) \ |
558 | $(HTTPS_QUOTA_TEST) | 559 | $(HTTPS_QUOTA_TEST) \ |
560 | test_transport_api_slow_ats | ||
559 | endif | 561 | endif |
560 | 562 | ||
561 | test_transport_testing_startstop_SOURCES = \ | 563 | test_transport_testing_startstop_SOURCES = \ |
@@ -1211,10 +1213,19 @@ test_transport_api_monitor_validation_LDADD = \ | |||
1211 | $(top_builddir)/src/util/libgnunetutil.la \ | 1213 | $(top_builddir)/src/util/libgnunetutil.la \ |
1212 | libgnunettransporttesting.la | 1214 | libgnunettransporttesting.la |
1213 | 1215 | ||
1216 | test_transport_api_slow_ats_SOURCES = \ | ||
1217 | test_transport_api.c | ||
1218 | test_transport_api_slow_ats_LDADD = \ | ||
1219 | libgnunettransport.la \ | ||
1220 | $(top_builddir)/src/hello/libgnunethello.la \ | ||
1221 | $(top_builddir)/src/util/libgnunetutil.la \ | ||
1222 | libgnunettransporttesting.la | ||
1223 | |||
1214 | 1224 | ||
1215 | EXTRA_DIST = \ | 1225 | EXTRA_DIST = \ |
1216 | test_plugin_hostkey \ | 1226 | test_plugin_hostkey \ |
1217 | test_plugin_hostkey.ecc \ | 1227 | test_plugin_hostkey.ecc \ |
1228 | test_delay \ | ||
1218 | template_cfg_peer1.conf\ | 1229 | template_cfg_peer1.conf\ |
1219 | template_cfg_peer2.conf\ | 1230 | template_cfg_peer2.conf\ |
1220 | test_plugin_transport_data.conf\ | 1231 | test_plugin_transport_data.conf\ |
@@ -1340,5 +1351,6 @@ test_transport_blacklisting_cfg_blp_peer2_multiple_plugins.conf \ | |||
1340 | test_transport_api_http_reverse_peer1.conf \ | 1351 | test_transport_api_http_reverse_peer1.conf \ |
1341 | test_transport_api_http_reverse_peer2.conf \ | 1352 | test_transport_api_http_reverse_peer2.conf \ |
1342 | perf_tcp_peer1.conf \ | 1353 | perf_tcp_peer1.conf \ |
1343 | perf_tcp_peer2.conf | 1354 | perf_tcp_peer2.conf \ |
1344 | 1355 | test_transport_api_slow_ats_peer1.conf \ | |
1356 | 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 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | TEMP=$(getopt -o t: -- "$@") | ||
4 | |||
5 | if [ $? != 0 ] ; then | ||
6 | exit 1 | ||
7 | fi | ||
8 | |||
9 | eval set -- "$TEMP" | ||
10 | |||
11 | while true ; do | ||
12 | case "$1" in | ||
13 | (-t) sleep "$2" ; shift 2 ;; | ||
14 | (--) shift ; break ;; | ||
15 | (*) echo "Error parsing getopt output" ; exit 1 ;; | ||
16 | esac | ||
17 | done | ||
18 | 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 @@ | |||
1 | @INLINE@ template_cfg_peer1.conf | ||
2 | [PATHS] | ||
3 | GNUNET_TEST_HOME = /tmp/test-transport/api-slow-ats-p1/ | ||
4 | |||
5 | [transport] | ||
6 | PLUGINS = tcp | ||
7 | |||
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 @@ | |||
1 | @INLINE@ template_cfg_peer2.conf | ||
2 | [PATHS] | ||
3 | GNUNET_TEST_HOME = /tmp/test-transport/api-slow-ats-p2/ | ||
4 | |||
5 | [transport] | ||
6 | PLUGINS = tcp | ||
7 | |||
8 | [ats] | ||
9 | PREFIX = ./test_delay -t 30 -- | ||