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
e093cf0f
Commit
e093cf0f
authored
Sep 08, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename var.
parent
9b069ce5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
fuse/loopback_test.go
fuse/loopback_test.go
+4
-4
fuse/mount_test.go
fuse/mount_test.go
+7
-7
No files found.
fuse/loopback_test.go
View file @
e093cf0f
...
...
@@ -33,7 +33,7 @@ type testCase struct {
origSubdir
string
tester
*
testing
.
T
state
*
MountState
node
Fs
*
PathNodeFs
path
Fs
*
PathNodeFs
connector
*
FileSystemConnector
}
...
...
@@ -69,8 +69,8 @@ func NewTestCase(t *testing.T) *testCase {
pfs
=
NewLockingFileSystem
(
pfs
)
var
rfs
RawFileSystem
me
.
node
Fs
=
NewPathNodeFs
(
pfs
)
me
.
connector
=
NewFileSystemConnector
(
me
.
node
Fs
,
me
.
path
Fs
=
NewPathNodeFs
(
pfs
)
me
.
connector
=
NewFileSystemConnector
(
me
.
path
Fs
,
&
FileSystemOptions
{
EntryTimeout
:
testTtl
,
AttrTimeout
:
testTtl
,
...
...
@@ -101,7 +101,7 @@ func (me *testCase) Cleanup() {
}
func
(
me
*
testCase
)
rootNode
()
*
Inode
{
return
me
.
node
Fs
.
Root
()
.
Inode
()
return
me
.
path
Fs
.
Root
()
.
Inode
()
}
////////////////
...
...
fuse/mount_test.go
View file @
e093cf0f
...
...
@@ -28,7 +28,7 @@ func TestMountOnExisting(t *testing.T) {
t
.
Fatal
(
"expect OK:"
,
code
)
}
ts
.
node
Fs
.
Unmount
(
"mnt"
)
ts
.
path
Fs
.
Unmount
(
"mnt"
)
}
func
TestMountRename
(
t
*
testing
.
T
)
{
...
...
@@ -44,7 +44,7 @@ func TestMountRename(t *testing.T) {
if
OsErrorToErrno
(
err
)
!=
EBUSY
{
t
.
Fatal
(
"rename mount point should fail with EBUSY:"
,
err
)
}
ts
.
node
Fs
.
Unmount
(
"mnt"
)
ts
.
path
Fs
.
Unmount
(
"mnt"
)
}
func
TestMountReaddir
(
t
*
testing
.
T
)
{
...
...
@@ -62,7 +62,7 @@ func TestMountReaddir(t *testing.T) {
if
len
(
entries
)
!=
1
||
entries
[
0
]
.
Name
!=
"mnt"
{
t
.
Error
(
"wrong readdir result"
,
entries
)
}
ts
.
node
Fs
.
Unmount
(
"mnt"
)
ts
.
path
Fs
.
Unmount
(
"mnt"
)
}
func
TestRecursiveMount
(
t
*
testing
.
T
)
{
...
...
@@ -87,7 +87,7 @@ func TestRecursiveMount(t *testing.T) {
f
,
err
:=
os
.
Open
(
filepath
.
Join
(
submnt
,
"hello.txt"
))
CheckSuccess
(
err
)
log
.
Println
(
"Attempting unmount, should fail"
)
code
=
ts
.
node
Fs
.
Unmount
(
"mnt"
)
code
=
ts
.
path
Fs
.
Unmount
(
"mnt"
)
if
code
!=
EBUSY
{
t
.
Error
(
"expect EBUSY"
)
}
...
...
@@ -98,7 +98,7 @@ func TestRecursiveMount(t *testing.T) {
time
.
Sleep
(
1.5e9
*
testTtl
)
log
.
Println
(
"Attempting unmount, should succeed"
)
code
=
ts
.
node
Fs
.
Unmount
(
"mnt"
)
code
=
ts
.
path
Fs
.
Unmount
(
"mnt"
)
if
code
!=
OK
{
t
.
Error
(
"umount failed."
,
code
)
}
...
...
@@ -125,14 +125,14 @@ func TestDeletedUnmount(t *testing.T) {
_
,
err
=
f
.
Write
([]
byte
(
"bla"
))
CheckSuccess
(
err
)
code
=
ts
.
node
Fs
.
Unmount
(
"mnt"
)
code
=
ts
.
path
Fs
.
Unmount
(
"mnt"
)
if
code
!=
EBUSY
{
t
.
Error
(
"expect EBUSY for unmount with open files"
,
code
)
}
f
.
Close
()
time
.
Sleep
(
1.5e9
*
testTtl
)
code
=
ts
.
node
Fs
.
Unmount
(
"mnt"
)
code
=
ts
.
path
Fs
.
Unmount
(
"mnt"
)
if
!
code
.
Ok
()
{
t
.
Error
(
"should succeed"
,
code
)
}
...
...
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