From: William Lallemand Date: Tue, 7 May 2024 12:06:45 +0000 (+0200) Subject: REGTESTS: ssl: be more verbose with ocsp_compat_check.vtc X-Git-Tag: v3.0-dev12~50 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8c6f43d3827b5501982f313691d10632742474ff;p=thirdparty%2Fhaproxy.git REGTESTS: ssl: be more verbose with ocsp_compat_check.vtc the ocsp_compat_check.vtc reg-test is difficult to debug given than the haproxy output is piped in `grep -q`. This patch helps by showing the haproxy output as well as the return code. --- diff --git a/reg-tests/ssl/ocsp_compat_check.vtc b/reg-tests/ssl/ocsp_compat_check.vtc index f54c3ada40..088dbf3d50 100644 --- a/reg-tests/ssl/ocsp_compat_check.vtc +++ b/reg-tests/ssl/ocsp_compat_check.vtc @@ -49,7 +49,9 @@ EOF haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)" haproxy_ret=$? - + echo "==== test 1" + echo "$haproxy_output" + echo "HAProxy return code: $haproxy_ret" ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate" } @@ -77,7 +79,9 @@ EOF haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)" haproxy_ret=$? - + echo "==== test 2" + echo "$haproxy_output" + echo "HAProxy return code: $haproxy_ret" ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate" } @@ -105,7 +109,9 @@ EOF haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)" haproxy_ret=$? - + echo "==== test 3" + echo "$haproxy_output" + echo "HAProxy return code: $haproxy_ret" ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate" } @@ -134,7 +140,9 @@ EOF haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)" haproxy_ret=$? - + echo "==== test 4" + echo "$haproxy_output" + echo "HAProxy return code: $haproxy_ret" ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate" } @@ -163,7 +171,9 @@ EOF haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)" haproxy_ret=$? - + echo "==== test 5" + echo "$haproxy_output" + echo "HAProxy return code: $haproxy_ret" ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate" } @@ -192,7 +202,9 @@ EOF haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)" haproxy_ret=$? - + echo "==== test 6" + echo "$haproxy_output" + echo "HAProxy return code: $haproxy_ret" ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate" } @@ -222,7 +234,9 @@ EOF haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)" haproxy_ret=$? - + echo "==== test 7" + echo "$haproxy_output" + echo "HAProxy return code: $haproxy_ret" ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate" } @@ -252,7 +266,9 @@ EOF haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)" haproxy_ret=$? - + echo "==== test 8" + echo "$haproxy_output" + echo "HAProxy return code: $haproxy_ret" ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate" } @@ -282,7 +298,9 @@ EOF haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)" haproxy_ret=$? - + echo "==== test 9" + echo "$haproxy_output" + echo "HAProxy return code: $haproxy_ret" ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate" } @@ -312,7 +330,9 @@ EOF haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)" haproxy_ret=$? - + echo "==== test 10" + echo "$haproxy_output" + echo "HAProxy return code: $haproxy_ret" ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate" } @@ -342,7 +362,9 @@ EOF haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)" haproxy_ret=$? - + echo "==== test 11" + echo "$haproxy_output" + echo "HAProxy return code: $haproxy_ret" ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate" } @@ -372,7 +394,9 @@ EOF haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)" haproxy_ret=$? - + echo "==== test 12" + echo "$haproxy_output" + echo "HAProxy return code: $haproxy_ret" ! [ $haproxy_ret -eq 0 ] && echo "$haproxy_output" | grep -q "Incompatibilities found in OCSP update mode for certificate" }