Commit 723c2b8a authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Mark some linux-only files as such.

Change-Id: I265108f96471b9b472c29c2d9fbbd1d4dd6b44d0
parent b5f69ec8
// +build linux
package pathfs
import (
......@@ -8,7 +10,6 @@ import (
)
func TestSysUtimensat(t *testing.T) {
symlink := "/tmp/TestSysUtimensat"
os.Remove(symlink)
err := os.Symlink("/nonexisting/file", symlink)
......@@ -24,6 +25,7 @@ func TestSysUtimensat(t *testing.T) {
ts[1].Nsec = 3333
ts[1].Sec = 4444
// Linux specific.
err = sysUtimensat(0, symlink, &ts, _AT_SYMLINK_NOFOLLOW)
if err != nil {
t.Fatal(err)
......
// +build linux
package pathfs
import (
......
......@@ -101,3 +101,20 @@ func TestFallocate(t *testing.T) {
fi.Size())
}
}
// Check that "." and ".." exists. syscall.Getdents is linux specific.
func TestSpecialEntries(t *testing.T) {
tc := NewTestCase(t)
defer tc.Cleanup()
d, err := os.Open(tc.mnt)
if err != nil {
t.Fatalf("Open failed: %v", err)
}
defer d.Close()
buf := make([]byte, 100)
n, err := syscall.Getdents(int(d.Fd()), buf)
if n == 0 {
t.Errorf("directory is empty, entries '.' and '..' are missing")
}
}
......@@ -925,23 +925,6 @@ func TestUmask(t *testing.T) {
}
}
// Check that "." and ".." exists
func TestSpecialEntries(t *testing.T) {
tc := NewTestCase(t)
defer tc.Cleanup()
d, err := os.Open(tc.mnt)
if err != nil {
t.Fatalf("Open failed: %v", err)
}
defer d.Close()
buf := make([]byte, 100)
n, err := syscall.Getdents(int(d.Fd()), buf)
if n == 0 {
t.Errorf("directory is empty, entries '.' and '..' are missing")
}
}
// Check that chgrp(1) works
func TestChgrp(t *testing.T) {
tc := NewTestCase(t)
......
// +build linux
package test
import (
......@@ -11,6 +13,8 @@ import (
"github.com/hanwen/go-fuse/fuse/nodefs"
)
// this file is linux-only, since it uses syscall.Getxattr.
type xattrNode struct {
nodefs.Node
}
......
// +build linux
package test
import (
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment