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 2016/10/17 16:04:58 UTC
svn commit: r1765323 - in /httpd/test/mod_h2/trunk: Makefile.am test/test.sh
test/test_common.sh test/test_intermediates.sh test/test_proxy.sh
test/test_proxy_x.sh test/test_upload_x.sh
Author: icing
Date: Mon Oct 17 16:04:58 2016
New Revision: 1765323
URL: http://svn.apache.org/viewvc?rev=1765323&view=rev
Log:
extended 100-cont testing
Added:
httpd/test/mod_h2/trunk/test/test_proxy_x.sh
httpd/test/mod_h2/trunk/test/test_upload_x.sh
Modified:
httpd/test/mod_h2/trunk/Makefile.am
httpd/test/mod_h2/trunk/test/test.sh
httpd/test/mod_h2/trunk/test/test_common.sh
httpd/test/mod_h2/trunk/test/test_intermediates.sh
httpd/test/mod_h2/trunk/test/test_proxy.sh
Modified: httpd/test/mod_h2/trunk/Makefile.am
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/Makefile.am?rev=1765323&r1=1765322&r2=1765323&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/Makefile.am (original)
+++ httpd/test/mod_h2/trunk/Makefile.am Mon Oct 17 16:04:58 2016
@@ -133,6 +133,11 @@ test-x: $(MH2FUZZ) $(SERVER_DIR)/.test-s
@mkdir -p $(GEN)/tmp
$(TESTRUN) test/test_x.sh test $(HTTP_PORT) $(HTTPS_PORT) $(HOST_NAME) $(HOST_NAME_2) $(HOST_SER_NAME)
+test-proxy-x: $(MH2FUZZ) $(SERVER_DIR)/.test-setup
+ @rm -rf $(GEN)/tmp
+ @mkdir -p $(GEN)/tmp
+ $(TESTRUN) test/test_proxy_x.sh test $(HTTP_PORT) $(HTTPS_PORT) $(HOST_NAME) $(HOST_NAME_2) $(HOST_SER_NAME)
+
test: test-gets test-proxy fuzz
smoke: fuzz h2load h2tx test-x
Modified: httpd/test/mod_h2/trunk/test/test.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test.sh?rev=1765323&r1=1765322&r2=1765323&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test.sh (original)
+++ httpd/test/mod_h2/trunk/test/test.sh Mon Oct 17 16:04:58 2016
@@ -75,12 +75,15 @@ $SHELL "$TEST_DIR"/test_ssl.sh $
$SHELL "$TEST_DIR"/test_upgrade.sh $HTTP_AUTH $HTTPS_AUTH &&
$SHELL "$TEST_DIR"/test_header.sh $HTTPS_AUTH &&
$SHELL "$TEST_DIR"/test_debug.sh $HTTPS_AUTH &&
-$SHELL "$TEST_DIR"/test_intermediates.sh $HTTPS_AUTH || fail
+$SHELL "$TEST_DIR"/test_intermediates.sh $HTTPS_AUTH &&
+$SHELL "$TEST_DIR"/test_intermediates.sh $HTTPS_AUTH/proxy &&
+$SHELL "$TEST_DIR"/test_intermediates.sh $HTTPS_AUTH/rewrite &&
+$SHELL "$TEST_DIR"/test_intermediates.sh $HTTPS_AUTH_SER || fail
$SHELL "$TEST_DIR"/test_nghttp_get.sh $HTTPS_AUTH &&
$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 ||fail
+$SHELL "$TEST_DIR"/test_curl_post.sh $HTTPS_AUTH ||fail
if test "$TEST_GO" = "yes"; then
# starting go client tests, still hangs with 1.7rc4, see
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=1765323&r1=1765322&r2=1765323&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_common.sh (original)
+++ httpd/test/mod_h2/trunk/test/test_common.sh Mon Oct 17 16:04:58 2016
@@ -518,7 +518,7 @@ EOF
--DSAJKcd9876--
EOF
echo -n " * nghttp /$DOC: $MSG..."
- ${NGHTTP} -v "$@"$ARG_UPGRADE --data=$TMP/updata -H'Content-Type: multipart/form-data; boundary=DSAJKcd9876' $URL_PREFIX/$DOC > $TMP/$DOC || fail "error uploading $fname"
+ ${NGHTTP} -v "$@"$ARG_UPGRADE --expect-continue --data=$TMP/updata -H'Content-Type: multipart/form-data; boundary=DSAJKcd9876' $URL_PREFIX/$DOC > $TMP/$DOC || fail "error uploading $fname"
${NGHTTP} $ARG_UPGRADE $URL_PREFIX/files/"$fname" > $TMP/data.down || fail "error downloding $fname"
diff -u $FILE $TMP/data.down || fail
echo ok.
Modified: httpd/test/mod_h2/trunk/test/test_intermediates.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test_intermediates.sh?rev=1765323&r1=1765322&r2=1765323&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_intermediates.sh (original)
+++ httpd/test/mod_h2/trunk/test/test_intermediates.sh Mon Oct 17 16:04:58 2016
@@ -23,14 +23,14 @@ curl_check_status() {
rm -rf $TMP
mkdir -p $TMP
cat > $TMP/expected
- ${CURL} -D - "$@" ${URL_PREFIX}/${DOC} >$TMP/response || fail "retrieval failed"
+ ${CURL} -D - "$@" --data 'XYZ' ${URL_PREFIX}/${DOC} >$TMP/response || fail "retrieval failed"
fgrep "HTTP/2 " < $TMP/response >$TMP/status
diff -b $TMP/expected $TMP/status || fail
echo ok.
}
if min_httpd_version 2.5.0; then
- echo "test intermediate responses"
+ echo "test 100-continue on $URL_PREFIX"
curl_check_status /index.html "h2 no expect" <<EOF
HTTP/2 200
Modified: httpd/test/mod_h2/trunk/test/test_proxy.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test_proxy.sh?rev=1765323&r1=1765322&r2=1765323&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_proxy.sh (original)
+++ httpd/test/mod_h2/trunk/test/test_proxy.sh Mon Oct 17 16:04:58 2016
@@ -120,6 +120,8 @@ large-upload() {
}
if min_httpd_version 2.4.21; then
+$SHELL "$TEST_DIR"/test_intermediates.sh $HTTPS_AUTH/h2proxy &&
+$SHELL "$TEST_DIR"/test_intermediates.sh $HTTPS_AUTH/h2proxy-rewrite &&
large-upload $HTTPS_AUTH/h2cproxy &&
large-upload $HTTPS_AUTH/h2proxy &&
$SHELL "$TEST_DIR"/test_nghttp_get.sh $HTTPS_AUTH/h2cproxy-rewrite &&
Added: httpd/test/mod_h2/trunk/test/test_proxy_x.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test_proxy_x.sh?rev=1765323&view=auto
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_proxy_x.sh (added)
+++ httpd/test/mod_h2/trunk/test/test_proxy_x.sh Mon Oct 17 16:04:58 2016
@@ -0,0 +1,45 @@
+#!/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.
+#
+
+################################################################################
+# check announcements of upgrade: possibilities
+################################################################################
+
+
+export TEST_DIR="$1"; shift
+HTTP_PORT="$1"; shift
+HTTPS_PORT="$1"; shift
+HOST_NAME="$1"; shift
+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
+
+export CURL="$CURL"
+
+fail() {
+ echo "$@"
+ exit 1
+}
+
+$SHELL "$TEST_DIR"/test_upload_x.sh $HTTPS_AUTH/h2proxy &&
+$SHELL "$TEST_DIR"/test_upload_x.sh $HTTPS_AUTH/proxy &&
+$SHELL "$TEST_DIR"/test_upload_x.sh $HTTPS_AUTH ||
+fail
Added: httpd/test/mod_h2/trunk/test/test_upload_x.sh
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/test/test_upload_x.sh?rev=1765323&view=auto
==============================================================================
--- httpd/test/mod_h2/trunk/test/test_upload_x.sh (added)
+++ httpd/test/mod_h2/trunk/test/test_upload_x.sh Mon Oct 17 16:04:58 2016
@@ -0,0 +1,60 @@
+#!/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 "nghttp POST on: $@"
+
+
+CHR98="0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456
+"
+CHR97="012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345
+"
+CHR96="01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234
+"
+
+rm -f $GEN/data-*
+
+i=0; while [ $i -lt 10 ]; do
+ echo -n "$( printf '%01d' $i) $CHR98"
+ i=$[ i + 1 ]
+done > $GEN/data-1k
+
+i=0; while [ $i -lt 100 ]; do
+ echo -n "$( printf '%02d' $i) $CHR97"
+ i=$[ i + 1 ]
+done > $GEN/data-10k
+
+i=0; while [ $i -lt 1000 ]; do
+ echo -n "$( printf '%03d' $i) $CHR96"
+ i=$[ i + 1 ]
+done > $GEN/data-100k
+
+iterations=100
+
+# Tests without content-length announced
+i=0;
+while test $i -lt $iterations; do
+ nghttp_post_file upload.py $GEN/data-100k "$i. 100k upload w/o c-len" --no-content-length
+ i=$[ i + 1 ]
+done
+
+# Tests with content-length announced
+i=0;
+while test $i -lt $iterations; do
+ nghttp_post_file upload.py $GEN/data-100k "$i. 100k upload"
+ i=$[ i + 1 ]
+done
+