Commit 1ea2e821 authored by Aaron Jacobs's avatar Aaron Jacobs

errorFS.OpenFile

parent 54db03b6
......@@ -138,3 +138,19 @@ func (fs *errorFS) LookUpInode(
return
}
// LOCKS_EXCLUDED(fs.mu)
func (fs *errorFS) OpenFile(
ctx context.Context,
op *fuseops.OpenFileOp) (err error) {
if fs.transformError(op, &err) {
return
}
if op.Inode != fooInodeID {
err = fmt.Errorf("Unsupported inode ID: %d", op.Inode)
return
}
return
}
......@@ -66,7 +66,7 @@ func (t *ErrorFSTest) OpenFile() {
t.fs.SetError(reflect.TypeOf(&fuseops.OpenFileOp{}), syscall.EOWNERDEAD)
_, err := os.Open(path.Join(t.Dir, "foo"))
ExpectThat(err, Error(HasSubstr("TODO")))
ExpectThat(err, Error(MatchesRegexp("open.*: .*owner died")))
}
func (t *ErrorFSTest) ReadFile() {
......
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