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
679c64d0
Commit
679c64d0
authored
Apr 30, 2019
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Signed/unsigned Flexelinting
parent
1dee0bd1
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
33 additions
and
27 deletions
+33
-27
hpack.h
bin/varnishtest/hpack.h
+1
-1
huffman_gen.py
bin/varnishtest/huffman_gen.py
+1
-1
c00094.vtc
bin/varnishtest/tests/c00094.vtc
+2
-0
vtc.h
bin/varnishtest/vtc.h
+1
-1
vtc_barrier.c
bin/varnishtest/vtc_barrier.c
+3
-3
vtc_client.c
bin/varnishtest/vtc_client.c
+4
-4
vtc_h2_hpack.c
bin/varnishtest/vtc_h2_hpack.c
+4
-1
vtc_http2.c
bin/varnishtest/vtc_http2.c
+13
-12
vtc_log.c
bin/varnishtest/vtc_log.c
+2
-2
vtc_server.c
bin/varnishtest/vtc_server.c
+1
-1
vtc_syslog.c
bin/varnishtest/vtc_syslog.c
+1
-1
No files found.
bin/varnishtest/hpack.h
View file @
679c64d0
...
@@ -52,7 +52,7 @@ struct hpk_hdr {
...
@@ -52,7 +52,7 @@ struct hpk_hdr {
struct
txt
key
;
struct
txt
key
;
struct
txt
value
;
struct
txt
value
;
enum
hpk_indexed
t
;
enum
hpk_indexed
t
;
int
i
;
unsigned
i
;
};
};
struct
hpk_ctx
;
struct
hpk_ctx
;
...
...
bin/varnishtest/huffman_gen.py
View file @
679c64d0
...
@@ -70,7 +70,7 @@ struct ssym {
...
@@ -70,7 +70,7 @@ struct ssym {
};
};
struct stbl {
struct stbl {
int
msk;
unsigned
msk;
struct ssym *syms;
struct ssym *syms;
};
};
'''
)
'''
)
...
...
bin/varnishtest/tests/c00094.vtc
View file @
679c64d0
...
@@ -37,6 +37,8 @@ server s1 -listen "${tmpdir}/s1.sock" {
...
@@ -37,6 +37,8 @@ server s1 -listen "${tmpdir}/s1.sock" {
barrier b1 sync
barrier b1 sync
} -start
} -start
varnish v1 -cliok "param.set debug +syncvsl"
varnish v1 -vcl {
varnish v1 -vcl {
backend foo {
backend foo {
...
...
bin/varnishtest/vtc.h
View file @
679c64d0
...
@@ -104,7 +104,7 @@ void vtc_fatal(struct vtclog *vl, const char *, ...)
...
@@ -104,7 +104,7 @@ void vtc_fatal(struct vtclog *vl, const char *, ...)
v_noreturn_
v_printflike_
(
2
,
3
);
v_noreturn_
v_printflike_
(
2
,
3
);
void
vtc_dump
(
struct
vtclog
*
vl
,
int
lvl
,
const
char
*
pfx
,
void
vtc_dump
(
struct
vtclog
*
vl
,
int
lvl
,
const
char
*
pfx
,
const
char
*
str
,
int
len
);
const
char
*
str
,
int
len
);
void
vtc_hexdump
(
struct
vtclog
*
,
int
,
const
char
*
,
const
void
*
,
int
);
void
vtc_hexdump
(
struct
vtclog
*
,
int
,
const
char
*
,
const
void
*
,
unsigned
);
int
vtc_send_proxy
(
int
fd
,
int
version
,
const
struct
suckaddr
*
sac
,
int
vtc_send_proxy
(
int
fd
,
int
version
,
const
struct
suckaddr
*
sac
,
const
struct
suckaddr
*
sas
);
const
struct
suckaddr
*
sas
);
...
...
bin/varnishtest/vtc_barrier.c
View file @
679c64d0
...
@@ -54,9 +54,9 @@ struct barrier {
...
@@ -54,9 +54,9 @@ struct barrier {
pthread_mutex_t
mtx
;
pthread_mutex_t
mtx
;
pthread_cond_t
cond
;
pthread_cond_t
cond
;
unsigned
waiters
;
int
waiters
;
unsigned
expected
;
int
expected
;
unsigned
cyclic
;
int
cyclic
;
enum
barrier_e
type
;
enum
barrier_e
type
;
/* fields below are only for BARRIER_SOCK */
/* fields below are only for BARRIER_SOCK */
...
...
bin/varnishtest/vtc_client.c
View file @
679c64d0
...
@@ -59,7 +59,7 @@ struct client {
...
@@ -59,7 +59,7 @@ struct client {
char
*
proxy_spec
;
char
*
proxy_spec
;
int
proxy_version
;
int
proxy_version
;
unsigned
repeat
;
int
repeat
;
unsigned
keepalive
;
unsigned
keepalive
;
unsigned
running
;
unsigned
running
;
...
@@ -200,7 +200,7 @@ client_thread(void *priv)
...
@@ -200,7 +200,7 @@ client_thread(void *priv)
struct
client
*
c
;
struct
client
*
c
;
struct
vtclog
*
vl
;
struct
vtclog
*
vl
;
int
fd
;
int
fd
;
unsigned
u
;
int
i
;
struct
vsb
*
vsb
;
struct
vsb
*
vsb
;
const
char
*
err
;
const
char
*
err
;
...
@@ -218,7 +218,7 @@ client_thread(void *priv)
...
@@ -218,7 +218,7 @@ client_thread(void *priv)
if
(
c
->
repeat
!=
1
)
if
(
c
->
repeat
!=
1
)
vtc_log
(
vl
,
2
,
"Started (%u iterations%s)"
,
c
->
repeat
,
vtc_log
(
vl
,
2
,
"Started (%u iterations%s)"
,
c
->
repeat
,
c
->
keepalive
?
" using keepalive"
:
""
);
c
->
keepalive
?
" using keepalive"
:
""
);
for
(
u
=
0
;
u
<
c
->
repeat
;
u
++
)
{
for
(
i
=
0
;
i
<
c
->
repeat
;
i
++
)
{
char
*
addr
=
VSB_data
(
vsb
);
char
*
addr
=
VSB_data
(
vsb
);
vtc_log
(
vl
,
3
,
"Connect to %s"
,
addr
);
vtc_log
(
vl
,
3
,
"Connect to %s"
,
addr
);
...
@@ -237,7 +237,7 @@ client_thread(void *priv)
...
@@ -237,7 +237,7 @@ client_thread(void *priv)
fd
=
http_process
(
vl
,
c
->
spec
,
fd
,
NULL
,
addr
,
fd
=
http_process
(
vl
,
c
->
spec
,
fd
,
NULL
,
addr
,
c
->
rcvbuf
);
c
->
rcvbuf
);
else
else
while
(
fd
>=
0
&&
u
++
<
c
->
repeat
)
while
(
fd
>=
0
&&
i
++
<
c
->
repeat
)
fd
=
http_process
(
vl
,
c
->
spec
,
fd
,
NULL
,
addr
,
fd
=
http_process
(
vl
,
c
->
spec
,
fd
,
NULL
,
addr
,
c
->
rcvbuf
);
c
->
rcvbuf
);
vtc_log
(
vl
,
3
,
"closing fd %d"
,
fd
);
vtc_log
(
vl
,
3
,
"closing fd %d"
,
fd
);
...
...
bin/varnishtest/vtc_h2_hpack.c
View file @
679c64d0
...
@@ -254,11 +254,14 @@ str_decode(struct hpk_iter *iter, struct txt *t)
...
@@ -254,11 +254,14 @@ str_decode(struct hpk_iter *iter, struct txt *t)
{
{
uint32_t
num
;
uint32_t
num
;
int
huff
;
int
huff
;
assert
(
iter
->
buf
<
iter
->
end
);
assert
(
iter
->
buf
<
iter
->
end
);
huff
=
(
*
iter
->
buf
&
0x80
);
huff
=
(
*
iter
->
buf
&
0x80
);
if
(
hpk_more
!=
num_decode
(
&
num
,
iter
,
7
))
if
(
hpk_more
!=
num_decode
(
&
num
,
iter
,
7
))
return
(
hpk_err
);
return
(
hpk_err
);
if
(
num
>
iter
->
end
-
iter
->
buf
)
assert
(
iter
->
buf
<
iter
->
end
);
if
(
num
>
(
unsigned
)(
iter
->
end
-
iter
->
buf
))
return
(
hpk_err
);
return
(
hpk_err
);
if
(
huff
)
{
/*Huffman encoding */
if
(
huff
)
{
/*Huffman encoding */
t
->
ptr
=
malloc
((
num
*
8L
)
/
5L
+
1L
);
t
->
ptr
=
malloc
((
num
*
8L
)
/
5L
+
1L
);
...
...
bin/varnishtest/vtc_http2.c
View file @
679c64d0
...
@@ -569,7 +569,8 @@ static void
...
@@ -569,7 +569,8 @@ static void
parse_settings
(
const
struct
stream
*
s
,
struct
frame
*
f
)
parse_settings
(
const
struct
stream
*
s
,
struct
frame
*
f
)
{
{
struct
http
*
hp
;
struct
http
*
hp
;
int
i
,
t
,
v
;
int
t
,
v
;
unsigned
u
;
const
char
*
buf
;
const
char
*
buf
;
enum
hpk_result
r
;
enum
hpk_result
r
;
CHECK_OBJ_NOTNULL
(
f
,
FRAME_MAGIC
);
CHECK_OBJ_NOTNULL
(
f
,
FRAME_MAGIC
);
...
@@ -580,19 +581,19 @@ parse_settings(const struct stream *s, struct frame *f)
...
@@ -580,19 +581,19 @@ parse_settings(const struct stream *s, struct frame *f)
vtc_fatal
(
hp
->
vl
,
vtc_fatal
(
hp
->
vl
,
"Size should be a multiple of 6, but isn't (%d)"
,
f
->
size
);
"Size should be a multiple of 6, but isn't (%d)"
,
f
->
size
);
for
(
i
=
0
;
i
<=
SETTINGS_MAX
;
i
++
)
for
(
u
=
0
;
u
<=
SETTINGS_MAX
;
u
++
)
f
->
md
.
settings
[
i
]
=
NAN
;
f
->
md
.
settings
[
u
]
=
NAN
;
for
(
i
=
0
;
i
<
f
->
size
;)
{
for
(
u
=
0
;
u
<
f
->
size
;)
{
t
=
vbe16dec
(
f
->
data
+
i
);
t
=
vbe16dec
(
f
->
data
+
u
);
i
+=
2
;
u
+=
2
;
v
=
vbe32dec
(
f
->
data
+
i
);
v
=
vbe32dec
(
f
->
data
+
u
);
if
(
t
<=
SETTINGS_MAX
)
{
if
(
t
<=
SETTINGS_MAX
)
{
buf
=
h2_settings
[
t
];
buf
=
h2_settings
[
t
];
f
->
md
.
settings
[
t
]
=
v
;
f
->
md
.
settings
[
t
]
=
v
;
}
else
}
else
buf
=
"unknown"
;
buf
=
"unknown"
;
i
+=
4
;
u
+=
4
;
if
(
t
==
1
)
{
if
(
t
==
1
)
{
r
=
HPK_ResizeTbl
(
s
->
hp
->
encctx
,
v
);
r
=
HPK_ResizeTbl
(
s
->
hp
->
encctx
,
v
);
...
@@ -2116,7 +2117,7 @@ cmd_rxhdrs(CMD_ARGS)
...
@@ -2116,7 +2117,7 @@ cmd_rxhdrs(CMD_ARGS)
char
*
p
;
char
*
p
;
int
loop
=
0
;
int
loop
=
0
;
unsigned
long
int
times
=
1
;
unsigned
long
int
times
=
1
;
int
rcv
=
0
;
unsigned
rcv
=
0
;
enum
h2_type
expect
=
TYPE_HEADERS
;
enum
h2_type
expect
=
TYPE_HEADERS
;
(
void
)
cmd
;
(
void
)
cmd
;
...
@@ -2155,7 +2156,7 @@ cmd_rxcont(CMD_ARGS)
...
@@ -2155,7 +2156,7 @@ cmd_rxcont(CMD_ARGS)
char
*
p
;
char
*
p
;
int
loop
=
0
;
int
loop
=
0
;
unsigned
long
int
times
=
1
;
unsigned
long
int
times
=
1
;
int
rcv
=
0
;
unsigned
rcv
=
0
;
(
void
)
cmd
;
(
void
)
cmd
;
(
void
)
av
;
(
void
)
av
;
...
@@ -2206,7 +2207,7 @@ cmd_rxdata(CMD_ARGS)
...
@@ -2206,7 +2207,7 @@ cmd_rxdata(CMD_ARGS)
char
*
p
;
char
*
p
;
int
loop
=
0
;
int
loop
=
0
;
unsigned
long
int
times
=
1
;
unsigned
long
int
times
=
1
;
int
rcv
=
0
;
unsigned
rcv
=
0
;
(
void
)
cmd
;
(
void
)
cmd
;
(
void
)
av
;
(
void
)
av
;
...
@@ -2307,7 +2308,7 @@ cmd_rxpush(CMD_ARGS)
...
@@ -2307,7 +2308,7 @@ cmd_rxpush(CMD_ARGS)
char
*
p
;
char
*
p
;
int
loop
=
0
;
int
loop
=
0
;
unsigned
long
int
times
=
1
;
unsigned
long
int
times
=
1
;
int
rcv
=
0
;
unsigned
rcv
=
0
;
enum
h2_type
expect
=
TYPE_PUSH_PROMISE
;
enum
h2_type
expect
=
TYPE_PUSH_PROMISE
;
(
void
)
cmd
;
(
void
)
cmd
;
...
...
bin/varnishtest/vtc_log.c
View file @
679c64d0
...
@@ -148,7 +148,7 @@ vtc_leadin(const struct vtclog *vl, int lvl, const char *fmt, ...)
...
@@ -148,7 +148,7 @@ vtc_leadin(const struct vtclog *vl, int lvl, const char *fmt, ...)
static
void
static
void
vtc_log_emit
(
const
struct
vtclog
*
vl
)
vtc_log_emit
(
const
struct
vtclog
*
vl
)
{
{
int
l
;
unsigned
l
;
l
=
VSB_len
(
vl
->
vsb
);
l
=
VSB_len
(
vl
->
vsb
);
if
(
l
==
0
)
if
(
l
==
0
)
...
@@ -232,7 +232,7 @@ vtc_dump(struct vtclog *vl, int lvl, const char *pfx, const char *str, int len)
...
@@ -232,7 +232,7 @@ vtc_dump(struct vtclog *vl, int lvl, const char *pfx, const char *str, int len)
void
void
vtc_hexdump
(
struct
vtclog
*
vl
,
int
lvl
,
const
char
*
pfx
,
vtc_hexdump
(
struct
vtclog
*
vl
,
int
lvl
,
const
char
*
pfx
,
const
void
*
ptr
,
int
len
)
const
void
*
ptr
,
unsigned
len
)
{
{
int
nl
=
1
;
int
nl
=
1
;
unsigned
l
;
unsigned
l
;
...
...
bin/varnishtest/vtc_server.c
View file @
679c64d0
...
@@ -50,7 +50,7 @@ struct server {
...
@@ -50,7 +50,7 @@ struct server {
VTAILQ_ENTRY
(
server
)
list
;
VTAILQ_ENTRY
(
server
)
list
;
char
run
;
char
run
;
unsigned
repeat
;
int
repeat
;
unsigned
keepalive
;
unsigned
keepalive
;
char
*
spec
;
char
*
spec
;
...
...
bin/varnishtest/vtc_syslog.c
View file @
679c64d0
...
@@ -51,7 +51,7 @@ struct syslog_srv {
...
@@ -51,7 +51,7 @@ struct syslog_srv {
VTAILQ_ENTRY
(
syslog_srv
)
list
;
VTAILQ_ENTRY
(
syslog_srv
)
list
;
char
run
;
char
run
;
unsigned
repeat
;
int
repeat
;
char
*
spec
;
char
*
spec
;
int
sock
;
int
sock
;
...
...
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