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
15b166f0
Commit
15b166f0
authored
Feb 01, 2022
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove old special-case handling of `-l` argument errors.
parent
59f10690
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
40 deletions
+6
-40
mgt_main.c
bin/varnishd/mgt/mgt_main.c
+2
-17
u00000.vtc
bin/varnishtest/tests/u00000.vtc
+4
-23
No files found.
bin/varnishd/mgt/mgt_main.c
View file @
15b166f0
...
...
@@ -560,7 +560,6 @@ main(int argc, char * const *argv)
const
char
*
T_arg
=
"localhost:0"
;
char
*
p
;
struct
cli
cli
[
1
];
char
**
av
;
const
char
*
err
;
unsigned
u
;
struct
sigaction
sac
;
...
...
@@ -734,22 +733,8 @@ main(int argc, char * const *argv)
VJ_master
(
JAIL_MASTER_LOW
);
break
;
case
'l'
:
av
=
VAV_Parse
(
optarg
,
NULL
,
ARGV_COMMA
);
AN
(
av
);
if
(
av
[
0
]
!=
NULL
)
ARGV_ERR
(
"-l ...: %s
\n
"
,
av
[
0
]);
if
(
av
[
1
]
!=
NULL
&&
av
[
2
]
!=
NULL
&&
av
[
3
]
!=
NULL
)
ARGV_ERR
(
"Too many sub arguments to -l
\n
"
);
if
(
av
[
1
]
!=
NULL
)
{
MCF_ParamSet
(
cli
,
"vsl_space"
,
av
[
1
]);
MCF_ParamSet
(
cli
,
"vsl_space"
,
optarg
);
cli_check
(
cli
);
}
if
(
av
[
1
]
!=
NULL
&&
av
[
2
]
!=
NULL
)
{
fprintf
(
stderr
,
"Warning: Ignoring deprecated second"
" subargument to -l
\n
"
);
}
VAV_Free
(
av
);
break
;
case
'M'
:
M_arg
=
optarg
;
...
...
bin/varnishtest/tests/u00000.vtc
View file @
15b166f0
...
...
@@ -52,12 +52,6 @@ shell -err -expect {Cannot create secret-file in} {
shell -err -expect {Unknown jail method "xyz"} "varnishd -jxyz -f '' "
shell -err -expect {Invalid backslash sequence} {
varnishd -l 'xyz\kk,xyz\foo' -f ''
}
shell -err -expect {Invalid backslash sequence} {
varnishd -l 'ab\8cd' -f ''
}
shell -err -expect {Too many arguments for -V} "varnishd -V -V"
shell -expect {Copyright (c) 2006} "varnishd -V"
...
...
@@ -82,19 +76,7 @@ shell -err -expect {Error: -I file CLI command failed (104)} {
}
shell -err -expect "Can't open non-existent" {
varnishd -f '' -I non-existent -n ${tmpdir}/v0 -a :0 -l '2m,"'
}
shell -err -expect {Error: -l ...: Missing '"'} {
varnishd -f '' -I foo -n ${tmpdir}/v0 -a :0 -l '2m,"'
}
shell -err -expect {Error: Too many sub arguments} {
varnishd -f '' -I foo -n ${tmpdir}/v0 -a :0 -l 2m,2m,2m
}
shell -err -expect {Warning: Ignoring deprecated second subargument} {
varnishd -f '' -I foo -n ${tmpdir}/v0 -a :0 -l 2m,2m
varnishd -f '' -I non-existent -n ${tmpdir}/v0 -a :0
}
...
...
@@ -103,9 +85,8 @@ shell -err -expect {Warning: Ignoring deprecated second subargument} {
# Test -F mode with no VCL loaded
shell {echo ping > ${tmpdir}/I_file}
process p1 "exec varnishd -n ${tmpdir}/v1 -F -f '' -a :0 -l2m
,1m
-I ${tmpdir}/I_file 2>&1" -start
process p1 "exec varnishd -n ${tmpdir}/v1 -F -f '' -a :0 -l2m -I ${tmpdir}/I_file 2>&1" -start
process p1 -expect-text 0 0 {Warning: Ignoring deprecated second subargument to -l}
process p1 -expect-text 0 1 {PONG}
process p1 -expect-text 0 1 {END of -I file processing}
...
...
@@ -179,12 +160,12 @@ varnish v2 -stop -wait
# Test multiple -f options with a bad VCL
shell -err -expect {Cannot read -f file} {
exec varnishd -n ${tmpdir}/v0 -F -a :0 -l2m
,3m
-f ${tmpdir}/ok1 \
exec varnishd -n ${tmpdir}/v0 -F -a :0 -l2m -f ${tmpdir}/ok1 \
-f ${tmpdir}/ok2 -f ${tmpdir}/bad
}
shell -err -expect {Cannot read -f file} {
exec varnishd -n ${tmpdir}/v0 -F -a :0 -l2m
,3m
-f ${tmpdir}/ok1 \
exec varnishd -n ${tmpdir}/v0 -F -a :0 -l2m -f ${tmpdir}/ok1 \
-f ${tmpdir}/bad -f ${tmpdir}/ok2
}
...
...
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