Commit bb997101 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Let varnishtest know if we use pcre_jit

parent ce89ba7f
varnishtest "Test certain regex fail before consuming all the stack" varnishtest "Test certain regex fail before consuming all the stack"
feature pcre_jit
server s1 { server s1 {
rxreq rxreq
expect req.http.found == "1" expect req.http.found == "1"
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include "vav.h" #include "vav.h"
#include "vnum.h" #include "vnum.h"
#include "vre.h"
#include "vtim.h" #include "vtim.h"
#define MAX_TOKENS 200 #define MAX_TOKENS 200
...@@ -598,6 +599,9 @@ cmd_feature(CMD_ARGS) ...@@ -598,6 +599,9 @@ cmd_feature(CMD_ARGS)
getgrnam("varnish") != NULL) getgrnam("varnish") != NULL)
continue; continue;
if (!strcmp(av[i], "pcre_jit") && vre__jit)
continue;
vtc_log(vl, 1, "SKIPPING test, missing feature: %s", av[i]); vtc_log(vl, 1, "SKIPPING test, missing feature: %s", av[i]);
vtc_stop = 1; vtc_stop = 1;
return; return;
......
...@@ -51,6 +51,8 @@ typedef struct vre vre_t; ...@@ -51,6 +51,8 @@ typedef struct vre vre_t;
extern const unsigned VRE_CASELESS; extern const unsigned VRE_CASELESS;
extern const unsigned VRE_NOTEMPTY; extern const unsigned VRE_NOTEMPTY;
extern const int vre__jit;
vre_t *VRE_compile(const char *, int, const char **, int *); vre_t *VRE_compile(const char *, int, const char **, int *);
int VRE_exec(const vre_t *code, const char *subject, int length, int VRE_exec(const vre_t *code, const char *subject, int length,
int startoffset, int options, int *ovector, int ovecsize, int startoffset, int options, int *ovector, int ovecsize,
......
...@@ -46,6 +46,8 @@ ...@@ -46,6 +46,8 @@
# define pcre_free_study pcre_free # define pcre_free_study pcre_free
#endif #endif
const int vre__jit = VRE_STUDY_JIT_COMPILE;
struct vre { struct vre {
unsigned magic; unsigned magic;
#define VRE_MAGIC 0xe83097dc #define VRE_MAGIC 0xe83097dc
......
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