diff options
Diffstat (limited to 'tests/reverse')
-rw-r--r-- | tests/reverse/correctness_test.go | 10 |
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) + } +} |