[6.0] 6c0c01811 Add a -m ("Miss") argument which also logs the records which do not match
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Wed Jul 10 07:42:09 UTC 2019
commit 6c0c01811d4e654d71829a1b3def9209d3c876da
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Tue Jan 15 12:50:09 2019 +0000
Add a -m ("Miss") argument which also logs the records which do not match
diff --git a/bin/varnishtest/vtc_logexp.c b/bin/varnishtest/vtc_logexp.c
index 43e300acf..521c9ae3b 100644
--- a/bin/varnishtest/vtc_logexp.c
+++ b/bin/varnishtest/vtc_logexp.c
@@ -65,6 +65,8 @@
* \-q query
* Filter records using a query expression, see ``man vsl-query`` for
* more information.
+ * \-m
+ * Also emit log records for misses (only for debugging)
*
* \-start
* Start the logexpect thread in the background.
@@ -153,6 +155,7 @@ struct logexp {
int vxid_last;
int tag_last;
+ int m_arg;
int d_arg;
enum VSL_grouping_e g_arg;
char *query;
@@ -308,6 +311,8 @@ logexp_dispatch(struct VSL_data *vsl, struct VSL_transaction * const pt[],
if (ok)
legend = "match";
+ else if (skip && le->m_arg)
+ legend = "miss";
else if (skip)
legend = NULL;
else
@@ -597,6 +602,10 @@ cmd_logexpect(CMD_ARGS)
av++;
continue;
}
+ if (!strcmp(*av, "-m")) {
+ le->m_arg = !le->m_arg;
+ continue;
+ }
if (!strcmp(*av, "-start")) {
logexp_start(le);
continue;
More information about the varnish-commit
mailing list