aboutsummaryrefslogtreecommitdiff
path: root/internal/nametransform/longnames_test.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-04-10 19:32:10 +0200
committerJakob Unterwurzacher2016-04-10 21:31:08 +0200
commitdb72fcea41f01f24ac3edb1cbf86d6b0be60f137 (patch)
treee65cc7c44b4c23bdee191015bfbbba1101370cd4 /internal/nametransform/longnames_test.go
parent63d3e517349a6c4774a3f75f2fa039c780eaf5f9 (diff)
longnames: fix fsstress failure, use dirfd
Using dirfd-relative operations allows safe lockless handling of the ".name" files.
Diffstat (limited to 'internal/nametransform/longnames_test.go')
-rw-r--r--internal/nametransform/longnames_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/nametransform/longnames_test.go b/internal/nametransform/longnames_test.go
index 62073ec..8fa19fe 100644
--- a/internal/nametransform/longnames_test.go
+++ b/internal/nametransform/longnames_test.go
@@ -6,17 +6,17 @@ import (
func TestIsLongName(t *testing.T) {
n := "gocryptfs.longname.LkwUdALvV_ANnzQN6ZZMYnxxfARD3IeZWCKnxGJjYmU=.name"
- if IsLongName(n) != LongNameFilename {
+ if NameType(n) != LongNameFilename {
t.Errorf("False negative")
}
n = "gocryptfs.longname.LkwUdALvV_ANnzQN6ZZMYnxxfARD3IeZWCKnxGJjYmU="
- if IsLongName(n) != LongNameContent {
+ if NameType(n) != LongNameContent {
t.Errorf("False negative")
}
n = "LkwUdALvV_ANnzQN6ZZMYnxxfARD3IeZWCKnxGJjYmU="
- if IsLongName(n) != LongNameNone {
+ if NameType(n) != LongNameNone {
t.Errorf("False positive")
}
}