[master] d36fcf29b vtc: Print the VRE error message

Nils Goroll nils.goroll at uplex.de
Thu Jun 10 09:39:05 UTC 2021


commit d36fcf29b5ea43da2f8c8e5299dbaf34c1c205a5
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Wed May 19 11:50:19 2021 +0200

    vtc: Print the VRE error message
    
    It's more helpful than printing the invalid regular expression, that's
    how the spurious "\T" was spotted.

diff --git a/bin/varnishtest/vtc_misc.c b/bin/varnishtest/vtc_misc.c
index 59c226e52..6c3288d97 100644
--- a/bin/varnishtest/vtc_misc.c
+++ b/bin/varnishtest/vtc_misc.c
@@ -157,8 +157,9 @@ cmd_shell_engine(struct vtclog *vl, int ok, const char *cmd,
 	if (re != NULL) {
 		vre = VRE_compile(re, 0, &errptr, &err);
 		if (vre == NULL)
-			vtc_fatal(vl, "shell_match invalid regexp (\"%s\")",
-			    re);
+			vtc_fatal(vl,
+			    "shell_match invalid regexp (\"%s\" at %d)",
+			    errptr, err);
 	}
 	VSB_printf(vsb, "exec 2>&1 ; %s", cmd);
 	AZ(VSB_finish(vsb));


More information about the varnish-commit mailing list