mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 23:27:04 +02:00
REGTESTS: Explicitly allow failing shell commands in some scripts
Vtest2, that should replaced Vtest in few months, will reject any failing commands in shell blocks. However, some scripts are executing some commands, expecting an error to be able to parse the error output. So, now use "set +e" in those scripts to explicitly state failing commads are expected. It is just used for non-final commands. At the end, the shell block must still report a success.
This commit is contained in:
parent
82c2911248
commit
2808e3577f
@ -49,6 +49,7 @@ client c1 -connect ${h1_frt_sock} -repeat 100 {
|
|||||||
syslog Slog -wait
|
syslog Slog -wait
|
||||||
|
|
||||||
shell {
|
shell {
|
||||||
|
set +e
|
||||||
ss -pt | grep CLOSE-WAIT.*haproxy.*pid=${h1_pid}
|
ss -pt | grep CLOSE-WAIT.*haproxy.*pid=${h1_pid}
|
||||||
exit $((!$?))
|
exit $((!$?))
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,7 @@ listen ssl-lst
|
|||||||
server s1 127.0.0.1:80
|
server s1 127.0.0.1:80
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
set +e
|
||||||
haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
|
haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
|
||||||
haproxy_ret=$?
|
haproxy_ret=$?
|
||||||
echo "==== test 1"
|
echo "==== test 1"
|
||||||
@ -77,6 +78,7 @@ listen ssl-lst
|
|||||||
server s1 127.0.0.1:80
|
server s1 127.0.0.1:80
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
set +e
|
||||||
haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
|
haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
|
||||||
haproxy_ret=$?
|
haproxy_ret=$?
|
||||||
echo "==== test 2"
|
echo "==== test 2"
|
||||||
@ -107,6 +109,7 @@ listen ssl-lst
|
|||||||
server s1 127.0.0.1:80
|
server s1 127.0.0.1:80
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
set +e
|
||||||
haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
|
haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
|
||||||
haproxy_ret=$?
|
haproxy_ret=$?
|
||||||
echo "==== test 3"
|
echo "==== test 3"
|
||||||
@ -138,6 +141,7 @@ listen ssl-lst
|
|||||||
server s1 127.0.0.1:80
|
server s1 127.0.0.1:80
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
set +e
|
||||||
haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
|
haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
|
||||||
haproxy_ret=$?
|
haproxy_ret=$?
|
||||||
echo "==== test 4"
|
echo "==== test 4"
|
||||||
@ -169,6 +173,7 @@ listen ssl-lst
|
|||||||
server s1 127.0.0.1:80
|
server s1 127.0.0.1:80
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
set +e
|
||||||
haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
|
haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
|
||||||
haproxy_ret=$?
|
haproxy_ret=$?
|
||||||
echo "==== test 5"
|
echo "==== test 5"
|
||||||
@ -200,6 +205,7 @@ listen ssl-lst
|
|||||||
server s1 127.0.0.1:80
|
server s1 127.0.0.1:80
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
set +e
|
||||||
haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
|
haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
|
||||||
haproxy_ret=$?
|
haproxy_ret=$?
|
||||||
echo "==== test 6"
|
echo "==== test 6"
|
||||||
@ -232,6 +238,7 @@ listen ssl-lst
|
|||||||
server s1 127.0.0.1:80
|
server s1 127.0.0.1:80
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
set +e
|
||||||
haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
|
haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
|
||||||
haproxy_ret=$?
|
haproxy_ret=$?
|
||||||
echo "==== test 7"
|
echo "==== test 7"
|
||||||
@ -263,6 +270,7 @@ listen ssl-lst
|
|||||||
server s1 127.0.0.1:80
|
server s1 127.0.0.1:80
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
set +e
|
||||||
haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
|
haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
|
||||||
haproxy_ret=$?
|
haproxy_ret=$?
|
||||||
echo "==== test 8"
|
echo "==== test 8"
|
||||||
@ -295,6 +303,7 @@ listen ssl-lst
|
|||||||
server s1 127.0.0.1:80
|
server s1 127.0.0.1:80
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
set +e
|
||||||
haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
|
haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
|
||||||
haproxy_ret=$?
|
haproxy_ret=$?
|
||||||
echo "==== test 9"
|
echo "==== test 9"
|
||||||
@ -327,6 +336,7 @@ listen ssl-lst
|
|||||||
server s1 127.0.0.1:80
|
server s1 127.0.0.1:80
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
set +e
|
||||||
haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
|
haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
|
||||||
haproxy_ret=$?
|
haproxy_ret=$?
|
||||||
echo "==== test 10"
|
echo "==== test 10"
|
||||||
@ -359,6 +369,7 @@ listen ssl-lst
|
|||||||
server s1 127.0.0.1:80
|
server s1 127.0.0.1:80
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
set +e
|
||||||
haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
|
haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
|
||||||
haproxy_ret=$?
|
haproxy_ret=$?
|
||||||
echo "==== test 11"
|
echo "==== test 11"
|
||||||
@ -391,6 +402,7 @@ listen ssl-lst
|
|||||||
server s1 127.0.0.1:80
|
server s1 127.0.0.1:80
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
set +e
|
||||||
haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
|
haproxy_output="$($HAPROXY_PROGRAM -f ${tmpdir}/ocsp_compat_check.cfg -c 2>&1)"
|
||||||
haproxy_ret=$?
|
haproxy_ret=$?
|
||||||
echo "==== test 12"
|
echo "==== test 12"
|
||||||
|
Loading…
Reference in New Issue
Block a user