Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go-fuse
Commits
f0d19206
Commit
f0d19206
authored
Mar 19, 2013
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
benchmark: Drop CheckSuccess calls.
parent
f7f8b159
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
10 deletions
+24
-10
benchmark/stat_test.go
benchmark/stat_test.go
+24
-10
No files found.
benchmark/stat_test.go
View file @
f0d19206
...
...
@@ -14,8 +14,6 @@ import (
"time"
)
var
CheckSuccess
=
fuse
.
CheckSuccess
func
setupFs
(
fs
fuse
.
FileSystem
)
(
string
,
func
())
{
opts
:=
&
fuse
.
FileSystemOptions
{
EntryTimeout
:
0.0
,
...
...
@@ -60,29 +58,39 @@ func TestNewStatFs(t *testing.T) {
defer
clean
()
names
,
err
:=
ioutil
.
ReadDir
(
wd
)
CheckSuccess
(
err
)
if
err
!=
nil
{
t
.
Fatalf
(
"failed: %v"
,
err
)
}
if
len
(
names
)
!=
2
{
t
.
Error
(
"readdir /"
,
names
)
}
fi
,
err
:=
os
.
Lstat
(
wd
+
"/sub"
)
CheckSuccess
(
err
)
if
err
!=
nil
{
t
.
Fatalf
(
"failed: %v"
,
err
)
}
if
!
fi
.
IsDir
()
{
t
.
Error
(
"mode"
,
fi
)
}
names
,
err
=
ioutil
.
ReadDir
(
wd
+
"/sub"
)
CheckSuccess
(
err
)
if
err
!=
nil
{
t
.
Fatalf
(
"failed: %v"
,
err
)
}
if
len
(
names
)
!=
2
{
t
.
Error
(
"readdir /sub"
,
names
)
}
names
,
err
=
ioutil
.
ReadDir
(
wd
+
"/sub/dir"
)
CheckSuccess
(
err
)
if
err
!=
nil
{
t
.
Fatalf
(
"failed: %v"
,
err
)
}
if
len
(
names
)
!=
2
{
t
.
Error
(
"readdir /sub/dir"
,
names
)
}
fi
,
err
=
os
.
Lstat
(
wd
+
"/sub/marine.txt"
)
CheckSuccess
(
err
)
if
err
!=
nil
{
t
.
Fatalf
(
"failed: %v"
,
err
)
}
if
fi
.
Mode
()
&
os
.
ModeType
!=
0
{
t
.
Error
(
"mode"
,
fi
)
}
...
...
@@ -163,7 +171,9 @@ func BenchmarkCFuseThreadedStat(b *testing.B) {
}
f
,
err
:=
ioutil
.
TempFile
(
""
,
""
)
CheckSuccess
(
err
)
if
err
!=
nil
{
b
.
Fatalf
(
"failed: %v"
,
err
)
}
sort
.
Strings
(
out
)
for
_
,
k
:=
range
out
{
f
.
Write
([]
byte
(
fmt
.
Sprintf
(
"/%s
\n
"
,
k
)))
...
...
@@ -181,9 +191,13 @@ func BenchmarkCFuseThreadedStat(b *testing.B) {
cmd
.
Start
()
bin
,
err
:=
exec
.
LookPath
(
"fusermount"
)
CheckSuccess
(
err
)
if
err
!=
nil
{
b
.
Fatalf
(
"failed: %v"
,
err
)
}
stop
:=
exec
.
Command
(
bin
,
"-u"
,
mountPoint
)
CheckSuccess
(
err
)
if
err
!=
nil
{
b
.
Fatalf
(
"failed: %v"
,
err
)
}
defer
stop
.
Run
()
for
i
,
l
:=
range
lines
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment