]> git.kaiwu.me - haproxy.git/commit
REGTESTS: stick-table: test the general purpose counters and tags
authorWilly Tarreau <w@1wt.eu>
Mon, 21 Sep 2026 20:25:15 +0000 (20:25 +0000)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Sep 2026 14:55:57 +0000 (16:55 +0200)
commitde8f9bab5fcbf32b7f8bbe929a15e8570a1f8369
treebc4963c196ac91fb0ad5381cd8f3a72a9df18a5f
parenta7b8a0fb9c85a2ed91b4fbc4b928ea8f1dcd8ef8
REGTESTS: stick-table: test the general purpose counters and tags

The sc-add-gpc, sc-inc-gpc, sc-inc-gpc0, sc-inc-gpc1, sc-set-gpt and
sc-set-gpt0 actions had no coverage, and neither had the sc_*_gpc*,
sc_*_gpt*, sc0_*, sc1_*, sc2_* and src_* fetches nor the table_*gpc*
and table_*gpt* converters.

The array form of the general purpose storage (gpc, gpc_rate and gpt)
and the legacy scalar one (gpc0, gpc1 and gpt0) may not coexist in a
same table, so the test declares one table of each kind. The legacy one
is tracked by two stick counters at once, which lets the sc0_ and sc2_
shorthands be checked against each other and against the generic
sc_get_*(<sc-id>) form.

The three ways of reaching an entry are compared on each step: the stick
counters, the src_* fetches and the table_* converters, and the
increment, addition, reset and read variants are all exercised.

Note that among the shorthands of the array form, only sc1_clr_gpc() is
registered, sc0_clr_gpc() and sc2_clr_gpc() do not exist.
reg-tests/stick-table/sc_gpc_gpt.vtc [new file with mode: 0644]