[master] d497ec099 Hopefully fix u00006 on various platforms.
Poul-Henning Kamp
phk at FreeBSD.org
Fri Nov 19 18:52:07 UTC 2021
commit d497ec0998f3670af1942cb60a9f4316fc2f3cba
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Fri Nov 19 18:51:03 2021 +0000
Hopefully fix u00006 on various platforms.
Dont limit ourselves to a set number of VSL records to include
the "0 CLI" we want, various platforms emit a number of Debug
messages relating to sockopt
Use the `process p%d -expect-text` mechanism to wait only as
long as necessary for the "0 CLI"
diff --git a/bin/varnishtest/tests/u00006.vtc b/bin/varnishtest/tests/u00006.vtc
index 3994c17b7..a79d592e8 100644
--- a/bin/varnishtest/tests/u00006.vtc
+++ b/bin/varnishtest/tests/u00006.vtc
@@ -7,9 +7,11 @@ server s1 -repeat 2 {
varnish v1 -vcl+backend {} -start
+# We use this to make sure we know there is a "0 CLI" in the binary log.
process p1 {
- exec varnishlog -n ${v1_name} -g raw -k 3 -w ${tmpdir}/vlog -A
+ exec varnishlog -n ${v1_name} -g raw -u -A
} -start
+
shell {
exec varnishlog -n ${v1_name} -D -P ${tmpdir}/vlog.pid \
-w ${tmpdir}/vlog.bin -R 10/s \
@@ -119,9 +121,11 @@ shell -err -expect "-R: Syntax error: Invalid duration" \
shell -err -expect "-R: Syntax error" \
"varnishlog -R 1000000000/1000000000000000000000000000000s"
-process p1 -wait
-shell {cat ${tmpdir}/vlog}
-shell {grep -q "0 CLI" ${tmpdir}/vlog}
+# Wait until the binary also (must) contain a "0 CLI"
+process p1 -expect-text 0 0 "0 CLI"
+process p1 -screen_dump
+process p1 -stop
+
shell -match "0 CLI[ ]+- Wr 200 [0-9]+ PONG" \
{varnishlog -n ${v1_name} -d -g raw -X "Wr 200 [0-9]+ [^P]"}
More information about the varnish-commit
mailing list