mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 05:41:26 +02:00
Add a fourth character to the second column of the "typed output format" to indicate whether the value results from a volatile or persistent metric ('V' or 'P' characters respectively). A persistent metric means the value could possibily be preserved across reloads by leveraging a shared memory between multiple co-processes. Such metrics are identified as "shared" in the code (since they are possibly shared between multiple co-processes) Some reg-tests were updated to take that change into account, also, some outputs in the configuration manual were updated to reflect current behavior.
82 lines
2.3 KiB
Plaintext
82 lines
2.3 KiB
Plaintext
# This reg-test checks splicing support for the H1 multiplexer
|
|
|
|
varnishtest "A test to validate h1 splicing support"
|
|
|
|
feature cmd "$HAPROXY_PROGRAM -cc 'version_atleast(2.6-dev0)'"
|
|
feature cmd "$HAPROXY_PROGRAM -cc 'feature(LINUX_SPLICE)'"
|
|
feature cmd "$HAPROXY_PROGRAM $HAPROXY_ARGS -cc 'enabled(FAST-FORWARD)'"
|
|
feature cmd "$HAPROXY_PROGRAM $HAPROXY_ARGS -cc 'enabled(SPLICE)'"
|
|
feature ignore_unknown_macro
|
|
|
|
#REGTEST_TYPE=slow
|
|
|
|
server s1 {
|
|
rxreq
|
|
expect req.http.content-length == "1048576"
|
|
expect req.bodylen == 1048576
|
|
txresp -status 200 -bodylen 1048576
|
|
} -start
|
|
|
|
server s2 {
|
|
rxreq
|
|
txresp -status 200 -nolen -bodylen 1048576
|
|
} -start
|
|
|
|
haproxy h1 -conf {
|
|
global
|
|
.if feature(THREAD)
|
|
thread-groups 1
|
|
.endif
|
|
|
|
log stderr len 4096 local0 debug
|
|
|
|
defaults
|
|
mode http
|
|
timeout client "${HAPROXY_TEST_TIMEOUT-5s}"
|
|
timeout server "${HAPROXY_TEST_TIMEOUT-5s}"
|
|
timeout connect "${HAPROXY_TEST_TIMEOUT-5s}"
|
|
option splice-request
|
|
option splice-response
|
|
log global
|
|
option httplog
|
|
|
|
listen li1
|
|
bind "fd@${li1}"
|
|
id 10
|
|
server srv1 ${s1_addr}:${s1_port}
|
|
|
|
listen li2
|
|
bind "fd@${li2}"
|
|
id 20
|
|
server srv2 ${s2_addr}:${s2_port}
|
|
} -start
|
|
|
|
|
|
client c1 -connect ${h1_li1_sock} {
|
|
txreq -method POST -url "/" -bodylen 1048576
|
|
rxresp
|
|
expect resp.status == 200
|
|
expect resp.http.content-length == "1048576"
|
|
expect resp.bodylen == 1048576
|
|
} -run
|
|
|
|
client c2 -connect ${h1_li2_sock} {
|
|
txreq -url "/"
|
|
rxresp
|
|
expect resp.status == 200
|
|
expect resp.http.content-length == <undef>
|
|
expect resp.bodylen == 1048576
|
|
} -run
|
|
|
|
haproxy h1 -cli {
|
|
send "show stat typed"
|
|
expect ~ "F.10.0.[[:digit:]]+.h1_spliced_bytes_in.1:MCPV:u64:[1-9][[:digit:]]+\nF.10.0.[[:digit:]]+.h1_spliced_bytes_out.1:MCPV:u64:[1-9][[:digit:]]+"
|
|
send "show stat typed"
|
|
expect ~ "B.10.0.[[:digit:]]+.h1_spliced_bytes_in.1:MCPV:u64:[1-9][[:digit:]]+\nB.10.0.[[:digit:]]+.h1_spliced_bytes_out.1:MCPV:u64:[1-9][[:digit:]]+"
|
|
|
|
send "show stat typed"
|
|
expect ~ "F.20.0.[[:digit:]]+.h1_spliced_bytes_in.1:MCPV:u64:0\nF.20.0.[[:digit:]]+.h1_spliced_bytes_out.1:MCPV:u64:[1-9][[:digit:]]+"
|
|
send "show stat typed"
|
|
expect ~ "B.20.0.[[:digit:]]+.h1_spliced_bytes_in.1:MCPV:u64:[1-9][[:digit:]]+\nB.20.0.[[:digit:]]+.h1_spliced_bytes_out.1:MCPV:u64:0"
|
|
}
|