Commit 1605358b authored by Rusty Russell's avatar Rusty Russell

failtest: allow continuing after running a failpath.

Append a "+" if you want to start forking as normal.
parent f75f0ca7
......@@ -280,11 +280,16 @@ static bool should_fail(struct failtest_call *call)
return false;
if (failpath) {
if (tolower(*failpath) != info_to_arg[call->type])
errx(1, "Failpath expected '%c' got '%c'\n",
info_to_arg[call->type], *failpath);
call->fail = isupper(*(failpath++));
return call->fail;
/* + means continue after end, like normal. */
if (*failpath == '+')
failpath = NULL;
else {
if (tolower(*failpath) != info_to_arg[call->type])
errx(1, "Failpath expected '%c' got '%c'\n",
info_to_arg[call->type], *failpath);
call->fail = isupper(*(failpath++));
return call->fail;
}
}
if (!failtest_hook(history, history_num)) {
......
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