diff options
author | bolshevik | 2018-04-17 20:33:04 +0200 |
---|---|---|
committer | rfjakob | 2018-04-17 20:33:04 +0200 |
commit | 12b32aa06c0475d60ee51b3753052ac2e4d09308 (patch) | |
tree | 2b880d5e2a96f0992e9ba0fc54df85a6a18969ae /internal/fusefrontend/xattr_unit_test.go | |
parent | 12832851c68ce6ba2907b5d5fefc2a5e49f7c36a (diff) |
Improved xattr handling on non-linux systems (#227)
* Fixed xattr filtering for MacOS. "system." and "user." prefixes are only relevant for Linux.
* Small cleanup and additional tests.
Diffstat (limited to 'internal/fusefrontend/xattr_unit_test.go')
-rw-r--r-- | internal/fusefrontend/xattr_unit_test.go | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/internal/fusefrontend/xattr_unit_test.go b/internal/fusefrontend/xattr_unit_test.go index ea5d3bb..c5c9360 100644 --- a/internal/fusefrontend/xattr_unit_test.go +++ b/internal/fusefrontend/xattr_unit_test.go @@ -4,7 +4,6 @@ package fusefrontend // "xattr_integration_test.go" in the test/xattr package. import ( - "syscall" "testing" "github.com/rfjakob/gocryptfs/internal/contentenc" @@ -24,18 +23,11 @@ func newTestFS() *FS { func TestEncryptDecryptXattrName(t *testing.T) { fs := newTestFS() - _, err := fs.encryptXattrName("xxxx") - if err != syscall.EPERM { - t.Fatalf("Names that don't start with 'user.' should fail") - } attr1 := "user.foo123456789" - cAttr, err := fs.encryptXattrName(attr1) - if err != nil { - t.Fatal(err) - } + cAttr := fs.encryptXattrName(attr1) t.Logf("cAttr=%v", cAttr) attr2, err := fs.decryptXattrName(cAttr) - if attr1 != attr2 { + if attr1 != attr2 || err != nil { t.Fatalf("Decrypt mismatch: %v != %v", attr1, attr2) } } |