Commit 2003d2b2 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Run gofmt.

parent aaa7e243
......@@ -207,7 +207,6 @@ func TestingBOnePass(b *testing.B, threads int, sleepTime float64, files []strin
return results
}
func BenchmarkCFuseThreadedStat(b *testing.B) {
log.Println("benchmarking CFuse")
......@@ -239,7 +238,7 @@ func BenchmarkCFuseThreadedStat(b *testing.B) {
log.Println("Written:", f.Name())
mountPoint := fuse.MakeTempDir()
wd, _ := os.Getwd()
cmd := exec.Command(wd + "/cstatfs", mountPoint)
cmd := exec.Command(wd+"/cstatfs", mountPoint)
cmd.Env = append(os.Environ(), fmt.Sprintf("STATFS_INPUT=%s", f.Name()))
cmd.Start()
......@@ -261,4 +260,3 @@ func BenchmarkCFuseThreadedStat(b *testing.B) {
results := TestingBOnePass(b, threads, ttl*1.2, lines)
AnalyzeBenchmarkRuns(results)
}
......@@ -337,4 +337,3 @@ func (me *FileSystemConnector) FileNotify(node *Inode, off int64, length int64)
func (me *FileSystemConnector) EntryNotify(dir *Inode, name string) Status {
return me.fsInit.EntryNotify(dir.nodeId, name)
}
......@@ -50,8 +50,6 @@ func (me *fileSystemMount) mountName() string {
return ""
}
func (me *fileSystemMount) setOwner(attr *Attr) {
if me.options.Owner != nil {
attr.Owner = *me.options.Owner
......@@ -139,4 +137,3 @@ func (me *fileSystemMount) negativeEntry() *EntryOut {
SplitNs(me.options.NegativeTimeout, &out.EntryValid, &out.EntryValidNsec)
return out
}
......@@ -51,7 +51,6 @@ func (me *int32HandleMap) Has(h uint64) bool {
return me.handles[uint32(h)] != nil
}
func (me *int32HandleMap) Count() int {
me.mutex.Lock()
defer me.mutex.Unlock()
......
......@@ -5,6 +5,7 @@ import (
"log"
"sync"
)
var _ = log.Println
// The inode reflects the kernel's idea of the inode.
......
......@@ -278,9 +278,9 @@ func TestLinkExisting(t *testing.T) {
c := "hello"
err := ioutil.WriteFile(me.orig + "/file1", []byte(c), 0644)
err := ioutil.WriteFile(me.orig+"/file1", []byte(c), 0644)
CheckSuccess(err)
err = os.Link(me.orig + "/file1", me.orig + "/file2")
err = os.Link(me.orig+"/file1", me.orig+"/file2")
CheckSuccess(err)
f1, err := os.Lstat(me.mnt + "/file1")
......
......@@ -47,7 +47,7 @@ func (me *PathNodeFs) StatFs() *StatfsOut {
return me.fs.StatFs()
}
func (me *PathNodeFs) Node(name string) (*Inode) {
func (me *PathNodeFs) Node(name string) *Inode {
n, rest := me.LastNode(name)
if len(rest) > 0 {
return nil
......
......@@ -588,7 +588,7 @@ func TestLink(t *testing.T) {
err := ioutil.WriteFile(fn, []byte(content), 0666)
CheckSuccess(err)
err = os.Link(wd+"/mount/file", wd + "/mount/linked")
err = os.Link(wd+"/mount/file", wd+"/mount/linked")
CheckSuccess(err)
fi2, err := os.Lstat(wd + "/mount/linked")
......@@ -945,7 +945,6 @@ func TestDoubleOpen(t *testing.T) {
}
}
func TestFdLeak(t *testing.T) {
beforeEntries, err := ioutil.ReadDir("/proc/self/fd")
CheckSuccess(err)
......@@ -957,7 +956,7 @@ func TestFdLeak(t *testing.T) {
contents, err := ioutil.ReadFile(wd + "/mount/file")
CheckSuccess(err)
err = ioutil.WriteFile(wd + "/mount/file", contents, 0644)
err = ioutil.WriteFile(wd+"/mount/file", contents, 0644)
CheckSuccess(err)
clean()
......@@ -969,5 +968,3 @@ func TestFdLeak(t *testing.T) {
t.Errorf("/proc/self/fd changed size: after %v before %v", len(beforeEntries), len(afterEntries))
}
}
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