Mailing List Archive

[master] d497ec099 Hopefully fix u00006 on various platforms.
commit d497ec0998f3670af1942cb60a9f4316fc2f3cba
Author: Poul-Henning Kamp <phk@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]"}

_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
Re: [master] d497ec099 Hopefully fix u00006 on various platforms. [ In reply to ]
On Fri, Nov 19, 2021 at 6:52 PM Poul-Henning Kamp <phk@freebsd.org> wrote:
>
>
> commit d497ec0998f3670af1942cb60a9f4316fc2f3cba
> Author: Poul-Henning Kamp <phk@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

This is removing -A coverage since it only takes effect with -w.

Should it become a runtime failure to have -A without -w?

> +
> 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]"}
>
> _______________________________________________
> varnish-commit mailing list
> varnish-commit@varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
Re: [master] d497ec099 Hopefully fix u00006 on various platforms. [ In reply to ]
--------
Dridi Boukelmoune writes:

> > +# 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
>
> This is removing -A coverage since it only takes effect with -w.

Teach -w to take a "-" argument to mean stdout ?

I was surprised we didn't do that already...

--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
Re: [master] d497ec099 Hopefully fix u00006 on various platforms. [ In reply to ]
On Fri, Nov 19, 2021 at 8:12 PM Poul-Henning Kamp <phk@phk.freebsd.dk> wrote:
>
> --------
> Dridi Boukelmoune writes:
>
> > > +# 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
> >
> > This is removing -A coverage since it only takes effect with -w.
>
> Teach -w to take a "-" argument to mean stdout ?
>
> I was surprised we didn't do that already...

I haven't checked but if we do that we shouldn't allow it in daemon mode.
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
Re: [master] d497ec099 Hopefully fix u00006 on various platforms. [ In reply to ]
--------
Dridi Boukelmoune writes:
> On Fri, Nov 19, 2021 at 8:12 PM Poul-Henning Kamp <phk@phk.freebsd.dk> wrote:
> >
> > --------
> > Dridi Boukelmoune writes:
> >
> > > > +# 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
> > >
> > > This is removing -A coverage since it only takes effect with -w.
> >
> > Teach -w to take a "-" argument to mean stdout ?
> >
> > I was surprised we didn't do that already...
>
> I haven't checked but if we do that we shouldn't allow it in daemon mode.

Strictly speaking it is not daemon mode but restartability that is prevented.

--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
Re: [master] d497ec099 Hopefully fix u00006 on various platforms. [ In reply to ]
> > I haven't checked but if we do that we shouldn't allow it in daemon mode.
>
> Strictly speaking it is not daemon mode but restartability that is prevented.

Probably both, continuing the discussion on github.

https://github.com/varnishcache/varnish-cache/issues/3740#issuecomment-975240592
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit