summaryrefslogtreecommitdiff
path: root/tests/reverse/correctness_test.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2017-07-27 20:31:22 +0200
committerJakob Unterwurzacher2017-07-27 20:31:22 +0200
commitd5133ca5ac4f241ff22ef145a3605a9fdb341bb6 (patch)
tree0ba68fc942de5459ff300f7d7e9f1229e8d5ed90 /tests/reverse/correctness_test.go
parent496968e06c09f896ed04ad0939242e1ae75cde53 (diff)
fusefrontend_reverse: return ENOENT for undecryptable names
This was working until DecryptName switched to returning EBADMSG instead of EINVAL. Add a test to catch the regression next time.
Diffstat (limited to 'tests/reverse/correctness_test.go')
-rw-r--r--tests/reverse/correctness_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/reverse/correctness_test.go b/tests/reverse/correctness_test.go
index bfbab3d..a5719eb 100644
--- a/tests/reverse/correctness_test.go
+++ b/tests/reverse/correctness_test.go
@@ -130,3 +130,13 @@ func TestAccessVirtual(t *testing.T) {
t.Errorf("should NOT be executable")
}
}
+
+// Opening a nonexistant file name should return ENOENT
+// and not EBADMSG or EIO or anything else.
+func TestEnoent(t *testing.T) {
+ fn := dirB + "/TestEnoent"
+ _, err := syscall.Open(fn, syscall.O_RDONLY, 0)
+ if err != syscall.ENOENT {
+ t.Errorf("want ENOENT, got: %v", err)
+ }
+}