Commit fb70a9f3 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

posixtest: export list of tests

parent e8bb4a00
......@@ -19,6 +19,21 @@ import (
"github.com/hanwen/go-fuse/fuse"
)
var All = map[string]func(*testing.T, string){
"SymlinkReadlink": SymlinkReadlink,
"FileBasic": FileBasic,
"TruncateFile": TruncateFile,
"TruncateNoFile": TruncateNoFile,
"FdLeak": FdLeak,
"MkdirRmdir": MkdirRmdir,
"NlinkZero": NlinkZero,
"ParallelFileOpen": ParallelFileOpen,
"Link": Link,
"RenameOverwriteDestNoExist": RenameOverwriteDestNoExist,
"RenameOverwriteDestExist": RenameOverwriteDestExist,
"ReadDir": ReadDir,
}
// SymlinkReadlink tests basic symlink functionality
func SymlinkReadlink(t *testing.T, mnt string) {
err := os.Symlink("/foobar", mnt+"/link")
......@@ -252,6 +267,14 @@ func Link(t *testing.T, mnt string) {
}
}
func RenameOverwriteDestNoExist(t *testing.T, mnt string) {
RenameOverwrite(t, mnt, false)
}
func RenameOverwriteDestExist(t *testing.T, mnt string) {
RenameOverwrite(t, mnt, true)
}
func RenameOverwrite(t *testing.T, mnt string, destExists bool) {
if err := os.Mkdir(mnt+"/dir", 0755); err != nil {
t.Fatalf("Mkdir: %v", err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment