]> git.kaiwu.me - haproxy.git/commit
REGTESTS: sample_fetches: add a test for the constant and process fetches
authorWilly Tarreau <w@1wt.eu>
Mon, 21 Sep 2026 20:38:33 +0000 (20:38 +0000)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Sep 2026 14:55:57 +0000 (16:55 +0200)
commit949cd8cf42f2b935a49041d71b7abf9f1da5d052
tree6924fbc47faba8d228570caab3ed4fe7d668ce01
parentf32c2279e5a53691bb4dff26405204c7a1a4fad3
REGTESTS: sample_fetches: add a test for the constant and process fetches

The constant fetches always_true, always_false, str, int, bin, bool,
ipv4, ipv6 and meth, the process state ones pid, thread, tgroup, nbproc,
quic_enabled, cpu_calls, cpu_ns_tot, cpu_ns_avg, lat_ns_tot, lat_ns_avg,
cpu_usage_proc, cpu_usage_thr and cpu_usage_grp, plus date_us, env(),
rand() and dump_all_vars had little or no coverage.

The values which cannot be predicted are matched against their expected
shape, while pid is compared to the process identifier reported by
vtest, rand(10) must stay within its range, env() is looked up on the
HAPROXY_LOCALPEER variable which the process always exports, and
dump_all_vars must mention a variable set by an earlier rule.
reg-tests/sample_fetches/internal_state.vtc [new file with mode: 0644]