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
ac82a96a
Commit
ac82a96a
authored
Jul 04, 2022
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Also fix "$ABI vrt", and make sure it stays fixed.
parent
fcb823b0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
19 deletions
+26
-19
m00003.vtc
bin/varnishtest/tests/m00003.vtc
+10
-10
vcc_vmod.c
lib/libvcc/vcc_vmod.c
+7
-4
vmodtool.py
lib/libvcc/vmodtool.py
+5
-3
vmod_debug.vcc
vmod/vmod_debug.vcc
+2
-1
vmod_vtc.vcc
vmod/vmod_vtc.vcc
+2
-1
No files found.
bin/varnishtest/tests/m00003.vtc
View file @
ac82a96a
...
...
@@ -69,8 +69,8 @@ filewrite -a ${tmpdir}/libvmod_wrong.so {
"Vmod_vmod_wrong_Func",
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
0
,
0
"0"
,
"0U"
]
]
}
...
...
@@ -87,8 +87,8 @@ filewrite -a ${tmpdir}/libvmod_wrong.so {
"Vmod_vmod_wrong_Func",
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
1
,
0
"1U"
,
"0"
]
]
}
...
...
@@ -108,8 +108,8 @@ filewrite -a ${tmpdir}/libvmod_wrong.so {
"Vmod_vmod_wrong_Func",
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
15
,
0
"15"
,
"0"
], [
"$FOOBAR"
]
...
...
@@ -128,8 +128,8 @@ filewrite -a ${tmpdir}/libvmod_wrong.so {
"Vmod_vmod_wrong_Func",
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
15
,
0
"15"
,
"0"
]
]
}
...
...
@@ -146,8 +146,8 @@ filewrite -a ${tmpdir}/libvmod_wrong.so {
"Vmod_vmod_wrong_Func",
"0000000000000000000000000000000000000000000000000000000000000000",
"0000000000000000000000000000000000000000000000000000000000000000",
15
,
0
"15"
,
"0"
], [
"$CPROTO"
], [
...
...
lib/libvcc/vcc_vmod.c
View file @
ac82a96a
...
...
@@ -131,6 +131,7 @@ vcc_ParseJSON(const struct vcc *tl, const char *jsn, struct vmod_import *vim)
{
const
struct
vjsn_val
*
vv
,
*
vv2
,
*
vv3
;
const
char
*
err
;
char
*
p
;
vim
->
vj
=
vjsn_parse
(
jsn
,
&
err
);
if
(
err
!=
NULL
)
...
...
@@ -180,13 +181,15 @@ vcc_ParseJSON(const struct vcc *tl, const char *jsn, struct vmod_import *vim)
vv3
=
VTAILQ_NEXT
(
vv3
,
list
);
AN
(
vv3
);
assert
(
vjsn_is_number
(
vv3
));
vim
->
major
=
atoi
(
vv3
->
value
);
assert
(
vjsn_is_string
(
vv3
));
vim
->
major
=
strtoul
(
vv3
->
value
,
&
p
,
10
);
assert
(
p
==
NULL
||
*
p
==
'\0'
||
*
p
==
'U'
);
vv3
=
VTAILQ_NEXT
(
vv3
,
list
);
AN
(
vv3
);
assert
(
vjsn_is_number
(
vv3
));
vim
->
minor
=
atoi
(
vv3
->
value
);
assert
(
vjsn_is_string
(
vv3
));
vim
->
minor
=
strtoul
(
vv3
->
value
,
&
p
,
10
);
assert
(
p
==
NULL
||
*
p
==
'\0'
||
*
p
==
'U'
);
if
(
!
vcc_IdIs
(
vim
->
t_mod
,
vim
->
name
))
{
VSB_printf
(
tl
->
sb
,
"Wrong file for VMOD %.*s
\n
"
,
...
...
lib/libvcc/vmodtool.py
View file @
ac82a96a
...
...
@@ -1100,7 +1100,9 @@ class vcc():
yield
i
+
" "
def
json
(
self
,
fo
,
fnx
):
fo
.
write
(
'#define STRINGIFY(arg) #arg
\n
'
)
fo
.
write
(
'#define STRINGIFY3(arg) #arg
\n
'
)
fo
.
write
(
'#define STRINGIFY2(arg) STRINGIFY3(#arg)
\n
'
)
fo
.
write
(
'#define STRINGIFY1(arg) STRINGIFY2(arg)
\n
'
)
fo
.
write
(
"
\n
static const char Vmod_Json[] = {
\n
"
)
fo
.
write
(
'
\t
"VMOD_JSON_SPEC
\x02
"
\n
'
)
...
...
@@ -1114,8 +1116,8 @@ class vcc():
# Hand-munge the JSON to insert stuff only known by
# the C-compiler at compile-time.
fo
.
write
(
',"
\n\t
"
\\
"" VMOD_ABI_Version "
\\
", "
\n
'
)
fo
.
write
(
'
\t
STRINGIFY(
%
s) ", "
\n
'
%
self
.
vrt_major
)
fo
.
write
(
'
\t
STRINGIFY(
%
s)
\n
'
%
self
.
vrt_minor
)
fo
.
write
(
'
\t
STRINGIFY
1
(
%
s) ", "
\n
'
%
self
.
vrt_major
)
fo
.
write
(
'
\t
STRINGIFY
1
(
%
s)
\n
'
%
self
.
vrt_minor
)
else
:
fo
.
write
(
'"
\n
'
)
fo
.
write
(
'
\t\"\\
n
\\
x03
\"\n
};
\n
'
)
...
...
vmod/vmod_debug.vcc
View file @
ac82a96a
...
...
@@ -27,8 +27,9 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# NB: We use this vmod to test "$ABI vrt" handling.
$ABI
stric
t
$ABI
vr
t
$Prefix xyzzy
$Module debug 3 "Development, test and debug"
$Synopsis auto
...
...
vmod/vmod_vtc.vcc
View file @
ac82a96a
...
...
@@ -27,7 +27,8 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
$ABI strict
# NB: Default to strict $ABI handling, so that path is tested in vmodtool.py
$Module vtc 3 "Utility module for varnishtest"
DESCRIPTION
...
...
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