Changes the check script to detect segfaults

This commit is contained in:
Felipe Zimmerle
2017-01-19 21:41:47 -03:00
committed by Felipe Zimmerle
parent ff65d618e4
commit a88dc8efa9
12 changed files with 76 additions and 90 deletions

View File

@@ -144,10 +144,9 @@ void perform_unit_test(ModSecurityTest<UnitTest> *test, UnitTest *t,
}
if (t->type == "op") {
Operator *op = Operator::instantiate("\"@" + t->name + \
" " + t->param + "\"");
Operator *op = Operator::instantiate(t->name, t->param);
op->init(t->filename, &error);
int ret = op->evaluate(NULL, t->input);
int ret = op->evaluate(NULL, NULL, t->input, NULL);
t->obtained = ret;
if (ret != t->ret) {
res->push_back(t);