From adc9909e26f96eec2c6846aa4085551af59979cf Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 30 Aug 2011 09:22:39 +0930 Subject: [PATCH 1/1] 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. --- ccan/failtest/failtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccan/failtest/failtest.c b/ccan/failtest/failtest.c index bac0aa35..f79768d8 100644 --- a/ccan/failtest/failtest.c +++ b/ccan/failtest/failtest.c @@ -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)) { -- 2.39.2