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
e0317ddb
Commit
e0317ddb
authored
Nov 22, 2012
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix races in TestMemoryPressure.
parent
f33f1679
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
fuse/pressure_test.go
fuse/pressure_test.go
+7
-2
No files found.
fuse/pressure_test.go
View file @
e0317ddb
...
@@ -54,11 +54,11 @@ func TestMemoryPressure(t *testing.T) {
...
@@ -54,11 +54,11 @@ func TestMemoryPressure(t *testing.T) {
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatalf
(
"mount failed: %v"
,
err
)
t
.
Fatalf
(
"mount failed: %v"
,
err
)
}
}
state
.
Debug
=
VerboseTest
()
go
state
.
Loop
()
go
state
.
Loop
()
defer
state
.
Unmount
()
defer
state
.
Unmount
()
state
.
Debug
=
VerboseTest
()
// Wait for FS to get ready.
// Wait for FS to get ready.
os
.
Lstat
(
dir
)
os
.
Lstat
(
dir
)
...
@@ -75,7 +75,12 @@ func TestMemoryPressure(t *testing.T) {
...
@@ -75,7 +75,12 @@ func TestMemoryPressure(t *testing.T) {
}(
i
)
}(
i
)
}
}
time
.
Sleep
(
100
*
time
.
Millisecond
)
time
.
Sleep
(
100
*
time
.
Millisecond
)
state
.
reqMu
.
Lock
()
bufs
.
lock
.
Lock
()
created
:=
bufs
.
createdBuffers
+
state
.
outstandingReadBufs
created
:=
bufs
.
createdBuffers
+
state
.
outstandingReadBufs
bufs
.
lock
.
Unlock
()
state
.
reqMu
.
Unlock
()
t
.
Logf
(
"Have %d read bufs"
,
state
.
outstandingReadBufs
)
t
.
Logf
(
"Have %d read bufs"
,
state
.
outstandingReadBufs
)
if
created
>
_MAX_READERS
{
if
created
>
_MAX_READERS
{
...
...
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