aboutsummaryrefslogtreecommitdiff
path: root/tests/reverse/correctness_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/reverse/correctness_test.go')
-rw-r--r--tests/reverse/correctness_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/reverse/correctness_test.go b/tests/reverse/correctness_test.go
index 931be42..67edeb6 100644
--- a/tests/reverse/correctness_test.go
+++ b/tests/reverse/correctness_test.go
@@ -201,6 +201,13 @@ func TestTooLongSymlink(t *testing.T) {
if err != nil {
t.Fatal(err)
}
+ // save later tests the trouble of dealing with ENAMETOOLONG errors
+ defer func() {
+ os.Remove(fn)
+ // immediately create a new symlink so the inode number is not
+ // reused for something else
+ os.Symlink("/tmp", fn)
+ }()
t.Logf("Created symlink of length %d", l)
_, err = os.Readlink(dirC + "/TooLongSymlink")
if err == nil {