From: Olivier Houchard Date: Tue, 18 Aug 2026 12:49:03 +0000 (+0200) Subject: REGTESTS: don't rely on the stick-table dump order in the ipmask test X-Git-Tag: v3.5-dev5~15 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=e66fd4bada53acf2f3e094070c8662b6c36dabd9;p=haproxy.git REGTESTS: don't rely on the stick-table dump order in the ipmask test "show table" dumps the entries bucket by bucket, so their order depends on CONFIG_HAP_TBL_BUCKETS, which is 1 in builds without threads (e.g. TARGET=generic) and 8 or more with them. The test hardcoded the order seen with multiple buckets and failed on single-bucket builds. Check the header and each of the three entries with a separate request instead, so the order doesn't matter anymore. --- diff --git a/reg-tests/http-rules/converters_ipmask_concat_strcmp_field_word.vtc b/reg-tests/http-rules/converters_ipmask_concat_strcmp_field_word.vtc index 16596d037..2d40e5fc4 100644 --- a/reg-tests/http-rules/converters_ipmask_concat_strcmp_field_word.vtc +++ b/reg-tests/http-rules/converters_ipmask_concat_strcmp_field_word.vtc @@ -218,10 +218,18 @@ client c1 -connect ${h1_fe1_sock} -proxy2 "192.168.1.101:1234 127.0.0.1:2345" { expect resp.status == 200 } -run -# cli show be1 stick table +# cli show be1 stick table. The entries are dumped bucket by bucket, so +# their order depends on the number of buckets (thus on the build), let's +# check them one at a time. haproxy h1 -cli { send "show table be1" - expect ~ "^# table: be1, type: ipv6, size:20, used:3\\n0x[a-f0-9]+: key=::ffff:192\\.168\\.1\\.101 use=0 exp=[[:digit:]]+ shard=0 gpc0=0 conn_cnt=1\\n0x[a-f0-9]+: key=::ffff:192\\.168\\.1\\.0 use=0 exp=[[:digit:]]+ shard=0 gpc0=0 conn_cnt=1\\n0x[a-f0-9]+: key=2001:db8:c001:c01a:[0:]+ use=0 exp=[[:digit:]]+ shard=0 gpc0=0 conn_cnt=1\\n" + expect ~ "^# table: be1, type: ipv6, size:20, used:3\\n" + send "show table be1" + expect ~ "0x[a-f0-9]+: key=::ffff:192\\.168\\.1\\.101 use=0 exp=[[:digit:]]+ shard=0 gpc0=0 conn_cnt=1\\n" + send "show table be1" + expect ~ "0x[a-f0-9]+: key=::ffff:192\\.168\\.1\\.0 use=0 exp=[[:digit:]]+ shard=0 gpc0=0 conn_cnt=1\\n" + send "show table be1" + expect ~ "0x[a-f0-9]+: key=2001:db8:c001:c01a:[0:]+ use=0 exp=[[:digit:]]+ shard=0 gpc0=0 conn_cnt=1\\n" } # concat,strcmp,word,field tests