Commit 97d9f0ed authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Fix tests for weekly 2012.02.14 too.

parent 20f160cc
...@@ -162,7 +162,7 @@ func TestFSetAttr(t *testing.T) { ...@@ -162,7 +162,7 @@ func TestFSetAttr(t *testing.T) {
_, err = f.WriteString("hello") _, err = f.WriteString("hello")
CheckSuccess(err) CheckSuccess(err)
code := syscall.Ftruncate(f.Fd(), 3) code := syscall.Ftruncate(int(f.Fd()), 3)
if code != nil { if code != nil {
t.Error("truncate retval", os.NewSyscallError("Ftruncate", code)) t.Error("truncate retval", os.NewSyscallError("Ftruncate", code))
} }
......
...@@ -519,7 +519,7 @@ func TestFSync(t *testing.T) { ...@@ -519,7 +519,7 @@ func TestFSync(t *testing.T) {
CheckSuccess(err) CheckSuccess(err)
// How to really test fsync ? // How to really test fsync ?
errNo := syscall.Fsync(f.Fd()) errNo := syscall.Fsync(int(f.Fd()))
if errNo != nil { if errNo != nil {
t.Errorf("fsync returned %v", errNo) t.Errorf("fsync returned %v", errNo)
} }
...@@ -678,7 +678,7 @@ func TestIoctl(t *testing.T) { ...@@ -678,7 +678,7 @@ func TestIoctl(t *testing.T) {
os.O_WRONLY|os.O_CREATE, 0777) os.O_WRONLY|os.O_CREATE, 0777)
defer f.Close() defer f.Close()
CheckSuccess(err) CheckSuccess(err)
ioctl(f.Fd(), 0x5401, 42) ioctl(int(f.Fd()), 0x5401, 42)
} }
func clearStatfs(s *syscall.Statfs_t) { func clearStatfs(s *syscall.Statfs_t) {
...@@ -727,7 +727,7 @@ func TestFStatFs(t *testing.T) { ...@@ -727,7 +727,7 @@ func TestFStatFs(t *testing.T) {
empty := syscall.Statfs_t{} empty := syscall.Statfs_t{}
s1 := empty s1 := empty
errno := syscall.Fstatfs(fOrig.Fd(), &s1) errno := syscall.Fstatfs(int(fOrig.Fd()), &s1)
if errno != nil { if errno != nil {
t.Fatal("statfs orig", err) t.Fatal("statfs orig", err)
} }
...@@ -737,7 +737,7 @@ func TestFStatFs(t *testing.T) { ...@@ -737,7 +737,7 @@ func TestFStatFs(t *testing.T) {
defer fMnt.Close() defer fMnt.Close()
s2 := empty s2 := empty
errno = syscall.Fstatfs(fMnt.Fd(), &s2) errno = syscall.Fstatfs(int(fMnt.Fd()), &s2)
if errno != nil { if errno != nil {
t.Fatal("statfs mnt", err) t.Fatal("statfs mnt", err)
} }
......
...@@ -30,7 +30,7 @@ func TestLinkAt(t *testing.T) { ...@@ -30,7 +30,7 @@ func TestLinkAt(t *testing.T) {
dir, _ := ioutil.TempDir("", "go-fuse") dir, _ := ioutil.TempDir("", "go-fuse")
ioutil.WriteFile(dir+"/a", []byte{42}, 0644) ioutil.WriteFile(dir+"/a", []byte{42}, 0644)
f, _ := os.Open(dir) f, _ := os.Open(dir)
e := Linkat(f.Fd(), "a", f.Fd(), "b") e := Linkat(int(f.Fd()), "a", int(f.Fd()), "b")
if e != 0 { if e != 0 {
t.Fatalf("Linkat %d", e) t.Fatalf("Linkat %d", e)
} }
......
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