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