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
665794fa
Commit
665794fa
authored
Mar 29, 2018
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give vtc_record() the ability to collect the bits in a VSB
parent
6643c5f4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
4 deletions
+6
-4
vtc.h
bin/varnishtest/vtc.h
+1
-1
vtc_haproxy.c
bin/varnishtest/vtc_haproxy.c
+1
-1
vtc_subr.c
bin/varnishtest/vtc_subr.c
+3
-1
vtc_varnish.c
bin/varnishtest/vtc_varnish.c
+1
-1
No files found.
bin/varnishtest/vtc.h
View file @
665794fa
...
...
@@ -134,7 +134,7 @@ struct vsb *vtc_hex_to_bin(struct vtclog *vl, const char *arg);
void
vtc_expect
(
struct
vtclog
*
,
const
char
*
,
const
char
*
,
const
char
*
,
const
char
*
,
const
char
*
);
void
vtc_wait4
(
struct
vtclog
*
,
long
,
int
,
int
,
int
);
void
*
vtc_record
(
struct
vtclog
*
,
int
);
void
*
vtc_record
(
struct
vtclog
*
,
int
,
struct
vsb
*
);
/* vtc_term.c */
struct
term
*
Term_New
(
struct
vtclog
*
,
int
,
int
);
...
...
bin/varnishtest/vtc_haproxy.c
View file @
665794fa
...
...
@@ -243,7 +243,7 @@ haproxy_thread(void *priv)
struct
haproxy
*
h
;
CAST_OBJ_NOTNULL
(
h
,
priv
,
HAPROXY_MAGIC
);
return
(
vtc_record
(
h
->
vl
,
h
->
fds
[
0
]));
return
(
vtc_record
(
h
->
vl
,
h
->
fds
[
0
]
,
NULL
));
}
/**********************************************************************
...
...
bin/varnishtest/vtc_subr.c
View file @
665794fa
...
...
@@ -187,7 +187,7 @@ vtc_wait4(struct vtclog *vl, long pid,
}
void
*
vtc_record
(
struct
vtclog
*
vl
,
int
fd
)
vtc_record
(
struct
vtclog
*
vl
,
int
fd
,
struct
vsb
*
vsb
)
{
char
buf
[
65536
];
struct
pollfd
fds
[
1
];
...
...
@@ -204,6 +204,8 @@ vtc_record(struct vtclog *vl, int fd)
if
(
fds
->
revents
&
POLLIN
)
{
i
=
read
(
fd
,
buf
,
sizeof
buf
-
1
);
if
(
i
>
0
)
{
if
(
vsb
!=
NULL
)
VSB_bcat
(
vsb
,
buf
,
i
);
buf
[
i
]
=
'\0'
;
vtc_dump
(
vl
,
3
,
"debug"
,
buf
,
-
2
);
}
...
...
bin/varnishtest/vtc_varnish.c
View file @
665794fa
...
...
@@ -376,7 +376,7 @@ varnish_thread(void *priv)
struct
varnish
*
v
;
CAST_OBJ_NOTNULL
(
v
,
priv
,
VARNISH_MAGIC
);
return
(
vtc_record
(
v
->
vl
,
v
->
fds
[
0
]));
return
(
vtc_record
(
v
->
vl
,
v
->
fds
[
0
]
,
NULL
));
}
/**********************************************************************
...
...
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