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
Levin Zimmermann
go-fuse
Commits
dffd0318
Commit
dffd0318
authored
Feb 02, 2016
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fuse/test: shutdown FUSE before inspecting file system data.
This prevents data races flagged by the race detector.
parent
ac219034
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
fuse/test/fsetattr_test.go
fuse/test/fsetattr_test.go
+8
-1
No files found.
fuse/test/fsetattr_test.go
View file @
dffd0318
...
...
@@ -192,7 +192,11 @@ func TestFSetAttr(t *testing.T) {
}
fs
:=
pathfs
.
NewLockingFileSystem
(
fSetAttrFs
)
dir
,
clean
:=
setupFAttrTest
(
t
,
fs
)
defer
clean
()
defer
func
()
{
if
clean
!=
nil
{
clean
()
}
}()
fn
:=
dir
+
"/file"
f
,
err
:=
os
.
OpenFile
(
fn
,
os
.
O_CREATE
|
os
.
O_WRONLY
,
0755
)
...
...
@@ -257,6 +261,9 @@ func TestFSetAttr(t *testing.T) {
t
.
Error
(
"Fsync failed:"
,
os
.
NewSyscallError
(
"Fsync"
,
code
))
}
// Shutdown the FUSE FS so we can safely look at fSetAttrFs
clean
()
clean
=
nil
if
!
fSetAttrFs
.
file
.
FsyncCalled
{
t
.
Error
(
"Fsync was not called"
)
}
...
...
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