Skip to content
Snippets Groups Projects
Commit ae688609 authored by Andy Green's avatar Andy Green
Browse files

qa: add 6 x h2load tests

parent 82adc07c
No related branches found
No related tags found
No related merge requests found
...@@ -30,7 +30,7 @@ install: ...@@ -30,7 +30,7 @@ install:
# - Rscript -e 'covr::coveralls()' # - Rscript -e 'covr::coveralls()'
script: script:
- if [ "$COVERITY_SCAN_BRANCH" != 1 -a "$TRAVIS_OS_NAME" = "osx" ]; then mkdir build && cd build && cmake -DOPENSSL_ROOT_DIR="/usr/local/opt/openssl" $CMAKE_ARGS .. && cmake --build .; else if [ "$COVERITY_SCAN_BRANCH" != 1 -a "$TRAVIS_OS_NAME" = "linux" ]; then mkdir build && cd build && if [ "$LWS_METHOD" = "lwsws" ] ; then cmake -DLWS_OPENSSL_LIBRARIES="/usr/local/lib/libssl.so;/usr/local/lib/libcrypto.so" -DLWS_OPENSSL_INCLUDE_DIRS="/usr/local/include/openssl" $CMAKE_ARGS .. && cmake --build . && sudo make install && ../minimal-examples/selftests.sh && ../scripts/h2spec.sh && ../test-apps/attack.sh && ../scripts/autobahn-test.sh ; else cmake $CMAKE_ARGS .. && cmake --build . ; fi ; fi ; fi - if [ "$COVERITY_SCAN_BRANCH" != 1 -a "$TRAVIS_OS_NAME" = "osx" ]; then mkdir build && cd build && cmake -DOPENSSL_ROOT_DIR="/usr/local/opt/openssl" $CMAKE_ARGS .. && cmake --build .; else if [ "$COVERITY_SCAN_BRANCH" != 1 -a "$TRAVIS_OS_NAME" = "linux" ]; then mkdir build && cd build && if [ "$LWS_METHOD" = "lwsws" ] ; then cmake -DLWS_OPENSSL_LIBRARIES="/usr/local/lib/libssl.so;/usr/local/lib/libcrypto.so" -DLWS_OPENSSL_INCLUDE_DIRS="/usr/local/include/openssl" $CMAKE_ARGS .. && cmake --build . && sudo make install && ../minimal-examples/selftests.sh && ../scripts/h2spec.sh && ../test-apps/attack.sh && ../scripts/h2load.sh && ../scripts/autobahn-test.sh ; else cmake $CMAKE_ARGS .. && cmake --build . ; fi ; fi ; fi
sudo: required sudo: required
dist: trusty dist: trusty
addons: addons:
......
...@@ -1837,7 +1837,7 @@ if (LWS_WITH_GENERIC_SESSIONS AND LWS_ROLE_WS) ...@@ -1837,7 +1837,7 @@ if (LWS_WITH_GENERIC_SESSIONS AND LWS_ROLE_WS)
target_link_libraries(protocol_lws_messageboard sqlite3 ) target_link_libraries(protocol_lws_messageboard sqlite3 )
endif(WIN32) endif(WIN32)
endif(LWS_WITH_GENERIC_SESSIONS) endif(LWS_WITH_GENERIC_SESSIONS AND LWS_ROLE_WS)
endif(LWS_WITH_PLUGINS AND LWS_WITH_SHARED) endif(LWS_WITH_PLUGINS AND LWS_WITH_SHARED)
......
...@@ -21,6 +21,7 @@ attack.sh|225|Correctness, robustness and security tests for http parser ...@@ -21,6 +21,7 @@ attack.sh|225|Correctness, robustness and security tests for http parser
Autobahn Server|480|Testing lws ws client, including permessage-deflate Autobahn Server|480|Testing lws ws client, including permessage-deflate
Autobahn Client|480|Testing lws ws server, including permaessage-deflate Autobahn Client|480|Testing lws ws server, including permaessage-deflate
h2spec|146|Http/2 server compliance suite (in strict mode) h2spec|146|Http/2 server compliance suite (in strict mode)
h2load|6|Http/2 server load tool (checks 10K / 100K in h1 and h2, at 1, 10, 100 concurrency)
The over 1,400 tests run on every commit take most of an hour to complete. The over 1,400 tests run on every commit take most of an hour to complete.
If any problems are found, it breaks the travis build, generating an email. If any problems are found, it breaks the travis build, generating an email.
......
...@@ -8,6 +8,11 @@ ...@@ -8,6 +8,11 @@
# #
# build $ ../minimal-examples/selftests.sh # build $ ../minimal-examples/selftests.sh
echo
echo "----------------------------------------------"
echo "------- tests: lws minimal example selftests"
echo
LOGGING_PATH=/tmp/logs LOGGING_PATH=/tmp/logs
......
...@@ -8,6 +8,11 @@ ...@@ -8,6 +8,11 @@
# It will use the minimal echo client and server to run # It will use the minimal echo client and server to run
# autobahn ws tests as both client and server. # autobahn ws tests as both client and server.
echo
echo "----------------------------------------------"
echo "------- tests: autobahn as client"
echo
set -u set -u
PARALLEL=8 PARALLEL=8
...@@ -138,6 +143,11 @@ fi ...@@ -138,6 +143,11 @@ fi
# 2) lws-as-server tests # 2) lws-as-server tests
echo
echo "----------------------------------------------"
echo "------- tests: autobahn as server"
echo
$SERV -p 9001 -d7 & $SERV -p 9001 -d7 &
wstest -m fuzzingclient wstest -m fuzzingclient
R=$? R=$?
......
#!/bin/bash
#
# run from the build dir
echo
echo "----------------------------------------------"
echo "------- tests: h2load"
echo
PW=`pwd`
cd ../minimal-examples/http-server/minimal-http-server-tls
$PW/bin/lws-minimal-http-server-tls &
R=$!
sleep 0.5s
# check h1 with various loads
h2load -n 10000 -c 1 --h1 https://127.0.0.1:7681
if [ $? -ne 0 ] ; then
Q=$?
kill $R
wait $R
exit $Q
fi
h2load -n 10000 -c 10 --h1 https://127.0.0.1:7681
if [ $? -ne 0 ] ; then
Q=$?
kill $R
wait $R
exit $Q
fi
h2load -n 100000 -c 100 --h1 https://127.0.0.1:7681
if [ $? -ne 0 ] ; then
Q=$?
kill $R
wait $R
exit $Q
fi
# check h2 with various loads
h2load -n 10000 -c 1 https://127.0.0.1:7681
if [ $? -ne 0 ] ; then
Q=$?
kill $R
wait $R
exit $Q
fi
h2load -n 10000 -c 10 https://127.0.0.1:7681
if [ $? -ne 0 ] ; then
Q=$?
kill $R
wait $R
exit $Q
fi
h2load -n 100000 -c 100 https://127.0.0.1:7681
Q=$?
kill $R
wait $R
exit $Q
#!/bin/bash #!/bin/bash
#
# run from the build subdir # run from the build subdir
#
echo
echo "----------------------------------------------"
echo "------- tests: h2spec"
echo
if [ ! -e h2spec ] ; then if [ ! -e h2spec ] ; then
wget https://github.com/summerwind/h2spec/releases/download/v2.1.0/h2spec_linux_amd64.tar.gz &&\ wget https://github.com/summerwind/h2spec/releases/download/v2.1.0/h2spec_linux_amd64.tar.gz &&\
......
...@@ -8,7 +8,7 @@ then ...@@ -8,7 +8,7 @@ then
if [ "$LWS_METHOD" == "lwsws" ]; if [ "$LWS_METHOD" == "lwsws" ];
then then
sudo apt-get install -y -qq realpath; sudo apt-get install -y -qq realpath libjemalloc1 libev4
sudo apt-get remove python-six sudo apt-get remove python-six
sudo pip install six>=1.9 sudo pip install six>=1.9
sudo pip install Twisted==16.0.0 sudo pip install Twisted==16.0.0
......
...@@ -4,6 +4,11 @@ ...@@ -4,6 +4,11 @@
# #
# Requires the library to have been built with cmake .. -DCMAKE_BUILD_TYPE=DEBUG # Requires the library to have been built with cmake .. -DCMAKE_BUILD_TYPE=DEBUG
echo
echo "----------------------------------------------"
echo "------- tests: lws attack.sh"
echo
SERVER=127.0.0.1 SERVER=127.0.0.1
PORT=7681 PORT=7681
LOG=/tmp/lwslog LOG=/tmp/lwslog
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment