Refactor run_endpoint.h
@@ -35,18 +35,20 @@ if [ "$ROLE" == "client" ]; then
else
CLIENT_ARGS="$CLIENT_ARGS -v 0x1"
fi
- if [ "$TESTCASE" == "chacha20" ]; then
+ case "$TESTCASE" in
+ "chacha20")
CLIENT_ARGS="$CLIENT_ARGS --ciphers=TLS_CHACHA20_POLY1305_SHA256"
- fi
- if [ "$TESTCASE" == "keyupdate" ]; then
+ ;;
+ "keyupdate")
CLIENT_ARGS="$CLIENT_ARGS --delay-stream 10ms --key-update 1ms"
- fi
- if [ "$TESTCASE" == "v2" ]; then
+ ;;
+ "v2")
CLIENT_ARGS="$CLIENT_ARGS --available-versions v2,v1"
- fi
- if [ "$TESTCASE" == "ecn" ]; then
+ ;;
+ "ecn")
CLIENT_ARGS="$CLIENT_ARGS --no-pmtud"
- fi
+ ;;
+ esac
if [ "$TESTCASE" == "resumption" ] || [ "$TESTCASE" == "zerortt" ]; then
CLIENT_ARGS="$CLIENT_ARGS --session-file session.txt --tp-file tp.txt"
if [ "$TESTCASE" == "resumption" ]; then
@@ -72,15 +74,20 @@ elif [ "$ROLE" == "server" ]; then
SERVER_BIN="/usr/local/bin/h09server"
fi
SERVER_ARGS="/certs/priv.key /certs/cert.pem -s -d /www --qlog-dir $QLOGDIR --cc bbr2"
- if [ "$TESTCASE" == "retry" ]; then
+ case "$TESTCASE" in
+ "retry")
SERVER_ARGS="$SERVER_ARGS -V"
- elif [ "$TESTCASE" == "multiconnect" ]; then
+ ;;
+ "multiconnect")
SERVER_ARGS="$SERVER_ARGS --timeout=180s --handshake-timeout=180s"
- elif [ "$TESTCASE" == "v2" ]; then
+ ;;
+ "v2")
SERVER_ARGS="$SERVER_ARGS --preferred-versions v2"
- elif [ "$TESTCASE" == "ecn" ]; then
+ ;;
+ "ecn")
SERVER_ARGS="$SERVER_ARGS --no-pmtud"
- fi
+ ;;
+ esac
$SERVER_BIN '*' 443 $SERVER_ARGS $SERVER_PARAMS &> $LOG
fi
