The legacy HTTP subsystem has been removed. HTX is always enabled.
You must set HAPROXY_PROGRAM environment variable to give the location
of the HAProxy program to test to vtest:
- $ HAPROXY_PROGRAM=<my haproxy program> vtest [-Dno-htx=] ...
+ $ HAPROXY_PROGRAM=<my haproxy program> vtest ...
The HAProxy VTC files found in HAProxy sources may be run with the reg-tests
Makefile target. You must set the VTEST_PROGRAM environment variable to
haproxy h1 -conf {
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
haproxy h1 -conf {
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
haproxy h1 -conf {
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
defaults
mode http
log global
- ${no-htx} option http-use-htx
option httplog
frontend main-https
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
listen fe_http
bind "fd@${fe_http}"
mode http
- ${no-htx} option http-use-htx
dispatch ${s2_addr}:${s2_port}
} -start
defaults
mode http
- ${no-htx} option http-use-htx
timeout client 1s
timeout server 1s
timeout connect 1s
haproxy h1 -conf {
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
haproxy h -conf {
defaults
mode http
- ${no-htx} option http-use-htx
timeout client 1s
timeout server 1s
timeout connect 1s
defaults
mode http
- ${no-htx} option http-use-htx
option httplog
timeout client 1s
timeout server 1s
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
#log stdout format raw daemon
mode http
option http-buffer-request
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
defaults
mode http
- ${no-htx} option http-use-htx
option abortonclose
retries 3
timeout client 10s
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
haproxy h1 -conf {
defaults
mode http
- ${no-htx} option http-use-htx
timeout client 100ms
timeout server 1s
timeout connect 1s
haproxy h1 -conf {
defaults
mode http
- ${no-htx} option http-use-htx
timeout client 1s
timeout server 1s
timeout connect 1s
haproxy hap -conf {
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
haproxy hap_srv -conf {
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
haproxy hap_srv_bad_key -conf {
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
haproxy hap -conf {
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
haproxy h1 -W -S -conf {
defaults
mode http
- ${no-htx} option http-use-htx
log global
option httplog
timeout connect 1s
haproxy h1 -conf {
defaults
mode http
- ${no-htx} option http-use-htx
log global
option httplog
timeout connect 1s
haproxy h2 -conf {
defaults
mode http
- ${no-htx} option http-use-htx
log global
option httplog
timeout connect 1s
haproxy h1 -conf {
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
haproxy h1 -conf {
defaults
mode http
- ${no-htx} option http-use-htx
log global
option httplog
timeout connect 1s
defaults
mode http
- ${no-htx} option http-use-htx
log global
option httplog
timeout connect 1s
frontend f1
mode http
- ${no-htx} option http-use-htx
bind "fd@${f1}"
log ${Slog_addr}:${Slog_port} daemon
log-format Ta=%Ta\ Tc=%Tc\ Td=%Td\ Th=%Th\ Ti=%Ti\ Tq=%Tq\ TR=%TR\ Tr=%Tr\ Tt=%Tt\ Tw=%Tw
backend b1
mode http
- ${no-htx} option http-use-htx
http-request use-service lua.foo.http
frontend f2
log ${Slog_addr}:${Slog_port} local0 debug err
log-format Ta=%Ta\ Tc=%Tc\ Td=%Td\ Th=%Th\ Ti=%Ti\ Tq=%Tq\ TR=%TR\ Tr=%Tr\ Tt=%Tt\ Tw=%Tw
mode http
- ${no-htx} option http-use-htx
bind "fd@${frt}"
http-request use-service lua.donothing
} -start
frontend fe1
mode http
- ${no-htx} option http-use-htx
bind "fd@${fe1}"
default_backend b1
backend b1
mode http
- ${no-htx} option http-use-htx
http-request use-service lua.fakeserv
} -start
frontend fe1
mode http
- ${no-htx} option http-use-htx
bind "fd@${fe1}"
default_backend b1
backend b1
mode http
- ${no-htx} option http-use-htx
http-request use-service lua.fakeserv
} -start
frontend fe1
mode http
- ${no-htx} option http-use-htx
bind "fd@${fe1}"
http-request use-service lua.set_var
frontend fe2
mode http
- ${no-htx} option http-use-htx
bind "fd@${fe2}"
http-request set-header Dummy %[var(txn.fe2_foo)]
frontend fe1
mode http
- ${no-htx} option http-use-htx
bind "fd@${fe1}"
default_backend b1
frontend fe2
mode http
- ${no-htx} option http-use-htx
bind ":8443" ssl crt ${testdir}/common.pem
stats enable
stats uri /
backend b1
mode http
- ${no-htx} option http-use-htx
http-request use-service lua.fakeserv
} -start
frontend fe1
mode http
- ${no-htx} option http-use-htx
bind "fd@${fe1}"
default_backend b1
frontend fe2
mode http
- ${no-htx} option http-use-htx
bind ":8443" ssl crt ${testdir}/common.pem
stats enable
stats uri /
backend b1
mode http
- ${no-htx} option http-use-htx
http-request use-service lua.fakeserv
} -start
frontend fe1
mode http
- ${no-htx} option http-use-htx
bind "fd@${fe1}"
default_backend b1
backend b1
mode http
- ${no-htx} option http-use-htx
server s1 ${s1_addr}:${s1_port}
} -start
nbproc 4
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
nbproc 1
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
defaults
mode http
- ${no-htx} option http-use-htx
log global
option httplog
timeout connect 1s
haproxy h1 -conf {
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
haproxy h1 -conf {
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
haproxy h1 -conf {
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 1s
timeout client 1s
timeout server 1s
defaults
mode http
option httplog
- ${no-htx} option http-use-htx
log stderr local0 debug err
option logasap
timeout connect 1s
listen ssl-lst
mode http
- ${no-htx} option http-use-htx
bind "${tmpdir}/ssl.sock" ssl strict-sni crt-list ${testdir}/localhost.crt-list
server s1 ${s1_addr}:${s1_port}
defaults
mode http
option httplog
- ${no-htx} option http-use-htx
log stderr local0 debug err
option logasap
timeout connect 100ms
listen first-ssl-fe
mode http
- ${no-htx} option http-use-htx
bind "${tmpdir}/first-ssl.sock" ssl strict-sni crt-list ${testdir}/simple.crt-list
server s1 ${s1_addr}:${s1_port}
listen second-ssl-fe
mode http
- ${no-htx} option http-use-htx
bind "${tmpdir}/second-ssl.sock" ssl crt-list ${testdir}/localhost.crt-list
server s1 ${s1_addr}:${s1_port}
} -start
defaults
mode http
option httplog
- ${no-htx} option http-use-htx
log stderr local0 debug err
option logasap
timeout connect 100ms
defaults
mode http
option httplog
- ${no-htx} option http-use-htx
log stderr local0 debug err
option logasap
timeout connect 100ms
defaults
mode http
option httplog
- ${no-htx} option http-use-htx
log stderr local0 debug err
option logasap
timeout connect 100ms
defaults
mode http
option httplog
- ${no-htx} option http-use-htx
log stderr local0 debug err
option logasap
timeout connect 100ms
defaults
mode http
option httplog
- ${no-htx} option http-use-htx
log stderr local0 debug err
option logasap
timeout connect 100ms
defaults
mode http
option httplog
- ${no-htx} option http-use-htx
log stderr local0 debug err
option logasap
timeout connect 100ms
defaults
mode http
option httplog
- ${no-htx} option http-use-htx
log stderr local0 debug err
option logasap
timeout connect 100ms
defaults
mode http
option httplog
- ${no-htx} option http-use-htx
log stderr local0 debug err
option logasap
timeout connect 100ms
defaults
mode http
option httplog
- ${no-htx} option http-use-htx
log stderr local0 debug err
option logasap
timeout connect 1s
defaults
mode http
option httplog
- ${no-htx} option http-use-htx
log stderr local0 debug err
option logasap
timeout connect 1s
listen ssl-lst
mode http
- ${no-htx} option http-use-htx
http-response add-header x-ssl-der %[ssl_c_der,hex]
http-response add-header x-ssl-chain-der %[ssl_c_chain_der,hex]
listen ssl-lst
mode http
- ${no-htx} option http-use-htx
bind "${tmpdir}/ssl.sock" ssl strict-sni ssl-min-ver TLSv1.2 ssl-max-ver TLSv1.2 ciphers "kRSA:aECDSA" crt-list ${testdir}/filters.crt-list
server s1 ${s1_addr}:${s1_port}
defaults
mode http
option httplog
- ${no-htx} option http-use-htx
log stderr local0 debug err
option logasap
timeout connect 1s
listen ssl-lst
mode http
- ${no-htx} option http-use-htx
http-response add-header x-ssl-der %[ssl_f_der,hex]
http-response add-header x-ssl-sha1 %[ssl_f_sha1,hex]
defaults
mode http
option httplog
- ${no-htx} option http-use-htx
log stderr local0 debug err
option logasap
timeout connect 1s
listen ssl-lst
mode http
- ${no-htx} option http-use-htx
bind "${tmpdir}/ssl.sock" ssl strict-sni crt-list ${testdir}/localhost.crt-list
listen ssl-lst
mode http
- ${no-htx} option http-use-htx
bind "${tmpdir}/ssl.sock" ssl strict-sni crt-list ${testdir}/simple.crt-list
server s1 ${s1_addr}:${s1_port}
listen frt
mode http
- ${no-htx} option http-use-htx
bind "fd@${frt}" ssl crt ${testdir}/common.pem
http-request redirect location /
} -start
# Configuration file of 'h1' haproxy instance.
defaults
mode http
- ${no-htx} option http-use-htx
timeout connect 5s
timeout server 30s
timeout client 30s
timeout server 5s
listen li
- ${no-htx} option http-use-htx
bind "fd@${fe1}"
http-request track-sc0 src table conn_rate_table
http-request deny if { src_conn_rate(conn_rate_table) gt 3 }
frontend test
mode http
- ${no-htx} option http-use-htx
bind "fd@${fe1}"
stick-table type ip size 1m expire 1h store gpc0
http-request deny if { src,table_trackers(test) eq 1 }
haproxy h1 -arg "-L A" -conf {
defaults
mode http
- ${no-htx} option http-use-htx
timeout server 1s
timeout connect 1s
timeout client 1s
haproxy h2 -arg "-L B" -conf {
defaults
mode http
- ${no-htx} option http-use-htx
timeout server 1s
timeout connect 1s
timeout client 1s
haproxy h1 -arg "-L A" -conf {
defaults
mode http
- ${no-htx} option http-use-htx
timeout server 1s
timeout connect 1s
timeout client 1s
haproxy h2 -arg "-L B" -conf {
defaults
mode http
- ${no-htx} option http-use-htx
timeout server 1s
timeout connect 1s
timeout client 1s
defaults
mode http
- ${no-htx} option http-use-htx
frontend fe1
bind "fd@${fe1}"
--clean to cleanup previous reg-tests log directories and exit
run-regtests.sh --clean
- --use-htx to use the HTX in tests (deprecated, the default mode now)
-
- --no-htx to use the legacy HTTP in tests
- run-regtests.sh --no-htx, sets the macro \${no-htx}
- In .vtc files, in HAProxy configuration, you should use the following line
- to "templatize" your tests:
-
- \${no-htx} option http-use-htx
-
Including text below into a .vtc file will check for its requirements
related to haproxy's target and compilation options
# Below targets are not capable of completing this test successfully
REGTESTS_TYPES="$2"
shift
;;
- --use-htx)
- no_htx=""
- ;;
- --no-htx)
- no_htx="no "
- ;;
--clean)
_cleanup
exit 0
verbose="-q"
debug=""
keep_logs="-l"
-no_htx=""
testlist=""
_process "$@";
echo "Services : $SERVICES"
echo "########################## Gathering tests to run ##########################"
-# if htx is enable, but HAProxy version is lower to 1.9, disable it
-if [ $(_version "$HAPROXY_VERSION") -lt $(_version "1.9") ]; then
- no_htx="#"
-fi
if [ -z "$REGTESTS" ]; then
_findtests reg-tests/
if [ -n "$jobcount" ]; then
jobcount="-j $jobcount"
fi
- cmd="$VTEST_PROGRAM -b $((2<<20)) -k -t 10 -Dno-htx=${no_htx} $keep_logs $verbose $debug $jobcount $vtestparams $testlist"
+ cmd="$VTEST_PROGRAM -b $((2<<20)) -k -t 10 $keep_logs $verbose $debug $jobcount $vtestparams $testlist"
eval $cmd
_vtresult=$?
else