Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
varnishevent
Commits
0106b225
Commit
0106b225
authored
Dec 12, 2016
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix %I and %O formatters for backend logging
parent
8ae4f160
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
format.c
src/format.c
+2
-2
regress.sh
src/test/regress.sh
+1
-1
test_format.c
src/test/test_format.c
+5
-5
vslarg.sh
src/test/vslarg.sh
+3
-3
No files found.
src/format.c
View file @
0106b225
...
...
@@ -411,7 +411,7 @@ void
format_I_backend
(
const
tx_t
*
tx
,
const
arg_t
*
args
,
char
**
s
,
size_t
*
len
)
{
(
void
)
args
;
format_IO_backend
(
tx
,
5
,
s
,
len
);
format_IO_backend
(
tx
,
2
,
s
,
len
);
}
void
...
...
@@ -439,7 +439,7 @@ void
format_O_backend
(
const
tx_t
*
tx
,
const
arg_t
*
args
,
char
**
s
,
size_t
*
len
)
{
(
void
)
args
;
format_IO_backend
(
tx
,
2
,
s
,
len
);
format_IO_backend
(
tx
,
5
,
s
,
len
);
}
static
inline
void
...
...
src/test/regress.sh
View file @
0106b225
...
...
@@ -12,7 +12,7 @@ rm -f $LOG $OUT
../varnishevent
-f
varnishevent.conf
-r
varnish-4.1.0-doc.log
-w
$OUT
-v
CKSUM
=
$(
cksum
$OUT
)
if
[
"
$CKSUM
"
!=
"
3634051132
442153
$OUT
"
]
;
then
if
[
"
$CKSUM
"
!=
"
1046111307
442153
$OUT
"
]
;
then
echo
"ERROR: Regression test log output incorrect cksum:
$CKSUM
"
exit
1
fi
...
...
src/test/test_format.c
View file @
0106b225
...
...
@@ -752,8 +752,8 @@ static const char
add_record_data
(
&
tx
,
SLT_BereqAcct
,
&
rec
[
1
],
&
c
[
1
],
REQACCT_PAYLOAD
);
format_I_backend
(
&
tx
,
&
args
,
&
str
,
&
len
);
MASSERT
(
strncmp
(
str
,
"
283"
,
3
)
==
0
);
MASSERT
(
len
==
3
);
MASSERT
(
strncmp
(
str
,
"
60"
,
2
)
==
0
);
MASSERT
(
len
==
2
);
#define PIPEACCT_PAYLOAD "60 60 178 105"
clear_rec
(
&
tx
,
SLT_ReqAcct
);
...
...
@@ -824,8 +824,8 @@ static const char
add_record_data
(
&
tx
,
SLT_BereqAcct
,
&
rec
[
1
],
&
c
[
1
],
REQACCT_PAYLOAD
);
format_O_backend
(
&
tx
,
&
args
,
&
str
,
&
len
);
MASSERT
(
strncmp
(
str
,
"
60"
,
2
)
==
0
);
MASSERT
(
len
==
2
);
MASSERT
(
strncmp
(
str
,
"
283"
,
3
)
==
0
);
MASSERT
(
len
==
3
);
clear_rec
(
&
tx
,
SLT_ReqAcct
);
add_record_data
(
&
tx
,
SLT_PipeAcct
,
&
rec
[
0
],
&
c
[
0
],
PIPEACCT_PAYLOAD
);
...
...
@@ -2132,7 +2132,7 @@ static const char
setup_full_backend_tx
(
&
tx
,
node
,
nptr
,
rec
,
c
);
os
=
FMT_Format
(
&
tx
,
&
len
);
#define EXP_FULL_BACKEND_OUTPUT "105 b 15703 HTTP/1.1 default(127.0.0.1,,80) "\
"
283 foohdr barhdr - GET 60
bar=baz&quux=wilco GET "\
"
60 foohdr barhdr - GET 283
bar=baz&quux=wilco GET "\
"http://foobar.com/foo?bar=baz&quux=wilco HTTP/1.1 200 "\
"[%d/%b/%Y:%T %z] 0 %F-%T.529143 /foo varnish 0.002837 logload "\
"2 chunked stream \"foo\\0\\377 bar\" "\
...
...
src/test/vslarg.sh
View file @
0106b225
...
...
@@ -11,7 +11,7 @@ LOG=/dev/null
echo
"... no VSL args"
CKSUM
=
$(
../varnishevent
-r
${
IN
}
-f
${
CONF
}
-l
${
LOG
}
|
cksum
)
if
[
"
$CKSUM
"
!=
'
1280332296
442191'
]
;
then
if
[
"
$CKSUM
"
!=
'
2861633151
442191'
]
;
then
echo
"ERROR: no VSL args unexpected cksum:
$CKSUM
"
exit
1
fi
...
...
@@ -20,7 +20,7 @@ echo "... -g vxid"
CKSUM
=
$(
../varnishevent
-g
vxid
-r
${
IN
}
-f
${
CONF
}
-l
${
LOG
}
|
cksum
)
# Same as default (no -g arg)
if
[
"
$CKSUM
"
!=
'
1280332296
442191'
]
;
then
if
[
"
$CKSUM
"
!=
'
2861633151
442191'
]
;
then
echo
"ERROR: -g vxid unexpected cksum:
$CKSUM
"
exit
1
fi
...
...
@@ -28,7 +28,7 @@ fi
echo
"... -g request"
CKSUM
=
$(
../varnishevent
-g
request
-r
${
IN
}
-f
${
CONF
}
-l
${
LOG
}
|
cksum
)
if
[
"
$CKSUM
"
!=
'
202886188
443186'
]
;
then
if
[
"
$CKSUM
"
!=
'
519771253
443186'
]
;
then
echo
"ERROR: -g request unexpected cksum:
$CKSUM
"
exit
1
fi
...
...
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