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
Kirill Smelkov
go-fuse
Commits
09e6b67a
Commit
09e6b67a
authored
Mar 22, 2019
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nodefs: comment for cache_test.
parent
5e3fe891
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
nodefs/cache_test.go
nodefs/cache_test.go
+4
-4
No files found.
nodefs/cache_test.go
View file @
09e6b67a
...
@@ -12,7 +12,6 @@ import (
...
@@ -12,7 +12,6 @@ import (
"os"
"os"
"sync"
"sync"
"testing"
"testing"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/internal/testutil"
"github.com/hanwen/go-fuse/internal/testutil"
...
@@ -83,10 +82,12 @@ func (r *keepCacheRoot) OnAdd(ctx context.Context) {
...
@@ -83,10 +82,12 @@ func (r *keepCacheRoot) OnAdd(ctx context.Context) {
i
.
AddChild
(
"nokeep"
,
i
.
NewInode
(
ctx
,
r
.
nokeep
,
NodeAttr
{}),
true
)
i
.
AddChild
(
"nokeep"
,
i
.
NewInode
(
ctx
,
r
.
nokeep
,
NodeAttr
{}),
true
)
}
}
// Test FOPEN_KEEP_CACHE. This is a little subtle: the automatic cache
// invalidation triggers if mtime or file size is changed, so only
// change content but no metadata.
func
TestKeepCache
(
t
*
testing
.
T
)
{
func
TestKeepCache
(
t
*
testing
.
T
)
{
mntDir
:=
testutil
.
TempDir
()
mntDir
:=
testutil
.
TempDir
()
defer
os
.
RemoveAll
(
mntDir
)
defer
os
.
RemoveAll
(
mntDir
)
sec
:=
time
.
Second
root
:=
&
keepCacheRoot
{}
root
:=
&
keepCacheRoot
{}
server
,
err
:=
Mount
(
mntDir
,
root
,
&
Options
{
server
,
err
:=
Mount
(
mntDir
,
root
,
&
Options
{
MountOptions
:
fuse
.
MountOptions
{
MountOptions
:
fuse
.
MountOptions
{
...
@@ -94,8 +95,7 @@ func TestKeepCache(t *testing.T) {
...
@@ -94,8 +95,7 @@ func TestKeepCache(t *testing.T) {
},
},
FirstAutomaticIno
:
1
,
FirstAutomaticIno
:
1
,
AttrTimeout
:
&
sec
,
// no caching.
EntryTimeout
:
&
sec
,
})
})
defer
server
.
Unmount
()
defer
server
.
Unmount
()
c1
,
err
:=
ioutil
.
ReadFile
(
mntDir
+
"/keep"
)
c1
,
err
:=
ioutil
.
ReadFile
(
mntDir
+
"/keep"
)
...
...
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