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
f7f8b159
Commit
f7f8b159
authored
Mar 15, 2013
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fuse: cleanup all temp directories.
parent
3ce04011
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
17 additions
and
14 deletions
+17
-14
fuse/cache_test.go
fuse/cache_test.go
+3
-3
fuse/delete_test.go
fuse/delete_test.go
+1
-1
fuse/fsetattr_test.go
fuse/fsetattr_test.go
+1
-1
fuse/loopback_test.go
fuse/loopback_test.go
+1
-1
fuse/memnode_test.go
fuse/memnode_test.go
+1
-1
fuse/misc_test_linux.go
fuse/misc_test_linux.go
+1
-1
fuse/notify_test.go
fuse/notify_test.go
+1
-1
fuse/owner_test.go
fuse/owner_test.go
+1
-1
fuse/pressure_test.go
fuse/pressure_test.go
+2
-1
fuse/xattr_test.go
fuse/xattr_test.go
+5
-3
No files found.
fuse/cache_test.go
View file @
f7f8b159
...
@@ -29,7 +29,7 @@ func (fs *cacheFs) Open(name string, flags uint32, context *Context) (fuseFile F
...
@@ -29,7 +29,7 @@ func (fs *cacheFs) Open(name string, flags uint32, context *Context) (fuseFile F
}
}
func
setupCacheTest
(
t
*
testing
.
T
)
(
string
,
*
PathNodeFs
,
func
())
{
func
setupCacheTest
(
t
*
testing
.
T
)
(
string
,
*
PathNodeFs
,
func
())
{
dir
,
err
:=
ioutil
.
TempDir
(
""
,
"go-fuse"
)
dir
,
err
:=
ioutil
.
TempDir
(
""
,
"go-fuse
-cachetest
"
)
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatalf
(
"TempDir failed: %v"
,
err
)
t
.
Fatalf
(
"TempDir failed: %v"
,
err
)
}
}
...
@@ -134,7 +134,7 @@ func TestNonseekable(t *testing.T) {
...
@@ -134,7 +134,7 @@ func TestNonseekable(t *testing.T) {
fs
:=
&
nonseekFs
{}
fs
:=
&
nonseekFs
{}
fs
.
Length
=
200
*
1024
fs
.
Length
=
200
*
1024
dir
,
err
:=
ioutil
.
TempDir
(
""
,
"go-fuse"
)
dir
,
err
:=
ioutil
.
TempDir
(
""
,
"go-fuse
-cache_test
"
)
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatalf
(
"failed: %v"
,
err
)
t
.
Fatalf
(
"failed: %v"
,
err
)
}
}
...
@@ -163,7 +163,7 @@ func TestNonseekable(t *testing.T) {
...
@@ -163,7 +163,7 @@ func TestNonseekable(t *testing.T) {
}
}
func
TestGetAttrRace
(
t
*
testing
.
T
)
{
func
TestGetAttrRace
(
t
*
testing
.
T
)
{
dir
,
err
:=
ioutil
.
TempDir
(
""
,
"go-fuse"
)
dir
,
err
:=
ioutil
.
TempDir
(
""
,
"go-fuse
-cache_test
"
)
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatalf
(
"failed: %v"
,
err
)
t
.
Fatalf
(
"failed: %v"
,
err
)
}
}
...
...
fuse/delete_test.go
View file @
f7f8b159
...
@@ -26,7 +26,7 @@ func (f *flipNode) GetAttr(out *Attr, file File, c *Context) Status {
...
@@ -26,7 +26,7 @@ func (f *flipNode) GetAttr(out *Attr, file File, c *Context) Status {
}
}
func
TestDeleteNotify
(
t
*
testing
.
T
)
{
func
TestDeleteNotify
(
t
*
testing
.
T
)
{
dir
,
err
:=
ioutil
.
TempDir
(
""
,
""
)
dir
,
err
:=
ioutil
.
TempDir
(
""
,
"
go-fuse-delete_test
"
)
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatalf
(
"TempDir failed %v"
,
err
)
t
.
Fatalf
(
"TempDir failed %v"
,
err
)
}
}
...
...
fuse/fsetattr_test.go
View file @
f7f8b159
...
@@ -131,7 +131,7 @@ func NewFile() *MutableDataFile {
...
@@ -131,7 +131,7 @@ func NewFile() *MutableDataFile {
}
}
func
setupFAttrTest
(
t
*
testing
.
T
,
fs
FileSystem
)
(
dir
string
,
clean
func
(),
sync
func
())
{
func
setupFAttrTest
(
t
*
testing
.
T
,
fs
FileSystem
)
(
dir
string
,
clean
func
(),
sync
func
())
{
dir
,
err
:=
ioutil
.
TempDir
(
""
,
"go-fuse"
)
dir
,
err
:=
ioutil
.
TempDir
(
""
,
"go-fuse
-fsetattr_test
"
)
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatalf
(
"TempDir failed: %v"
,
err
)
t
.
Fatalf
(
"TempDir failed: %v"
,
err
)
}
}
...
...
fuse/loopback_test.go
View file @
f7f8b159
...
@@ -898,7 +898,7 @@ func TestFStatFs(t *testing.T) {
...
@@ -898,7 +898,7 @@ func TestFStatFs(t *testing.T) {
}
}
func
TestOriginalIsSymlink
(
t
*
testing
.
T
)
{
func
TestOriginalIsSymlink
(
t
*
testing
.
T
)
{
tmpDir
,
err
:=
ioutil
.
TempDir
(
""
,
"go-fuse"
)
tmpDir
,
err
:=
ioutil
.
TempDir
(
""
,
"go-fuse
-loopback_test
"
)
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatalf
(
"TempDir failed: %v"
,
err
)
t
.
Fatalf
(
"TempDir failed: %v"
,
err
)
}
}
...
...
fuse/memnode_test.go
View file @
f7f8b159
...
@@ -10,7 +10,7 @@ import (
...
@@ -10,7 +10,7 @@ import (
var
_
=
log
.
Println
var
_
=
log
.
Println
func
setupMemNodeTest
(
t
*
testing
.
T
)
(
wd
string
,
fs
*
MemNodeFs
,
clean
func
())
{
func
setupMemNodeTest
(
t
*
testing
.
T
)
(
wd
string
,
fs
*
MemNodeFs
,
clean
func
())
{
tmp
,
err
:=
ioutil
.
TempDir
(
""
,
"go-fuse"
)
tmp
,
err
:=
ioutil
.
TempDir
(
""
,
"go-fuse
-memnode_test
"
)
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatalf
(
"TempDir failed: %v"
,
err
)
t
.
Fatalf
(
"TempDir failed: %v"
,
err
)
}
}
...
...
fuse/misc_test_linux.go
View file @
f7f8b159
...
@@ -8,7 +8,7 @@ import (
...
@@ -8,7 +8,7 @@ import (
)
)
func
TestLinkAt
(
t
*
testing
.
T
)
{
func
TestLinkAt
(
t
*
testing
.
T
)
{
dir
,
_
:=
ioutil
.
TempDir
(
""
,
"go-fuse"
)
dir
,
_
:=
ioutil
.
TempDir
(
""
,
"go-fuse
-misc_test
"
)
ioutil
.
WriteFile
(
dir
+
"/a"
,
[]
byte
{
42
},
0644
)
ioutil
.
WriteFile
(
dir
+
"/a"
,
[]
byte
{
42
},
0644
)
f
,
_
:=
os
.
Open
(
dir
)
f
,
_
:=
os
.
Open
(
dir
)
e
:=
Linkat
(
int
(
f
.
Fd
()),
"a"
,
int
(
f
.
Fd
()),
"b"
)
e
:=
Linkat
(
int
(
f
.
Fd
()),
"a"
,
int
(
f
.
Fd
()),
"b"
)
...
...
fuse/notify_test.go
View file @
f7f8b159
...
@@ -45,7 +45,7 @@ func NewNotifyTest(t *testing.T) *NotifyTest {
...
@@ -45,7 +45,7 @@ func NewNotifyTest(t *testing.T) *NotifyTest {
me
:=
&
NotifyTest
{}
me
:=
&
NotifyTest
{}
me
.
fs
=
&
NotifyFs
{}
me
.
fs
=
&
NotifyFs
{}
var
err
error
var
err
error
me
.
dir
,
err
=
ioutil
.
TempDir
(
""
,
"go-fuse"
)
me
.
dir
,
err
=
ioutil
.
TempDir
(
""
,
"go-fuse
-notify_test
"
)
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatalf
(
"TempDir failed: %v"
,
err
)
t
.
Fatalf
(
"TempDir failed: %v"
,
err
)
}
}
...
...
fuse/owner_test.go
View file @
f7f8b159
...
@@ -28,7 +28,7 @@ func (fs *ownerFs) GetAttr(name string, context *Context) (*Attr, Status) {
...
@@ -28,7 +28,7 @@ func (fs *ownerFs) GetAttr(name string, context *Context) (*Attr, Status) {
}
}
func
setupOwnerTest
(
t
*
testing
.
T
,
opts
*
FileSystemOptions
)
(
workdir
string
,
cleanup
func
())
{
func
setupOwnerTest
(
t
*
testing
.
T
,
opts
*
FileSystemOptions
)
(
workdir
string
,
cleanup
func
())
{
wd
,
err
:=
ioutil
.
TempDir
(
""
,
"go-fuse"
)
wd
,
err
:=
ioutil
.
TempDir
(
""
,
"go-fuse
-owner_test
"
)
fs
:=
&
ownerFs
{}
fs
:=
&
ownerFs
{}
nfs
:=
NewPathNodeFs
(
fs
,
nil
)
nfs
:=
NewPathNodeFs
(
fs
,
nil
)
...
...
fuse/pressure_test.go
View file @
f7f8b159
...
@@ -41,10 +41,11 @@ func TestMemoryPressure(t *testing.T) {
...
@@ -41,10 +41,11 @@ func TestMemoryPressure(t *testing.T) {
dirRegex
:
regexp
.
MustCompile
(
"^dir[0-9]*$"
),
dirRegex
:
regexp
.
MustCompile
(
"^dir[0-9]*$"
),
}
}
dir
,
err
:=
ioutil
.
TempDir
(
""
,
"go-fuse"
)
dir
,
err
:=
ioutil
.
TempDir
(
""
,
"go-fuse
-pressure_test
"
)
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatalf
(
"TempDir failed: %v"
,
err
)
t
.
Fatalf
(
"TempDir failed: %v"
,
err
)
}
}
defer
os
.
RemoveAll
(
dir
)
nfs
:=
NewPathNodeFs
(
fs
,
nil
)
nfs
:=
NewPathNodeFs
(
fs
,
nil
)
o
:=
&
FileSystemOptions
{
PortableInodes
:
true
}
o
:=
&
FileSystemOptions
{
PortableInodes
:
true
}
...
...
fuse/xattr_test.go
View file @
f7f8b159
...
@@ -103,11 +103,10 @@ func readXAttr(p, a string) (val []byte, errno int) {
...
@@ -103,11 +103,10 @@ func readXAttr(p, a string) (val []byte, errno int) {
func
xattrTestCase
(
t
*
testing
.
T
,
nm
string
)
(
mountPoint
string
,
cleanup
func
())
{
func
xattrTestCase
(
t
*
testing
.
T
,
nm
string
)
(
mountPoint
string
,
cleanup
func
())
{
xfs
:=
NewXAttrFs
(
nm
,
xattrGolden
)
xfs
:=
NewXAttrFs
(
nm
,
xattrGolden
)
xfs
.
tester
=
t
xfs
.
tester
=
t
mountPoint
,
err
:=
ioutil
.
TempDir
(
""
,
"go-fuse"
)
mountPoint
,
err
:=
ioutil
.
TempDir
(
""
,
"go-fuse
-xattr_test
"
)
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatalf
(
"TempDir failed: %v"
,
err
)
t
.
Fatalf
(
"TempDir failed: %v"
,
err
)
}
}
defer
os
.
RemoveAll
(
mountPoint
)
nfs
:=
NewPathNodeFs
(
xfs
,
nil
)
nfs
:=
NewPathNodeFs
(
xfs
,
nil
)
state
,
_
,
err
:=
MountNodeFileSystem
(
mountPoint
,
nfs
,
nil
)
state
,
_
,
err
:=
MountNodeFileSystem
(
mountPoint
,
nfs
,
nil
)
...
@@ -117,7 +116,10 @@ func xattrTestCase(t *testing.T, nm string) (mountPoint string, cleanup func())
...
@@ -117,7 +116,10 @@ func xattrTestCase(t *testing.T, nm string) (mountPoint string, cleanup func())
state
.
Debug
=
VerboseTest
()
state
.
Debug
=
VerboseTest
()
go
state
.
Loop
()
go
state
.
Loop
()
return
mountPoint
,
func
()
{
state
.
Unmount
()
}
return
mountPoint
,
func
()
{
state
.
Unmount
()
os
.
RemoveAll
(
mountPoint
)
}
}
}
func
TestXAttrNoExist
(
t
*
testing
.
T
)
{
func
TestXAttrNoExist
(
t
*
testing
.
T
)
{
...
...
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