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
eaa0177b
Commit
eaa0177b
authored
Aug 11, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up mappings even on assertion failure.
parent
373004db
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
samples/flushfs/flush_fs_test.go
samples/flushfs/flush_fs_test.go
+9
-0
No files found.
samples/flushfs/flush_fs_test.go
View file @
eaa0177b
...
@@ -590,6 +590,8 @@ func (t *NoErrorsTest) Mmap_NoMsync_MunmapBeforeClose() {
...
@@ -590,6 +590,8 @@ func (t *NoErrorsTest) Mmap_NoMsync_MunmapBeforeClose() {
syscall
.
MAP_SHARED
)
syscall
.
MAP_SHARED
)
AssertEq
(
nil
,
err
)
AssertEq
(
nil
,
err
)
defer
syscall
.
Munmap
(
data
)
AssertEq
(
"taco"
,
string
(
data
))
AssertEq
(
"taco"
,
string
(
data
))
// Modify the contents.
// Modify the contents.
...
@@ -638,6 +640,8 @@ func (t *NoErrorsTest) Mmap_NoMsync_CloseBeforeMunmap() {
...
@@ -638,6 +640,8 @@ func (t *NoErrorsTest) Mmap_NoMsync_CloseBeforeMunmap() {
syscall
.
MAP_SHARED
)
syscall
.
MAP_SHARED
)
AssertEq
(
nil
,
err
)
AssertEq
(
nil
,
err
)
defer
syscall
.
Munmap
(
data
)
AssertEq
(
"taco"
,
string
(
data
))
AssertEq
(
"taco"
,
string
(
data
))
// Close the file. We should see a flush.
// Close the file. We should see a flush.
...
@@ -682,6 +686,8 @@ func (t *NoErrorsTest) Mmap_WithMsync_MunmapBeforeClose() {
...
@@ -682,6 +686,8 @@ func (t *NoErrorsTest) Mmap_WithMsync_MunmapBeforeClose() {
syscall
.
MAP_SHARED
)
syscall
.
MAP_SHARED
)
AssertEq
(
nil
,
err
)
AssertEq
(
nil
,
err
)
defer
syscall
.
Munmap
(
data
)
AssertEq
(
"taco"
,
string
(
data
))
AssertEq
(
"taco"
,
string
(
data
))
// Modify the contents.
// Modify the contents.
...
@@ -738,6 +744,8 @@ func (t *NoErrorsTest) Mmap_WithMsync_CloseBeforeMunmap() {
...
@@ -738,6 +744,8 @@ func (t *NoErrorsTest) Mmap_WithMsync_CloseBeforeMunmap() {
syscall
.
MAP_SHARED
)
syscall
.
MAP_SHARED
)
AssertEq
(
nil
,
err
)
AssertEq
(
nil
,
err
)
defer
syscall
.
Munmap
(
data
)
AssertEq
(
"taco"
,
string
(
data
))
AssertEq
(
"taco"
,
string
(
data
))
// Close the file. We should see a flush.
// Close the file. We should see a flush.
...
@@ -941,6 +949,7 @@ func (t *FsyncErrorTest) Msync() {
...
@@ -941,6 +949,7 @@ func (t *FsyncErrorTest) Msync() {
syscall
.
MAP_SHARED
)
syscall
.
MAP_SHARED
)
AssertEq
(
nil
,
err
)
AssertEq
(
nil
,
err
)
defer
syscall
.
Munmap
(
data
)
// msync the mapping.
// msync the mapping.
err
=
msync
(
data
)
err
=
msync
(
data
)
...
...
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