projects
/
ccan
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c2259a
)
failtest: replay --failpath correctly on really failing opens.
author
Rusty Russell
<rusty@rustcorp.com.au>
Mon, 29 Aug 2011 23:52:39 +0000
(09:22 +0930)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Mon, 29 Aug 2011 23:52:39 +0000
(09:22 +0930)
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
patch
|
blob
|
history
diff --git
a/ccan/failtest/failtest.c
b/ccan/failtest/failtest.c
index bac0aa350ac24378e8af2b949cb0781a7699906a..f79768d87877f3ff7c8d6a3865842c0a3ee85ceb 100644
(file)
--- 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)) {