mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-12 07:25:36 +00:00
Merge branch 'ssl-opt-regression' into development
This commit is contained in:
commit
d7392c44e9
|
@ -27,6 +27,7 @@ Bugfix
|
||||||
mbedtls_ssl_conf_curves. #373
|
mbedtls_ssl_conf_curves. #373
|
||||||
* Fix issue in ssl_fork_server which was preventing it from functioning. #429
|
* Fix issue in ssl_fork_server which was preventing it from functioning. #429
|
||||||
* Fix memory leaks in test framework
|
* Fix memory leaks in test framework
|
||||||
|
* Fix test in ssl-opt.sh that does not run properly with valgrind
|
||||||
|
|
||||||
Changes
|
Changes
|
||||||
* On ARM platforms, when compiling with -O0 with GCC, Clang or armcc5,
|
* On ARM platforms, when compiling with -O0 with GCC, Clang or armcc5,
|
||||||
|
|
|
@ -130,6 +130,13 @@ not_with_valgrind() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# skip the next test if valgrind is NOT in use
|
||||||
|
only_with_valgrind() {
|
||||||
|
if [ "$MEMCHECK" -eq 0 ]; then
|
||||||
|
SKIP_NEXT="YES"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# multiply the client timeout delay by the given factor for the next test
|
# multiply the client timeout delay by the given factor for the next test
|
||||||
needs_more_time() {
|
needs_more_time() {
|
||||||
CLI_DELAY_FACTOR=$1
|
CLI_DELAY_FACTOR=$1
|
||||||
|
@ -408,32 +415,33 @@ run_test() {
|
||||||
|
|
||||||
# check other assertions
|
# check other assertions
|
||||||
# lines beginning with == are added by valgrind, ignore them
|
# lines beginning with == are added by valgrind, ignore them
|
||||||
|
# lines with 'Serious error when reading debug info', are valgrind issues as well
|
||||||
while [ $# -gt 0 ]
|
while [ $# -gt 0 ]
|
||||||
do
|
do
|
||||||
case $1 in
|
case $1 in
|
||||||
"-s")
|
"-s")
|
||||||
if grep -v '^==' $SRV_OUT | grep "$2" >/dev/null; then :; else
|
if grep -v '^==' $SRV_OUT | grep -v 'Serious error when reading debug info' | grep "$2" >/dev/null; then :; else
|
||||||
fail "-s $2"
|
fail "-s $2"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"-c")
|
"-c")
|
||||||
if grep -v '^==' $CLI_OUT | grep "$2" >/dev/null; then :; else
|
if grep -v '^==' $CLI_OUT | grep -v 'Serious error when reading debug info' | grep "$2" >/dev/null; then :; else
|
||||||
fail "-c $2"
|
fail "-c $2"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"-S")
|
"-S")
|
||||||
if grep -v '^==' $SRV_OUT | grep "$2" >/dev/null; then
|
if grep -v '^==' $SRV_OUT | grep -v 'Serious error when reading debug info' | grep "$2" >/dev/null; then
|
||||||
fail "-S $2"
|
fail "-S $2"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"-C")
|
"-C")
|
||||||
if grep -v '^==' $CLI_OUT | grep "$2" >/dev/null; then
|
if grep -v '^==' $CLI_OUT | grep -v 'Serious error when reading debug info' | grep "$2" >/dev/null; then
|
||||||
fail "-C $2"
|
fail "-C $2"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
@ -3048,13 +3056,22 @@ run_test "DTLS client reconnect from same port: reconnect" \
|
||||||
-S "The operation timed out" \
|
-S "The operation timed out" \
|
||||||
-s "Client initiated reconnection from same port"
|
-s "Client initiated reconnection from same port"
|
||||||
|
|
||||||
run_test "DTLS client reconnect from same port: reconnect, nbio" \
|
not_with_valgrind # server/client too slow to respond in time (next test has higher timeouts)
|
||||||
|
run_test "DTLS client reconnect from same port: reconnect, nbio, no valgrind" \
|
||||||
"$P_SRV dtls=1 exchanges=2 read_timeout=1000 nbio=2" \
|
"$P_SRV dtls=1 exchanges=2 read_timeout=1000 nbio=2" \
|
||||||
"$P_CLI dtls=1 exchanges=2 debug_level=2 hs_timeout=500-1000 reconnect_hard=1" \
|
"$P_CLI dtls=1 exchanges=2 debug_level=2 hs_timeout=500-1000 reconnect_hard=1" \
|
||||||
0 \
|
0 \
|
||||||
-S "The operation timed out" \
|
-S "The operation timed out" \
|
||||||
-s "Client initiated reconnection from same port"
|
-s "Client initiated reconnection from same port"
|
||||||
|
|
||||||
|
only_with_valgrind # Only with valgrind, do previous test but with higher read_timeout and hs_timeout
|
||||||
|
run_test "DTLS client reconnect from same port: reconnect, nbio, valgrind" \
|
||||||
|
"$P_SRV dtls=1 exchanges=2 read_timeout=2000 nbio=2 hs_timeout=1500-6000" \
|
||||||
|
"$P_CLI dtls=1 exchanges=2 debug_level=2 hs_timeout=1500-3000 reconnect_hard=1" \
|
||||||
|
0 \
|
||||||
|
-S "The operation timed out" \
|
||||||
|
-s "Client initiated reconnection from same port"
|
||||||
|
|
||||||
run_test "DTLS client reconnect from same port: no cookies" \
|
run_test "DTLS client reconnect from same port: no cookies" \
|
||||||
"$P_SRV dtls=1 exchanges=2 read_timeout=1000 cookies=0" \
|
"$P_SRV dtls=1 exchanges=2 read_timeout=1000 cookies=0" \
|
||||||
"$P_CLI dtls=1 exchanges=2 debug_level=2 hs_timeout=500-8000 reconnect_hard=1" \
|
"$P_CLI dtls=1 exchanges=2 debug_level=2 hs_timeout=500-8000 reconnect_hard=1" \
|
||||||
|
|
Loading…
Reference in a new issue