[7.0] bec768df9 Hopefully fix u00006 on various platforms.

Martin Blix Grydeland martin at varnish-software.com
Mon Nov 22 15:02:07 UTC 2021


commit bec768df97ca2a0b50b3ed5bd169ac40e5e1d830
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 e420aa18d..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,8 +121,11 @@ shell -err -expect "-R: Syntax error: Invalid duration" \
 shell -err -expect "-R: Syntax error" \
 	"varnishlog -R 1000000000/1000000000000000000000000000000s"
 
-process p1 -wait
-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