diff options
author | Jakob Unterwurzacher | 2016-04-10 19:32:10 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2016-04-10 21:31:08 +0200 |
commit | db72fcea41f01f24ac3edb1cbf86d6b0be60f137 (patch) | |
tree | e65cc7c44b4c23bdee191015bfbbba1101370cd4 /internal/nametransform/longnames_test.go | |
parent | 63d3e517349a6c4774a3f75f2fa039c780eaf5f9 (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.go | 6 |
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") } } |