Commit 7f779623 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp Committed by Lasse Karstensen

Insist that tests start out with the magic string "varnishtest[:whitespace:]"

parent 2e624aab
......@@ -34,6 +34,7 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <poll.h>
......@@ -529,6 +530,13 @@ main(int argc, char * const *argv)
continue;
exit(2);
}
if (strncmp(p, "varnishtest", 11) || !isspace(p[11])) {
fprintf(stderr, "File \"%s\" doesn't start with 'varnishtest'\n",
*argv);
if (vtc_continue)
continue;
exit(2);
}
ALLOC_OBJ(tp, TST_MAGIC);
AN(tp);
tp->filename = *argv;
......
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