Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jacobsa-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
jacobsa-fuse
Commits
bfa3465c
Commit
bfa3465c
authored
Mar 24, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Open and close reporting files.
parent
01470b8c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
samples/flushfs/flush_fs_test.go
samples/flushfs/flush_fs_test.go
+18
-2
No files found.
samples/flushfs/flush_fs_test.go
View file @
bfa3465c
...
...
@@ -40,6 +40,10 @@ func TestFlushFS(t *testing.T) { RunTests(t) }
type
flushFSTest
struct
{
samples
.
SubprocessTest
// Files to which mount_sample is writing reported flushes and fsyncs.
flushes
*
os
.
File
fsyncs
*
os
.
File
// File handles that are closed in TearDown if non-nil.
f1
*
os
.
File
f2
*
os
.
File
...
...
@@ -52,7 +56,11 @@ func (t *flushFSTest) setUp(
var
err
error
// Set up files to receive flush and fsync reports.
panic
(
"TODO"
)
t
.
flushes
,
err
=
ioutil
.
TempFile
(
""
,
""
)
AssertEq
(
nil
,
err
)
t
.
fsyncs
,
err
=
ioutil
.
TempFile
(
""
,
""
)
AssertEq
(
nil
,
err
)
// Set up test config.
t
.
MountType
=
"flushfs"
...
...
@@ -74,7 +82,15 @@ func (t *flushFSTest) setUp(
}
func
(
t
*
FlushFSTest
)
TearDown
()
{
// Close files if non-nil.
// Unlink reporting files.
os
.
Remove
(
t
.
flushes
.
Name
())
os
.
Remove
(
t
.
fsyncs
.
Name
())
// Close reporting files.
t
.
flushes
.
Close
()
t
.
fsyncs
.
Close
()
// Close test files if non-nil.
if
t
.
f1
!=
nil
{
ExpectEq
(
nil
,
t
.
f1
.
Close
())
}
...
...
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