Commit adc9909e authored by Rusty Russell's avatar Rusty Russell

failtest: replay --failpath correctly on really failing opens.

When an open() call fails, we don't inject an error, but we didn't
apply this logic when replaying a failpath, with strange results.
parent 8c2259a2
......@@ -701,7 +701,7 @@ int failtest_open(const char *pathname,
free((char *)call.pathname);
p->u.open.ret = open(pathname, call.flags, call.mode);
if (!failpath && p->u.open.ret == -1) {
if (p->u.open.ret == -1) {
p->fail = false;
p->error = errno;
} else if (should_fail(p)) {
......
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