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
6fe7f548
Commit
6fe7f548
authored
Mar 17, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated a few tests for darwin's special entry cache behavior.
parent
b9b5a4f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
16 deletions
+27
-16
samples/cachingfs/caching_fs_test.go
samples/cachingfs/caching_fs_test.go
+27
-16
No files found.
samples/cachingfs/caching_fs_test.go
View file @
6fe7f548
...
@@ -19,6 +19,7 @@ import (
...
@@ -19,6 +19,7 @@ import (
"log"
"log"
"os"
"os"
"path"
"path"
"runtime"
"strings"
"strings"
"syscall"
"syscall"
"testing"
"testing"
...
@@ -353,12 +354,17 @@ func (t *EntryCachingTest) StatRenumberStat() {
...
@@ -353,12 +354,17 @@ func (t *EntryCachingTest) StatRenumberStat() {
// But after waiting for the entry cache to expire, we should see the new
// But after waiting for the entry cache to expire, we should see the new
// IDs.
// IDs.
time
.
Sleep
(
2
*
t
.
lookupEntryTimeout
)
//
fooAfter
,
dirAfter
,
barAfter
=
t
.
statAll
()
// Note that the cache is not guaranteed to expire on darwin. See notes on
// fuse.MountConfig.EnableVnodeCaching.
ExpectEq
(
t
.
fs
.
FooID
(),
getInodeID
(
fooAfter
))
if
runtime
.
GOOS
!=
"darwin"
{
ExpectEq
(
t
.
fs
.
DirID
(),
getInodeID
(
dirAfter
))
time
.
Sleep
(
2
*
t
.
lookupEntryTimeout
)
ExpectEq
(
t
.
fs
.
BarID
(),
getInodeID
(
barAfter
))
fooAfter
,
dirAfter
,
barAfter
=
t
.
statAll
()
ExpectEq
(
t
.
fs
.
FooID
(),
getInodeID
(
fooAfter
))
ExpectEq
(
t
.
fs
.
DirID
(),
getInodeID
(
dirAfter
))
ExpectEq
(
t
.
fs
.
BarID
(),
getInodeID
(
barAfter
))
}
}
}
func
(
t
*
EntryCachingTest
)
StatMtimeStat
()
{
func
(
t
*
EntryCachingTest
)
StatMtimeStat
()
{
...
@@ -395,16 +401,21 @@ func (t *EntryCachingTest) StatRenumberMtimeStat() {
...
@@ -395,16 +401,21 @@ func (t *EntryCachingTest) StatRenumberMtimeStat() {
// After waiting for the entry cache to expire, we should see fresh
// After waiting for the entry cache to expire, we should see fresh
// everything.
// everything.
time
.
Sleep
(
2
*
t
.
lookupEntryTimeout
)
//
fooAfter
,
dirAfter
,
barAfter
=
t
.
statAll
()
// Note that the cache is not guaranteed to expire on darwin. See notes on
// fuse.MountConfig.EnableVnodeCaching.
ExpectEq
(
t
.
fs
.
FooID
(),
getInodeID
(
fooAfter
))
if
runtime
.
GOOS
!=
"darwin"
{
ExpectEq
(
t
.
fs
.
DirID
(),
getInodeID
(
dirAfter
))
time
.
Sleep
(
2
*
t
.
lookupEntryTimeout
)
ExpectEq
(
t
.
fs
.
BarID
(),
getInodeID
(
barAfter
))
fooAfter
,
dirAfter
,
barAfter
=
t
.
statAll
()
ExpectThat
(
fooAfter
.
ModTime
(),
timeutil
.
TimeEq
(
newMtime
))
ExpectEq
(
t
.
fs
.
FooID
(),
getInodeID
(
fooAfter
))
ExpectThat
(
dirAfter
.
ModTime
(),
timeutil
.
TimeEq
(
newMtime
))
ExpectEq
(
t
.
fs
.
DirID
(),
getInodeID
(
dirAfter
))
ExpectThat
(
barAfter
.
ModTime
(),
timeutil
.
TimeEq
(
newMtime
))
ExpectEq
(
t
.
fs
.
BarID
(),
getInodeID
(
barAfter
))
ExpectThat
(
fooAfter
.
ModTime
(),
timeutil
.
TimeEq
(
newMtime
))
ExpectThat
(
dirAfter
.
ModTime
(),
timeutil
.
TimeEq
(
newMtime
))
ExpectThat
(
barAfter
.
ModTime
(),
timeutil
.
TimeEq
(
newMtime
))
}
}
}
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
...
...
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