Commit ca32d146 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

cache_vcl: Align vcl.list reference counters right

And drop the artificial 6 digits pseudo-alignment, leading to a more
compact output when VCLs get less than 100k concurrent client tasks.
parent 1a43a0e1
......@@ -768,7 +768,7 @@ vcl_cli_list(struct cli *cli, const char * const *av, void *priv)
flg = "discarded";
} else
flg = "available";
VTE_printf(vte, "%s\t%s\t%s\t%6u\t%s", flg, vcl->state,
VTE_printf(vte, "%s\t%s\t%s\t\v%u\t%s", flg, vcl->state,
vcl->temp->name, vcl->busy, vcl->loaded_name);
if (vcl->label != NULL) {
VTE_printf(vte, "\t->\t%s", vcl->label->loaded_name);
......
......@@ -23,7 +23,7 @@ varnish v1 -vcl+backend {}
varnish v1 -cliok "vcl.state vcl1 cold"
# Nothing holds vcl1, so it should go gold.
varnish v1 -cliexpect "cold cold 0 vcl1" "vcl.list"
varnish v1 -cliexpect "cold cold 0 vcl1" "vcl.list"
# Grab hold of vcl1
......@@ -43,7 +43,7 @@ client c1 {
# There should still be a single busy hold on vcl1
varnish v1 -cliok "vcl.state vcl1 cold"
varnish v1 -cliexpect "cold busy [12] vcl1" "vcl.list"
varnish v1 -cliexpect "cold busy [12] vcl1" "vcl.list"
# Release hold on vcl1
varnish v1 -cliok "vcl.state vcl1 auto"
......@@ -62,4 +62,4 @@ client c1 {
# Nothing holds vcl1, so it should go gold.
varnish v1 -cliok "vcl.state vcl1 cold"
varnish v1 -cliexpect "cold [a-z]+ [01] vcl1" "vcl.list"
varnish v1 -cliexpect "cold .... [01] vcl1" "vcl.list"
......@@ -152,8 +152,8 @@ shell {
}
varnish v2 -arg "-f ${tmpdir}/ok1" -arg "-f ${tmpdir}/ok2" -start
varnish v2 -cliexpect {available auto warm 0 boot0} "vcl.list"
varnish v2 -cliexpect {active auto warm 0 boot} "vcl.list"
varnish v2 -cliexpect {available auto warm 0 boot0} "vcl.list"
varnish v2 -cliexpect {active auto warm 0 boot1} "vcl.list"
varnish v2 -stop -wait
# Test multiple -f options with a bad VCL
......
......@@ -17,7 +17,7 @@ varnish v1 -cliok "vcl.state vcl1 cold"
# We should now see it as cooling
delay 1
varnish v1 -cliexpect "available cold cooling 0 vcl1" vcl.list
varnish v1 -cliexpect "available cold cooling 0 vcl1" vcl.list
varnish v1 -clijson "vcl.list -j"
# It can't be warmed up yet
......@@ -26,7 +26,7 @@ varnish v1 -cliexpect "vmod-debug ref on vcl1" "vcl.state vcl1 warm"
# It will eventually cool down
delay 2
varnish v1 -cliexpect "available cold cold 0 vcl1" vcl.list
varnish v1 -cliexpect "available cold cold 0 vcl1" vcl.list
varnish v1 -clijson "vcl.list -j"
# At this point it becomes possible to warm up again
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment