summaryrefslogtreecommitdiff
path: root/tests/xattr/xattr_integration_test.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2019-01-04 22:22:24 +0100
committerJakob Unterwurzacher2019-01-04 22:22:24 +0100
commiteff35e60b63331e3e10f921792baa10b236a721d (patch)
tree694d89142c0a5293ee50ae304d913ef04890f08d /tests/xattr/xattr_integration_test.go
parent3365cfc02bf0ac9de82ce20bf597af4a2a82cd7d (diff)
fusefrontend: fix setting xattrs on directories
Directories cannot be opened read-write. Retry with RDONLY.
Diffstat (limited to 'tests/xattr/xattr_integration_test.go')
-rw-r--r--tests/xattr/xattr_integration_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/xattr/xattr_integration_test.go b/tests/xattr/xattr_integration_test.go
index b2870e8..f182fd9 100644
--- a/tests/xattr/xattr_integration_test.go
+++ b/tests/xattr/xattr_integration_test.go
@@ -124,6 +124,16 @@ func TestSetGetRmFifo(t *testing.T) {
setGetRmList(fn)
}
+// Test xattr set, get, rm on a directory. This should not fail with EISDIR.
+func TestSetGetRmDir(t *testing.T) {
+ fn := test_helpers.DefaultPlainDir + "/TestSetGetRmDir"
+ err := syscall.Mkdir(fn, 0700)
+ if err != nil {
+ t.Fatalf("creating fifo failed: %v", err)
+ }
+ setGetRmList(fn)
+}
+
func TestXattrSetEmpty(t *testing.T) {
attr := "user.foo"
fn := test_helpers.DefaultPlainDir + "/TestXattrSetEmpty1"