summaryrefslogtreecommitdiff
path: root/tests/xattr/xattr_fd_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/xattr/xattr_fd_test.go')
-rw-r--r--tests/xattr/xattr_fd_test.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/xattr/xattr_fd_test.go b/tests/xattr/xattr_fd_test.go
index d3f02c5..7415e54 100644
--- a/tests/xattr/xattr_fd_test.go
+++ b/tests/xattr/xattr_fd_test.go
@@ -28,7 +28,9 @@ func TestFdXattr(t *testing.T) {
defer syscall.Close(fd)
buf := make([]byte, 1000)
sz, err := unix.Flistxattr(fd, buf)
- if sz != 0 {
+ if err != nil {
+ t.Error(err)
+ } else if sz != 0 {
t.Errorf("expected zero size, got %d", sz)
}
val1 := []byte("123456789")
@@ -64,7 +66,9 @@ func TestFdXattr(t *testing.T) {
t.Error(err)
}
sz, err = unix.Flistxattr(fd, buf)
- if sz != 0 {
+ if err != nil {
+ t.Error(err)
+ } else if sz != 0 {
t.Errorf("expected zero size, got %d", sz)
}
}