You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ic...@apache.org on 2015/12/02 15:37:42 UTC
svn commit: r1717638 - in /httpd/test/mod_h2/trunk: conf/httpd.conf
conf/sites/test2.example.org.conf test/test.sh test/test_common.sh
test/test_window_update.sh
Author: icing
Date: Wed Dec 2 14:37:42 2015
New Revision: 1717638
URL: http://svn.apache.org/viewvc?rev=1717638&view=rev
Log:
adding tests for window_update handling on input
Added:
httpd/test/mod_h2/trunk/test/test_window_update.sh
Modified:
httpd/test/mod_h2/trunk/conf/httpd.conf
httpd/test/mod_h2/trunk/conf/sites/test2.example.org.conf
httpd/test/mod_h2/trunk/test/test.sh
httpd/test/mod_h2/trunk/test/test_common.sh
Modified: httpd/test/mod_h2/trunk/conf/httpd.conf
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/conf/httpd.conf?rev=1717638&r1=1717637&r2=1717638&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/conf/httpd.conf (original)
+++ httpd/test/mod_h2/trunk/conf/httpd.conf Wed Dec 2 14:37:42 2015
@@ -77,7 +77,7 @@ MaxKeepAliveRequests 0
# max parallel streams per session, default 100
#H2MaxSessionStreams
# max initial window size upstream (per stream), default 64k
- #H2InitialWindowSize
+ #H2WindowSize
# max memory buffer size downstream (per stream), default 64k
#H2StreamMaxMemSize
Modified: httpd/test/mod_h2/trunk/conf/sites/test2.example.org.conf
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/conf/sites/test2.example.org.conf?rev=1717638&r1=1717637&r2=1717638&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/conf/sites/test2.example.org.conf (original)
+++ httpd/test/mod_h2/trunk/conf/sites/test2.example.org.conf Wed Dec 2 14:37:42 2015
@@ -20,7 +20,7 @@
<Location /hello.py>
SSLOptions +StdEnvVars
</Location>
-
+
<IfVersion >= 2.5.0>
# disabling TLS warmup record size handling
H2TLSWarmUpSize 0
@@ -37,6 +37,9 @@
RewriteEngine on
RewriteRule ^/latest.tar.gz$ /xxx-1.0.2a.tar.gz [R=302,NC]
+ # Limited window size for testing input flow control
+ H2WindowSize 65535
+
<Location /proxy/>
ProxyPass http://test.example.org:SUBST_PORT_HTTP_SUBST/
ProxyPassReverse http://test.example.org:SUBST_PORT_HTTP_SUBST/
Modified: httpd/test/mod_h2/trunk/test/test.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test.sh?rev=1717638&r1=1717637&r2=1717638&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test.sh (original)
+++ httpd/test/mod_h2/trunk/test/test.sh Wed Dec 2 14:37:42 2015
@@ -27,6 +27,7 @@ HOST_NAME_2="$1"; shift
HOST_NAME_SER="$1"; shift
HTTP_AUTH=http://$HOST_NAME:$HTTP_PORT
+HTTP_AUTH_2=http://$HOST_NAME_2:$HTTP_PORT
HTTPS_AUTH=https://$HOST_NAME:$HTTPS_PORT
HTTPS_AUTH_2=https://$HOST_NAME_2:$HTTPS_PORT
HTTPS_AUTH_SER=https://$HOST_NAME_SER:$HTTPS_PORT
@@ -44,6 +45,7 @@ $SHELL "$TEST_DIR"/test_nghttp_get.sh $
$SHELL "$TEST_DIR"/test_nghttp_post.sh $HTTPS_AUTH &&
$SHELL "$TEST_DIR"/test_curl_get.sh $HTTPS_AUTH &&
$SHELL "$TEST_DIR"/test_curl_post.sh $HTTPS_AUTH &&
+$SHELL "$TEST_DIR"/test_window_update.sh $HTTP_AUTH_2 &&
$SHELL "$TEST_DIR"/test_push.sh $HTTPS_AUTH &&
$SHELL "$TEST_DIR"/test_trailer.sh $HTTPS_AUTH &&
$SHELL "$TEST_DIR"/test_nghttp_get.sh $HTTPS_AUTH/proxy alpn "HTTP/1.1" &&
Modified: httpd/test/mod_h2/trunk/test/test_common.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test_common.sh?rev=1717638&r1=1717637&r2=1717638&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_common.sh (original)
+++ httpd/test/mod_h2/trunk/test/test_common.sh Wed Dec 2 14:37:42 2015
@@ -47,6 +47,7 @@ TMP="$GEN/tmp"
CURL="${CURL:-${BIN_DIR}/curl} -sk --resolv ${HOST#*://}:127.0.0.1"
NGHTTP="${NGHTTP:-${BIN_DIR}/nghttp}"
+H2LOAD="${H2LOAD:-${BIN_DIR}/h2load}"
APXS="${APXS:-${BIN_DIR}/apxs}"
Added: httpd/test/mod_h2/trunk/test/test_window_update.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test_window_update.sh?rev=1717638&view=auto
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_window_update.sh (added)
+++ httpd/test/mod_h2/trunk/test/test_window_update.sh Wed Dec 2 14:37:42 2015
@@ -0,0 +1,52 @@
+#!/bin/bash
+# Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+source $(dirname $0)/test_common.sh
+echo "test window updates: $1"
+
+################################################################################
+# check announcements of upgrade: possibilities
+################################################################################
+
+URL_PREFIX="$1"
+
+if [ ! -f $GEN/data-10k ]; then
+ i=0; while [ $i -lt 10 ]; do
+ cat $GEN/data-1k
+ i=$[ i + 1 ]
+ done > $GEN/data-10k
+fi
+
+
+# test if small uploads trigger window_udpate(s) and do not let connection
+# windows shrink to 0.
+#
+echo -n "POSTing 10 x 10k to server, MUST not hang"
+${H2LOAD} -p h2c -c 1 -t 1 -m 1 -n 10 -d $GEN/data-10k ${URL_PREFIX} |
+while read line; do echo -n "."; done
+echo "ok."
+
+echo -n "POSTing 10 x 100k to server, which are READ by app"
+${H2LOAD} -p h2c -c 1 -t 1 -m 1 -n 100 -d $GEN/data-100k ${URL_PREFIX}/upload.py |
+while read line; do echo -n "."; done
+echo "ok."
+
+# FIXME: this does not work reliably for n >= 100
+#
+#echo -n "POSTing 10 x 100k to server, which are NOTREAD by app"
+#${H2LOAD} -p h2c -c 1 -t 1 -m 1 -n 10 -d $GEN/data-100k ${URL_PREFIX} |
+#while read line; do echo -n "."; done
+#echo "ok."
\ No newline at end of file