Commit 60835401 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Minor polish and a test-case to get out in the corners of param-tweaking

parent ea2c5b4d
......@@ -330,14 +330,14 @@ MCF_ParamSet(struct cli *cli, const char *param, const char *val)
*heritage.param = mgt_param;
if (cli->result != CLIS_OK) {
VCLI_Out(cli, "(attempting to set param %s to %s)\n",
VCLI_Out(cli, "\n(attempting to set param %s to %s)",
pp->name, val);
} else if (child_pid >= 0 && pp->flags & MUST_RESTART) {
VCLI_Out(cli, "Change will take effect"
" when child is restarted");
VCLI_Out(cli,
"\nChange will take effect when child is restarted");
} else if (pp->flags & MUST_RELOAD) {
VCLI_Out(cli, "Change will take effect"
" when VCL script is reloaded");
VCLI_Out(cli,
"\nChange will take effect when VCL script is reloaded");
}
}
......
......@@ -93,12 +93,12 @@ tweak_generic_double(struct vsb *vsb, volatile double *dest,
}
if (min != NULL && u < minv) {
VSB_printf(vsb,
"Timeout must be greater or equal to %s\n", min);
"Must be greater or equal to %s\n", min);
return (-1);
}
if (max != NULL && u > maxv) {
VSB_printf(vsb,
"Timeout must be less than or equal to %s\n", max);
"Must be less than or equal to %s\n", max);
return (-1);
}
*dest = u;
......
varnishtest "param edge cases"
varnish v1 -vcl {backend foo {.host = "127.0.0.1";}} -start
varnish v1 -clierr "106" "param.set default_ttl -1"
varnish v1 -clierr "106" "param.set acceptor_sleep_max 20"
varnish v1 -clierr "200" "param.set prefer_ipv6 off"
varnish v1 -clierr "200" "param.set prefer_ipv6 no"
varnish v1 -clierr "200" "param.set prefer_ipv6 disable"
varnish v1 -clierr "200" "param.set prefer_ipv6 false"
varnish v1 -clierr "200" "param.set prefer_ipv6 on"
varnish v1 -clierr "200" "param.set prefer_ipv6 yes"
varnish v1 -clierr "200" "param.set prefer_ipv6 enable"
varnish v1 -clierr "200" "param.set prefer_ipv6 true"
varnish v1 -clierr "106" "param.set prefer_ipv6 foobar"
varnish v1 -clierr "106" "param.set http_max_hdr 0"
varnish v1 -clierr "106" "param.set http_max_hdr 1000000"
varnish v1 -clierr "106" "param.set workspace_thread 1b"
varnish v1 -clierr "106" "param.set workspace_thread 1b"
varnish v1 -clierr "106" "param.set workspace_thread 1x"
varnish v1 -clierr "106" "param.set workspace_thread x"
varnish v1 -clierr "106" "param.set user ///"
varnish v1 -clierr "106" "param.set user ///"
varnish v1 -clierr "106" {param.set listen_address ""}
varnish v1 -clierr "106" {param.set listen_address ",,"}
varnish v1 -clierr "106" {param.set listen_address "\""}
varnish v1 -clierr "106" {param.set pool_sess "\""}
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