]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REGTESTS: add tests for the xxh3 converter
authorDragan Dosen <ddosen@haproxy.com>
Tue, 22 Dec 2020 21:02:59 +0000 (22:02 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 23 Dec 2020 05:39:21 +0000 (06:39 +0100)
reg-tests/sample_fetches/hashes.vtc

index 874f81e415a263ed52d6b56a2cbb519a152645da..883845d72c000eb439ef8917c1eeef545dc6627f 100644 (file)
@@ -55,6 +55,8 @@ haproxy h1 -conf {
         http-response set-header x-wt6-1 "%[var(res.key),wt6(1)]"
 
         # 32/64-bit hashes, with seed variant
+        http-response set-header x-xxh3 "%[var(res.key),xxh3]"
+        http-response set-header x-xxh3-1 "%[var(res.key),xxh3(1)]"
         http-response set-header x-xxh32 "%[var(res.key),xxh32]"
         http-response set-header x-xxh32-1 "%[var(res.key),xxh32(1)]"
         http-response set-header x-xxh64 "%[var(res.key),xxh64]"
@@ -90,6 +92,8 @@ client c1 -connect ${h1_fe_sock} {
     expect resp.http.x-sdbm-1 == "3103804144"
     expect resp.http.x-wt6 == "4090277559"
     expect resp.http.x-wt6-1 == "1192658767"
+    expect resp.http.x-xxh3 == "-7779787747613135503"
+    expect resp.http.x-xxh3-1 == "5930632130106562027"
     expect resp.http.x-xxh32 == "1497633363"
     expect resp.http.x-xxh32-1 == "1070421674"
     expect resp.http.x-xxh64 == "2282408585429094475"