varnishtest logexpect: remove implicit fail list clear

Dridi noticed that my reasoning about this was flawed: One transaction
ending does not imply no other transactions coming.
parent e412dbe3
......@@ -27,6 +27,8 @@ varnish v1 -vcl {
logexpect l1 -v v1 -g vxid -q "vxid == 1001" {
fail add * Error "out of workspace"
fail add * VCL_Error "Workspace overflow"
expect * 1001 End
fail clear
} -start
logexpect l2 -v v1 -err -g vxid -q "vxid == 1001" {
......@@ -46,8 +48,6 @@ client c1 {
rxresp
} -run
# -g raw needs an explicit expect and "fail clear" at the end
# because the raw transaction never ends
logexpect l4 -v v1 -d 1 -g raw {
fail add * VCL_Log ^i2
expect * 0 VCL_Log ^i0
......
......@@ -132,13 +132,13 @@
* a logexpect. All active fail specifications are matched against every
* log line and, if any match, the logexpect fails immediately.
*
* For transactional vsls (-g <session|request|vxid>), a fail list can be used
* without limitation: When the transaction ends, the logexpect ends
* successfully if no specification from the fail list matched.
* For a logexpect to end successfully, there must be no specs on the fail list,
* so logexpects should always end with
*
* For raw mode (-g raw), however, the log never ends, so for a logexpect to
* finish successfully, a "fail clear" is required after some match which
* determines that no further negative matching is required.
* expect <skip> <vxid> <tag> <termination-condition>
* fail clear
*
* XXX can we come up with a better solution which is still safe?
*/
#include "config.h"
......@@ -526,10 +526,6 @@ logexp_dispatch(struct VSL_data *vsl, struct VSL_transaction * const pt[],
return (1);
}
}
// transaction end
if (le->g_arg != VSL_g_raw)
VTAILQ_INIT(&le->fail);
return (0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment