On 1/9/19 10:43 AM, Frederic Lecaille wrote:
On 1/8/19 11:25 PM, PiBa-NL wrote:
Hi Frederic,
Hi Pieter,
Op 7-1-2019 om 10:13 schreef Frederic Lecaille:
On 12/23/18 11:38 PM, PiBa-NL wrote:
As requested hereby the regtest send for inclusion into the git
repository.
It is OK like that.
Note that you patch do not add reg-test/filters/common.pem which
could be a symlink to ../ssl/common.pem.
Also note that since 8f16148Christopher's commit, we add such a line
where possible:
${no-htx} option http-use-htx
We should also rename your test files to reg-test/filters/h00000.*
Thank you.
Fred.
Together with these changes you have supplied me already off-list,
i've also added a " --max-time 15" for the curl request, that should
be sufficient for most systems to complete the 3 second testcase, and
allows the shell command to complete without varnishtest killing it
after a timeout and not showing any of the curl output..
One last question, currently its being added to a new folder:
reg-test/filters/ , perhaps it should be in reg-test/compression/ ?
If you agree that needs changing i guess that can be done upon
committing it?
I have modified your patch to move your new files to reg-test/compression.
I have also applied this to it ;) : 's/\r$//'
Note that the test fails on my FreeBSD system when using HTX when
using '2.0-dev0-251a6b7 2019/01/08', i'm not aware it ever worked (i
didn't test it with HTX before..).
**** top 15.2 shell_out|curl: (28) Operation timed out after 15036
milliseconds with 187718 bytes received
Ok, I will take some time to have a look at this BSD specific issue.
Note that we can easily use the CLI at the end of the script to
troubleshooting anything.
I have applied such a patch to troubleshoot your script on FreeBSD11:
$ diff -u reg-tests/compression/s00000.vtc /tmp/s00000.vtc
--- reg-tests/compression/s00000.vtc 2019-01-09 10:14:49.082233338 +0100
+++ /tmp/s00000.vtc 2019-01-09 13:55:09.180291504 +0100
@@ -32,7 +32,7 @@
http-request use-service lua.fileloader-http01
} -start
-shell {
+shell -exit ${shell_status} {
HOST=${h1_fe1_addr}
if [ "${h1_fe1_addr}" = "::1" ] ; then
HOST="\[::1\]"
@@ -57,3 +57,10 @@
done
} -run
+
+haproxy h1 -cli {
+ send "show fd"
+ expect ~ .*
+} -wait
+
+
to give a chance to the script to access the CLI without exiting
after having run the shell with htx enable or not as follows:
varnishtest -Dno-htx= -Dshell_status=1
varnishtest -Dno-htx=# -Dshell_status=0
I got these show fd traces when the script fails:
**** h1 15.4 CLI recv| 3 : st=0x05(R:PrA W:pra) ev=0x01(heopI)
[lc] cnext=-3 cprev=-2 tmask=0xffffffffffffffff umask=0x0
owner=0x802825480 iocb=0x511b70(listener_accept) l.st=RDY fe=GLOBAL
**** h1 15.4 CLI recv| 4 : st=0x05(R:PrA W:pra) ev=0x01(heopI)
[lc] cnext=-3 cprev=-2 tmask=0xffffffffffffffff umask=0x0
owner=0x802825600 iocb=0x511b70(listener_accept) l.st=RDY fe=main-https
**** h1 15.4 CLI recv| 5 : st=0x05(R:PrA W:pra) ev=0x01(heopI)
[lc] cnext=-3 cprev=-2 tmask=0xffffffffffffffff umask=0x0
owner=0x802825780 iocb=0x511b70(listener_accept) l.st=RDY fe=fileloader
**** h1 15.4 CLI recv| 7 : st=0x05(R:PrA W:pra) ev=0x00(heopi)
[lc] cnext=-3 cprev=0 tmask=0xffffffffffffffff umask=0x0
owner=0x802825300 iocb=0x511b70(listener_accept) l.st=RDY fe=GLOBAL
**** h1 15.4 CLI recv| 8 : st=0x05(R:PrA W:pra) ev=0x00(heopi)
[lc] cnext=-3 cprev=0 tmask=0x1 umask=0x0 owner=0x534670
iocb=0x534670(poller_pipe_io_handler)
**** h1 15.4 CLI recv| 10 : st=0x22(R:pRa W:pRa) ev=0x01(heopI)
[lc] cnext=-3 cprev=-2 tmask=0x1 umask=0x0 owner=0x802b55000
iocb=0x526860(conn_fd_handler) back=0 cflg=0x80241300 fe=main-https
mux=h1 ctx=0x80281cfc0 h1c.flg=0x0 .sub=0 .ibuf=0@0x0+0/0
.obuf=0@0x0+0/0 h1s=0x80281d080 h1s.flg=0x10 .req.state=MSG_DONE
.res.state=MSG_DATA .meth=GET status=200 .cs.flg=0x00003000
.cs.data=0x802bfe698
**** h1 15.4 CLI recv| 11 : st=0x25(R:PrA W:pRa) ev=0x00(heopi)
[lc] cnext=-3 cprev=-2 tmask=0x1 umask=0x0 owner=0x802b55540
iocb=0x526860(conn_fd_handler) back=0 cflg=0x00201306 fe=GLOBAL mux=PASS
ctx=0x80289f780
**** h1 15.4 CLI recv| 13 : st=0x25(R:PrA W:pRa) ev=0x01(heopI)
[Lc] cnext=-3 cprev=-2 tmask=0x1 umask=0x0 owner=0x802b55700
iocb=0x526860(conn_fd_handler) back=1 cflg=0x00202306
sv=LocalSrv/TestBack mux=h1 ctx=0x80281d200 h1c.flg=0x0 .sub=1
.ibuf=0@0x0+0/0 .obuf=0@0x0+0/0 h1s=0x80281d500 h1s.flg=0x10
.req.state=MSG_DONE .res.state=MSG_DATA .meth=GET status=200
.cs.flg=0x00000000 .cs.data=0x802bfe6d8
**** h1 15.4 CLI recv| 14 : st=0x25(R:PrA W:pRa) ev=0x04(heOpi)
[lc] cnext=-3 cprev=-2 tmask=0x1 umask=0x0 owner=0x802b55a80
iocb=0x526860(conn_fd_handler) back=0 cflg=0x80201306 fe=fileloader
mux=h1 ctx=0x80281d680 h1c.flg=0x0 .sub=1 .ibuf=0@0x0+0/0
.obuf=0@0x0+0/0 h1s=0x80281d740 h1s.flg=0x80 .req.state=MSG_RQBEFORE
.res.state=MSG_RPBEFORE .meth=UNKNOWN status=0 .cs.flg=0x00100000
.cs.data=0x802bff698
I hope this may help.
Regards,
Fred