Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
6613cca6
Commit
6613cca6
authored
Dec 13, 2021
by
Dridi Boukelmoune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
param: Add a hidden deprecated alias for coverage
parent
c6e3d6b5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
1 deletion
+28
-1
mgt_param.c
bin/varnishd/mgt/mgt_param.c
+2
-0
b00078.vtc
bin/varnishtest/tests/b00078.vtc
+23
-0
params.h
include/tbl/params.h
+3
-1
No files found.
bin/varnishd/mgt/mgt_param.c
View file @
6613cca6
...
...
@@ -778,6 +778,8 @@ MCF_DumpRstParam(void)
"output from varnishd -x parameter
\n\n
"
);
VTAILQ_FOREACH
(
pl
,
&
phead
,
list
)
{
pp
=
pl
->
spec
;
if
(
!
strcmp
(
"deprecated_dummy"
,
pp
->
name
))
continue
;
printf
(
".. _ref_param_%s:
\n\n
"
,
pp
->
name
);
printf
(
"%s
\n
"
,
pp
->
name
);
for
(
z
=
0
;
z
<
strlen
(
pp
->
name
);
z
++
)
...
...
bin/varnishtest/tests/b00078.vtc
0 → 100644
View file @
6613cca6
varnishtest "deprecated parameters"
varnish v1 -cliok "param.set debug +syncvsl"
shell -expect "+syncvsl" {
varnishadm -n ${v1_name} "param.show deprecated_dummy"
}
shell -expect "+syncvsl" {
varnishadm -n ${v1_name} "param.show -j deprecated_dummy"
}
shell -err {
varnishadm -n ${v1_name} "param.show" | grep deprecated_dummy
}
shell -err {
varnishadm -n ${v1_name} "param.show -l" | grep deprecated_dummy
}
shell -err {
varnishadm -n ${v1_name} "param.show -j" | grep deprecated_dummy
}
include/tbl/params.h
View file @
6613cca6
...
...
@@ -1647,13 +1647,15 @@ PARAM_PCRE2(
* When a parameter is renamed, but the a deprecated alias is kept for
* compatibility, its documentation is minimal: only a description in
* manual pages, a description and current value in the CLI.
*
* The deprecated_dummy alias is here for test coverage.
*/
#define PARAM_ALIAS(al, nm) \
PARAM(, , al, tweak_alias, NULL, NULL, NULL, #nm, NULL, \
"Deprecated alias for the " #nm " parameter.")
/* PARAM_ALIAS(old, new) */
PARAM_ALIAS
(
deprecated_dummy
,
debug
)
# undef PARAM_ALIAS
# undef PARAM_ALL
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment