Commit 6813e0b1 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp Committed by Dridi Boukelmoune

Test more distant corners of varnishhist

parent b0b82f39
...@@ -657,8 +657,7 @@ main(int argc, char **argv) ...@@ -657,8 +657,7 @@ main(int argc, char **argv)
ident = VSM_Dup(vut->vsm, "Arg", "-i"); ident = VSM_Dup(vut->vsm, "Arg", "-i");
else else
ident = strdup(""); ident = strdup("");
if (pthread_create(&thr, NULL, do_curses, NULL) != 0) AZ(pthread_create(&thr, NULL, do_curses, NULL));
VUT_Error(vut, 1, "pthread_create(): %s", strerror(errno));
vut->dispatch_f = accumulate; vut->dispatch_f = accumulate;
vut->dispatch_priv = NULL; vut->dispatch_priv = NULL;
vut->sighup_f = sighup; vut->sighup_f = sighup;
......
...@@ -11,12 +11,14 @@ shell -match "Usage: .*varnishhist <options>" \ ...@@ -11,12 +11,14 @@ shell -match "Usage: .*varnishhist <options>" \
"varnishhist -h" "varnishhist -h"
shell -expect "Copyright (c) 2006 Verdens Gang AS" \ shell -expect "Copyright (c) 2006 Verdens Gang AS" \
"varnishhist -V" "varnishhist -V"
shell -err -match "Usage: .*varnishhist <options>" \
"varnishhist -K"
shell -err -match "Usage: .*varnishhist <options>" \ shell -err -match "Usage: .*varnishhist <options>" \
"varnishhist extra" "varnishhist extra"
shell -err -expect "-p: invalid '0'" \ shell -err -expect "-p: invalid '0'" \
"varnishhist -p 0" "varnishhist -p 0"
shell -err -expect "-B: being able to bend time does not mean we can stop it" \ shell -err -expect "-B: being able to bend time does not mean we can stop it" \
"varnishhist -B 0" "varnishhist -p 2.0 -B 0"
shell -err -expect "-B: being able to bend time does not mean we can make it go backwards" \ shell -err -expect "-B: being able to bend time does not mean we can make it go backwards" \
"varnishhist -B -1" "varnishhist -B -1"
shell -err -expect "Invalid grouping mode: raw" \ shell -err -expect "Invalid grouping mode: raw" \
...@@ -25,5 +27,13 @@ shell -err -expect "-P: No such profile 'foo'" \ ...@@ -25,5 +27,13 @@ shell -err -expect "-P: No such profile 'foo'" \
"varnishhist -P foo" "varnishhist -P foo"
shell -err -expect "-P: 'Timestamp:' is not a valid profile name or definition" \ shell -err -expect "-P: 'Timestamp:' is not a valid profile name or definition" \
"varnishhist -P Timestamp::" "varnishhist -P Timestamp::"
shell -err -expect "-P: 'foo::0:0:0' is not a valid tag name" \ shell -err -expect "-P: 'b:' is not a valid profile name or definition" \
"varnishhist -P foo::0:0:0" "varnishhist -P b:"
shell -err -expect "-P: 'foo:' is not a valid tag name" \
"varnishhist -P foo:"
shell -err -expect "-P: 'b:Debug:' is an unsafe or binary record" \
"varnishhist -P b:Debug:"
shell -err -expect "-P: 'b:BereqAcct:x' is not a valid profile name or definition" \
"varnishhist -P b:BereqAcct:x"
shell -err -expect "-P: 'b:BereqAcct:x' is not a valid profile name or definition" \
"varnishhist -P b:BereqAcct:x:"
...@@ -9,7 +9,7 @@ varnish v1 -vcl+backend {} -start ...@@ -9,7 +9,7 @@ varnish v1 -vcl+backend {} -start
process p1 -dump {varnishhist -n ${v1_name}} -start process p1 -dump {varnishhist -n ${v1_name}} -start
process p2 -dump {varnishhist -n ${v1_name} -P b:BereqAcct::5:1:8} -start process p2 -dump {varnishhist -n ${v1_name} -P b:BereqAcct::5:1:8} -start
process p3 -dump {varnishhist -n ${v1_name} -P BerespBodytime} -start process p3 -dump {varnishhist -n ${v1_name} -P BerespBodytime -B 2} -start
process p1 -expect-text 24 0 {1e2} process p1 -expect-text 24 0 {1e2}
process p2 -expect-text 24 0 {1e2} process p2 -expect-text 24 0 {1e2}
...@@ -39,6 +39,8 @@ process p1 -winsz 23 80 -need-bytes +10 ...@@ -39,6 +39,8 @@ process p1 -winsz 23 80 -need-bytes +10
process p1 -write {0>+-<} -need-bytes +10 process p1 -write {0>+-<} -need-bytes +10
process p3 -write {0>+-<x} -need-bytes +10
process p1 -expect-text 2 1 {20_} process p1 -expect-text 2 1 {20_}
process p1 -writehex 0c -need-bytes +10 process p1 -writehex 0c -need-bytes +10
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment