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
b1a07c6c
Commit
b1a07c6c
authored
Apr 17, 2015
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add regression test
parent
690377bd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
1 deletion
+41
-1
Makefile.am
src/test/Makefile.am
+1
-1
regress.sh
src/test/regress.sh
+31
-0
sw-doc.log
src/test/sw-doc.log
+0
-0
varnishevent.conf
src/test/varnishevent.conf
+9
-0
No files found.
src/test/Makefile.am
View file @
b1a07c6c
AM_CPPFLAGS
=
@VARNISH_CFLAGS@
-I
${
ac_varnish_pkgdataincludedir
}
TESTS
=
test_data test_strfTIM test_format test_writer
# regress.sh
ncsa.sh vslarg.sh
TESTS
=
test_data test_strfTIM test_format test_writer
regress.sh
#
ncsa.sh vslarg.sh
check_PROGRAMS
=
test_data test_strfTIM test_format test_writer
...
...
src/test/regress.sh
0 → 100755
View file @
b1a07c6c
#!/bin/bash
echo
echo
"TEST:
$0
"
echo
'... testing output and log against known checksums (long)'
LOG
=
test.log
OUT
=
output.log
rm
-f
$LOG
$OUT
../varnishevent
-f
varnishevent.conf
-r
sw-doc.log
-w
$OUT
-v
CKSUM
=
$(
cksum
$OUT
)
if
[
"
$CKSUM
"
!=
"4102580059 20793538
$OUT
"
]
;
then
echo
"ERROR: Regression test log output incorrect cksum:
$CKSUM
"
exit
1
fi
# sed removes the version/revision from the "initializing" line.
# grep removes logs from the writer thread about returns to free lists,
# which are not relevant to the regression, and may appear at different
# places in the log (due to multi-threading).
CKSUM
=
$(
sed
-e
's/\(initializing\) \(.*\)/\1/'
$LOG
|
grep
-v
'Writer: returned'
|
cksum
)
if
[
"
$CKSUM
"
!=
'214907488 66951871'
]
;
then
echo
"ERROR: Regression test varnishevent log incorrect cksum:
$CKSUM
"
exit
1
fi
exit
0
src/test/sw-doc.log
0 → 100644
View file @
b1a07c6c
File added
src/test/varnishevent.conf
0 → 100644
View file @
b1a07c6c
# varnishevent test configuration
monitor
.
interval
=
0
cformat
=%
b
%
d
%
D
%
H
%
h
%
I
%{
Host
}
i
%{
Connection
}
i
%{
User
-
Agent
}
i
%{
X
-
Forwarded
-
For
}
i
%{
Accept
-
Ranges
}
o
%{
Age
}
o
%{
Connection
}
o
%{
Content
-
Encoding
}
o
%{
Content
-
Length
}
o
%{
Content
-
Type
}
o
%{
Date
}
o
%{
Last
-
Modified
}
o
%{
Server
}
o
%{
Transfer
-
Encoding
}
o
%{
Via
}
o
%{
X
-
Varnish
}
o
%
l
%
m
%
O
%
q
%
r
%
s
%
t
%{%
F
-%
T
}
t
%
U
%
u
%{
Varnish
:
time_firstbyte
}
x
%{
Varnish
:
hitmiss
}
x
%{
Varnish
:
handling
}
x
%{
tag
:
Begin
}
x
%{
tag
:
Debug
}
x
%{
tag
:
End
}
x
%{
tag
:
Gzip
}
x
%{
tag
:
Hit
}
x
%{
tag
:
Length
}
x
%{
tag
:
Link
}
x
%{
tag
:
ReqAcct
}
x
%{
tag
:
ReqStart
}
x
%{
tag
:
RespProtocol
}
x
%{
tag
:
ReqMethod
}
x
%{
tag
:
ReqURL
}
x
%{
tag
:
ReqProtocol
}
x
%{
tag
:
RespReason
}
x
%{
tag
:
RespStatus
}
x
bformat
=%
b
%
d
%
D
%
H
%
h
%
I
%{
Accept
-
Encoding
}
i
%{
Host
}
i
%{
User
-
Agent
}
i
%{
X
-
Forwarded
-
For
}
i
%{
X
-
Varnish
}
i
%{
Accept
-
Ranges
}
o
%{
Connection
}
o
%{
Content
-
Encoding
}
o
%{
Content
-
Length
}
o
%{
Content
-
Type
}
o
%{
Date
}
o
%{
ETag
}
o
%{
Last
-
Modified
}
o
%{
Server
}
o
%{
Transfer
-
Encoding
}
o
%{
Vary
}
o
%
l
%
m
%
O
%
q
%
r
%
s
%
t
%{%
F
-%
T
}
t
%
U
%
u
%{
Varnish
:
time_firstbyte
}
x
%{
tag
:
Backend
}
x
%{
tag
:
BackendOpen
}
x
%{
tag
:
BackendClose
}
x
%{
tag
:
BackendReuse
}
x
%{
tag
:
Begin
}
x
%{
tag
:
BereqAcct
}
x
%{
tag
:
Length
}
x
%{
tag
:
BerespProtocol
}
x
%{
tag
:
BerespReason
}
x
%{
tag
:
BerespStatus
}
x
%{
tag
:
BereqProtocol
}
x
%{
tag
:
BereqMethod
}
x
%{
tag
:
BereqURL
}
x
%{
tag
:
Debug
}
x
%{
tag
:
End
}
x
log
.
file
=
test
.
log
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