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