[master] 8ca8f0b Make test r01576 depend on PCRE JIT being enabled.
Poul-Henning Kamp
phk at FreeBSD.org
Wed Nov 11 11:04:55 CET 2015
commit 8ca8f0b5a5d9ace7c45eb8458e21dcf0c0b24c2d
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Nov 11 10:04:32 2015 +0000
Make test r01576 depend on PCRE JIT being enabled.
diff --git a/bin/varnishtest/tests/r01576.vtc b/bin/varnishtest/tests/r01576.vtc
index 99398e3..b0fdb9f 100644
--- a/bin/varnishtest/tests/r01576.vtc
+++ b/bin/varnishtest/tests/r01576.vtc
@@ -1,5 +1,7 @@
varnishtest "Test recursive regexp's fail before consuming all the stack"
+feature pcre_jit
+
server s1 {
rxreq
expect req.http.found == "1"
diff --git a/bin/varnishtest/vtc.c b/bin/varnishtest/vtc.c
index f77f617..3c6c884 100644
--- a/bin/varnishtest/vtc.c
+++ b/bin/varnishtest/vtc.c
@@ -47,6 +47,7 @@
#include "vav.h"
#include "vnum.h"
+#include "vre.h"
#include "vtim.h"
#define MAX_TOKENS 200
@@ -578,6 +579,9 @@ cmd_feature(CMD_ARGS)
if (sizeof(void*) == 8 && !strcmp(av[i], "64bit"))
continue;
+ if (!strcmp(av[i], "pcre_jit") && VRE_has_jit)
+ continue;
+
if (!strcmp(av[i], "!OSX")) {
#if !defined(__APPLE__) || !defined(__MACH__)
continue;
diff --git a/include/vre.h b/include/vre.h
index a59e8d7..f19ff2c 100644
--- a/include/vre.h
+++ b/include/vre.h
@@ -48,6 +48,7 @@ typedef struct vre vre_t;
#define VRE_ERROR_NOMATCH (-1)
/* And those to PCRE options */
+extern const unsigned VRE_has_jit;
extern const unsigned VRE_CASELESS;
extern const unsigned VRE_NOTEMPTY;
diff --git a/lib/libvarnish/vre.c b/lib/libvarnish/vre.c
index 94400fa..0bf89f9 100644
--- a/lib/libvarnish/vre.c
+++ b/lib/libvarnish/vre.c
@@ -42,6 +42,8 @@
#define VRE_STUDY_JIT_COMPILE 0
#endif
+const unsigned VRE_has_jit = VRE_STUDY_JIT_COMPILE;
+
#if PCRE_MAJOR < 8 || (PCRE_MAJOR == 8 && PCRE_MINOR < 20)
# define pcre_free_study pcre_free
#endif
More information about the varnish-commit
mailing list