From 1fcb1a18c8f176db41ca817047f89c609921cf6d 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 4c8d3566d..b190fba2c 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -487,6 +487,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