From f45578648a8b3e429fc4fff877f62dab28bac5b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 8 Jun 2020 11:40:06 +0200 Subject: [PATCH] ssl-opt.sh: add proxy to all DTLS tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A lot of DTLS test are timing-sensitive, especially those that contain assertions about retransmission. Sometimes some DTLS test fails intermittently on the CI with no clear apparent reason; we need more information in the log to understand the cause of those failures. Adding a proxy means we'll get timing information from the proxy logs. An alternative would be to add timing information to the debug output of ssl_server2 and ssl_client2. But that's more complex because getting sub-second timing info is outside the scope of the C standard, and our current timing module only provides a APi for sub-second intervals, not absolute time. Using the proxy is easier as it's a single point that sees all messages, so elapsed time is fine here, and it's already implemented in the proxy output. Signed-off-by: Manuel Pégourié-Gonnard --- tests/ssl-opt.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index df3f53b3b..f5ac5ac20 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -675,6 +675,12 @@ run_test() { # update DTLS variable detect_dtls "$SRV_CMD" + # if the test uses DTLS but no custom proxy, add a simple proxy + # as it provides timing info that's useful to debug failures + if [ "X$PXY_CMD" = "X" -a "$DTLS" -eq 1 ]; then + PXY_CMD="$P_PXY" + fi + # prepend valgrind to our commands if active if [ "$MEMCHECK" -gt 0 ]; then if is_polar "$SRV_CMD"; then