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
2f786397
Commit
2f786397
authored
Jul 07, 2013
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fuse: remove VerboseTest from API.
parent
8922a4da
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
30 additions
and
38 deletions
+30
-38
fuse/misc.go
fuse/misc.go
+0
-7
fuse/nodefs/memnode_test.go
fuse/nodefs/memnode_test.go
+2
-2
fuse/pathfs/xattr_test.go
fuse/pathfs/xattr_test.go
+1
-1
fuse/test/cache_test.go
fuse/test/cache_test.go
+7
-10
fuse/test/defaultread_test.go
fuse/test/defaultread_test.go
+1
-1
fuse/test/delete_test.go
fuse/test/delete_test.go
+1
-1
fuse/test/fsetattr_test.go
fuse/test/fsetattr_test.go
+1
-1
fuse/test/loopback_test.go
fuse/test/loopback_test.go
+2
-2
fuse/test/notify_test.go
fuse/test/notify_test.go
+1
-1
raw/print.go
raw/print.go
+1
-1
unionfs/autounion_test.go
unionfs/autounion_test.go
+2
-3
unionfs/unionfs_test.go
unionfs/unionfs_test.go
+3
-3
zipfs/multizip_test.go
zipfs/multizip_test.go
+7
-4
zipfs/zipfs_test.go
zipfs/zipfs_test.go
+1
-1
No files found.
fuse/misc.go
View file @
2f786397
...
...
@@ -3,7 +3,6 @@
package
fuse
import
(
"flag"
"fmt"
"log"
"os"
...
...
@@ -84,12 +83,6 @@ func CurrentOwner() *Owner {
}
}
// VerboseTest returns true if the testing framework is run with -v.
func
VerboseTest
()
bool
{
flag
:=
flag
.
Lookup
(
"test.v"
)
return
flag
!=
nil
&&
flag
.
Value
.
String
()
==
"true"
}
func
init
()
{
p
:=
syscall
.
Getpagesize
()
if
p
!=
PAGESIZE
{
...
...
fuse/nodefs/memnode_test.go
View file @
2f786397
...
...
@@ -31,14 +31,14 @@ func setupMemNodeTest(t *testing.T) (wd string, fs FileSystem, clean func()) {
AttrTimeout
:
testTtl
,
NegativeTimeout
:
0.0
,
})
connector
.
SetDebug
(
fuse
.
VerboseTest
())
connector
.
SetDebug
(
VerboseTest
())
state
,
err
:=
fuse
.
NewServer
(
connector
.
RawFS
(),
mnt
,
nil
)
if
err
!=
nil
{
t
.
Fatal
(
"NewServer"
,
err
)
}
//me.state.SetDebug(false)
state
.
SetDebug
(
fuse
.
VerboseTest
())
state
.
SetDebug
(
VerboseTest
())
// Unthreaded, but in background.
go
state
.
Serve
()
...
...
fuse/pathfs/xattr_test.go
View file @
2f786397
...
...
@@ -119,7 +119,7 @@ func xattrTestCase(t *testing.T, nm string) (mountPoint string, cleanup func())
if
err
!=
nil
{
t
.
Fatalf
(
"TempDir failed: %v"
,
err
)
}
state
.
SetDebug
(
fuse
.
VerboseTest
())
state
.
SetDebug
(
VerboseTest
())
go
state
.
Serve
()
return
mountPoint
,
func
()
{
...
...
fuse/test/cache_test.go
View file @
2f786397
...
...
@@ -3,7 +3,6 @@ package test
import
(
"bytes"
"io/ioutil"
"log"
"os"
"sync"
"testing"
...
...
@@ -14,8 +13,6 @@ import (
"github.com/hanwen/go-fuse/raw"
)
var
_
=
log
.
Println
type
cacheFs
struct
{
pathfs
.
FileSystem
}
...
...
@@ -48,9 +45,9 @@ func setupCacheTest(t *testing.T) (string, *pathfs.PathNodeFs, func()) {
if
err
!=
nil
{
t
.
Fatalf
(
"MountNodeFileSystem failed: %v"
,
err
)
}
state
.
SetDebug
(
fuse
.
VerboseTest
())
conn
.
SetDebug
(
fuse
.
VerboseTest
())
pfs
.
SetDebug
(
fuse
.
VerboseTest
())
state
.
SetDebug
(
VerboseTest
())
conn
.
SetDebug
(
VerboseTest
())
pfs
.
SetDebug
(
VerboseTest
())
go
state
.
Serve
()
return
dir
,
pfs
,
func
()
{
...
...
@@ -148,7 +145,7 @@ func TestNonseekable(t *testing.T) {
if
err
!=
nil
{
t
.
Fatalf
(
"failed: %v"
,
err
)
}
state
.
SetDebug
(
fuse
.
VerboseTest
())
state
.
SetDebug
(
VerboseTest
())
defer
state
.
Unmount
()
go
state
.
Serve
()
...
...
@@ -182,9 +179,9 @@ func TestGetAttrRace(t *testing.T) {
if
err
!=
nil
{
t
.
Fatalf
(
"MountNodeFileSystem failed: %v"
,
err
)
}
state
.
SetDebug
(
fuse
.
VerboseTest
())
conn
.
SetDebug
(
fuse
.
VerboseTest
())
pfs
.
SetDebug
(
fuse
.
VerboseTest
())
state
.
SetDebug
(
VerboseTest
())
conn
.
SetDebug
(
VerboseTest
())
pfs
.
SetDebug
(
VerboseTest
())
go
state
.
Serve
()
defer
state
.
Unmount
()
...
...
fuse/test/defaultread_test.go
View file @
2f786397
...
...
@@ -45,7 +45,7 @@ func defaultReadTest(t *testing.T) (root string, cleanup func()) {
if
err
!=
nil
{
t
.
Fatalf
(
"MountNodeFileSystem failed: %v"
,
err
)
}
state
.
SetDebug
(
fuse
.
VerboseTest
())
state
.
SetDebug
(
VerboseTest
())
go
state
.
Serve
()
return
dir
,
func
()
{
...
...
fuse/test/delete_test.go
View file @
2f786397
...
...
@@ -47,7 +47,7 @@ func TestDeleteNotify(t *testing.T) {
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
state
.
SetDebug
(
fuse
.
VerboseTest
())
state
.
SetDebug
(
VerboseTest
())
go
state
.
Serve
()
defer
state
.
Unmount
()
...
...
fuse/test/fsetattr_test.go
View file @
2f786397
...
...
@@ -143,7 +143,7 @@ func setupFAttrTest(t *testing.T, fs pathfs.FileSystem) (dir string, clean func(
if
err
!=
nil
{
t
.
Fatalf
(
"MountNodeFileSystem failed: %v"
,
err
)
}
state
.
SetDebug
(
fuse
.
VerboseTest
())
state
.
SetDebug
(
VerboseTest
())
go
state
.
Serve
()
...
...
fuse/test/loopback_test.go
View file @
2f786397
...
...
@@ -84,14 +84,14 @@ func NewTestCase(t *testing.T) *testCase {
AttrTimeout
:
testTtl
,
NegativeTimeout
:
0.0
,
})
me
.
connector
.
SetDebug
(
fuse
.
VerboseTest
())
me
.
connector
.
SetDebug
(
VerboseTest
())
me
.
state
,
err
=
fuse
.
NewServer
(
me
.
connector
.
RawFS
(),
me
.
mnt
,
&
fuse
.
MountOptions
{
SingleThreaded
:
true
})
if
err
!=
nil
{
t
.
Fatal
(
"NewServer:"
,
err
)
}
me
.
state
.
SetDebug
(
fuse
.
VerboseTest
())
me
.
state
.
SetDebug
(
VerboseTest
())
// Unthreaded, but in background.
go
me
.
state
.
Serve
()
...
...
fuse/test/notify_test.go
View file @
2f786397
...
...
@@ -91,7 +91,7 @@ func NewNotifyTest(t *testing.T) *NotifyTest {
if
err
!=
nil
{
t
.
Fatalf
(
"MountNodeFileSystem failed: %v"
,
err
)
}
me
.
state
.
SetDebug
(
fuse
.
VerboseTest
())
me
.
state
.
SetDebug
(
VerboseTest
())
go
me
.
state
.
Serve
()
return
me
...
...
raw/print.go
View file @
2f786397
...
...
@@ -148,7 +148,7 @@ func (me *OpenOut) string() string {
FlagString
(
FuseOpenFlagNames
,
int64
(
me
.
OpenFlags
),
""
))
}
func
(
me
*
InitIn
)
s
tring
()
string
{
func
(
me
*
InitIn
)
S
tring
()
string
{
return
fmt
.
Sprintf
(
"{%d.%d Ra 0x%x %s}"
,
me
.
Major
,
me
.
Minor
,
me
.
MaxReadAhead
,
FlagString
(
initFlagNames
,
int64
(
me
.
Flags
),
""
))
...
...
unionfs/autounion_test.go
View file @
2f786397
...
...
@@ -61,8 +61,8 @@ func setup(t *testing.T) (workdir string, cleanup func()) {
if
err
!=
nil
{
t
.
Fatalf
(
"MountNodeFileSystem failed: %v"
,
err
)
}
state
.
SetDebug
(
fuse
.
VerboseTest
())
conn
.
SetDebug
(
fuse
.
VerboseTest
())
state
.
SetDebug
(
VerboseTest
())
conn
.
SetDebug
(
VerboseTest
())
go
state
.
Serve
()
return
wd
,
func
()
{
...
...
@@ -82,7 +82,6 @@ func TestDebug(t *testing.T) {
if
len
(
c
)
==
0
{
t
.
Fatal
(
"No debug found."
)
}
log
.
Println
(
"Found version:"
,
string
(
c
))
}
func
TestVersion
(
t
*
testing
.
T
)
{
...
...
unionfs/unionfs_test.go
View file @
2f786397
...
...
@@ -98,8 +98,8 @@ func setupUfs(t *testing.T) (workdir string, cleanup func()) {
if
err
!=
nil
{
t
.
Fatalf
(
"MountNodeFileSystem failed: %v"
,
err
)
}
conn
.
SetDebug
(
fuse
.
VerboseTest
())
state
.
SetDebug
(
fuse
.
VerboseTest
())
conn
.
SetDebug
(
VerboseTest
())
state
.
SetDebug
(
VerboseTest
())
go
state
.
Serve
()
return
wd
,
func
()
{
...
...
@@ -1161,7 +1161,7 @@ func TestUnionFsDisappearing(t *testing.T) {
t
.
Fatalf
(
"MountNodeFileSystem failed: %v"
,
err
)
}
defer
state
.
Unmount
()
state
.
SetDebug
(
fuse
.
VerboseTest
())
state
.
SetDebug
(
VerboseTest
())
go
state
.
Serve
()
log
.
Println
(
"TestUnionFsDisappearing2"
)
...
...
zipfs/multizip_test.go
View file @
2f786397
package
zipfs
import
(
"flag"
"io/ioutil"
"log"
"os"
"testing"
"time"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/fuse/nodefs"
"github.com/hanwen/go-fuse/fuse/pathfs"
)
var
_
=
log
.
Printf
// VerboseTest returns true if the testing framework is run with -v.
func
VerboseTest
()
bool
{
flag
:=
flag
.
Lookup
(
"test.v"
)
return
flag
!=
nil
&&
flag
.
Value
.
String
()
==
"true"
}
const
testTtl
=
100
*
time
.
Millisecond
...
...
@@ -28,7 +31,7 @@ func setupMzfs(t *testing.T) (mountPoint string, cleanup func()) {
if
err
!=
nil
{
t
.
Fatalf
(
"MountNodeFileSystem failed: %v"
,
err
)
}
state
.
SetDebug
(
fuse
.
VerboseTest
())
state
.
SetDebug
(
VerboseTest
())
go
state
.
Serve
()
return
mountPoint
,
func
()
{
...
...
zipfs/zipfs_test.go
View file @
2f786397
...
...
@@ -29,7 +29,7 @@ func setupZipfs(t *testing.T) (mountPoint string, cleanup func()) {
mountPoint
,
_
=
ioutil
.
TempDir
(
""
,
""
)
state
,
_
,
err
:=
nodefs
.
MountFileSystem
(
mountPoint
,
zfs
,
nil
)
state
.
SetDebug
(
fuse
.
VerboseTest
())
state
.
SetDebug
(
VerboseTest
())
go
state
.
Serve
()
return
mountPoint
,
func
()
{
...
...
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