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
20ff8c6a
Commit
20ff8c6a
authored
May 18, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ReadOnlyTest.SetUp
parent
7caa7e6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
samples/flushfs/flush_fs_test.go
samples/flushfs/flush_fs_test.go
+11
-5
No files found.
samples/flushfs/flush_fs_test.go
View file @
20ff8c6a
...
...
@@ -56,7 +56,8 @@ type flushFSTest struct {
func
(
t
*
flushFSTest
)
setUp
(
ti
*
TestInfo
,
flushErr
bazilfuse
.
Errno
,
fsyncErr
bazilfuse
.
Errno
)
{
fsyncErr
bazilfuse
.
Errno
,
readOnly
bool
)
{
var
err
error
// Set up files to receive flush and fsync reports.
...
...
@@ -76,6 +77,10 @@ func (t *flushFSTest) setUp(
fmt
.
Sprintf
(
"%d"
,
int
(
fsyncErr
)),
}
if
readOnly
{
t
.
MountFlags
=
append
(
t
.
MountFlags
,
"--read_only"
)
}
t
.
MountFiles
=
map
[
string
]
*
os
.
File
{
"flushfs.flushes_file"
:
t
.
flushes
,
"flushfs.fsyncs_file"
:
t
.
fsyncs
,
...
...
@@ -207,7 +212,7 @@ func init() { RegisterTestSuite(&NoErrorsTest{}) }
func
(
t
*
NoErrorsTest
)
SetUp
(
ti
*
TestInfo
)
{
const
noErr
=
0
t
.
flushFSTest
.
setUp
(
ti
,
noErr
,
noErr
)
t
.
flushFSTest
.
setUp
(
ti
,
noErr
,
noErr
,
false
)
}
func
(
t
*
NoErrorsTest
)
Close_ReadWrite
()
{
...
...
@@ -802,7 +807,7 @@ func init() { RegisterTestSuite(&FlushErrorTest{}) }
func
(
t
*
FlushErrorTest
)
SetUp
(
ti
*
TestInfo
)
{
const
noErr
=
0
t
.
flushFSTest
.
setUp
(
ti
,
bazilfuse
.
ENOENT
,
noErr
)
t
.
flushFSTest
.
setUp
(
ti
,
bazilfuse
.
ENOENT
,
noErr
,
false
)
}
func
(
t
*
FlushErrorTest
)
Close
()
{
...
...
@@ -882,7 +887,7 @@ func init() { RegisterTestSuite(&FsyncErrorTest{}) }
func
(
t
*
FsyncErrorTest
)
SetUp
(
ti
*
TestInfo
)
{
const
noErr
=
0
t
.
flushFSTest
.
setUp
(
ti
,
noErr
,
bazilfuse
.
ENOENT
)
t
.
flushFSTest
.
setUp
(
ti
,
noErr
,
bazilfuse
.
ENOENT
,
false
)
}
func
(
t
*
FsyncErrorTest
)
Fsync
()
{
...
...
@@ -955,7 +960,8 @@ type ReadOnlyTest struct {
func
init
()
{
RegisterTestSuite
(
&
ReadOnlyTest
{})
}
func
(
t
*
ReadOnlyTest
)
SetUp
(
ti
*
TestInfo
)
{
panic
(
"TODO"
)
const
noErr
=
0
t
.
flushFSTest
.
setUp
(
ti
,
noErr
,
noErr
,
true
)
}
func
(
t
*
ReadOnlyTest
)
ReadRoot
()
{
...
...
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