posixtest

package
v2.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2022 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package posixtest file systems for generic posix conformance.

Index

Constants

This section is empty.

Variables

View Source
var All = map[string]func(*testing.T, string){
	"AppendWrite":                AppendWrite,
	"SymlinkReadlink":            SymlinkReadlink,
	"FileBasic":                  FileBasic,
	"TruncateFile":               TruncateFile,
	"TruncateNoFile":             TruncateNoFile,
	"FdLeak":                     FdLeak,
	"MkdirRmdir":                 MkdirRmdir,
	"NlinkZero":                  NlinkZero,
	"FstatDeleted":               FstatDeleted,
	"ParallelFileOpen":           ParallelFileOpen,
	"Link":                       Link,
	"LinkUnlinkRename":           LinkUnlinkRename,
	"RenameOverwriteDestNoExist": RenameOverwriteDestNoExist,
	"RenameOverwriteDestExist":   RenameOverwriteDestExist,
	"RenameOpenDir":              RenameOpenDir,
	"ReadDir":                    ReadDir,
	"ReadDirPicksUpCreate":       ReadDirPicksUpCreate,
	"DirectIO":                   DirectIO,
	"OpenAt":                     OpenAt,
	"Fallocate":                  Fallocate,
	"DirSeek":                    DirSeek,
}

All holds a map of all test functions

Functions

func AppendWrite

func AppendWrite(t *testing.T, mnt string)

test open with O_APPEND

func DirSeek

func DirSeek(t *testing.T, mnt string)

DirSeek tests that seeking on a directory works for https://github.com/CalebQ42/go-fuse/issues/344 .

Go port of xfstests generic/257.

Hint: $ go test ./fs -run TestPosix/DirSeek -v

func DirectIO

func DirectIO(t *testing.T, mnt string)

func Fallocate

func Fallocate(t *testing.T, mnt string)

func FdLeak

func FdLeak(t *testing.T, mnt string)

func FileBasic

func FileBasic(t *testing.T, mnt string)

func FstatDeleted

func FstatDeleted(t *testing.T, mnt string)

FstatDeleted is similar to NlinkZero, but Fstat()s multiple deleted files in random order and checks that the results match an earlier Stat().

Excercises the fd-finding logic in rawBridge.GetAttr.

func Link(t *testing.T, mnt string)

func LinkUnlinkRename

func LinkUnlinkRename(t *testing.T, mnt string)

LinkUnlinkRename implements rename with a link/unlink sequence

func MkdirRmdir

func MkdirRmdir(t *testing.T, mnt string)

func NlinkZero

func NlinkZero(t *testing.T, mnt string)

func OpenAt

func OpenAt(t *testing.T, mnt string)

OpenAt tests syscall.Openat().

Hint: $ go test ./fs -run TestPosix/OpenAt -v

func ParallelFileOpen

func ParallelFileOpen(t *testing.T, mnt string)

func ReadDir

func ReadDir(t *testing.T, mnt string)

ReadDir creates 110 files one by one, checking that we get the expected entries after each file creation.

func ReadDirPicksUpCreate

func ReadDirPicksUpCreate(t *testing.T, mnt string)

Readdir should pick file created after open, but before readdir.

func RenameOpenDir

func RenameOpenDir(t *testing.T, mnt string)

func RenameOverwrite

func RenameOverwrite(t *testing.T, mnt string, destExists bool)

func RenameOverwriteDestExist

func RenameOverwriteDestExist(t *testing.T, mnt string)

func RenameOverwriteDestNoExist

func RenameOverwriteDestNoExist(t *testing.T, mnt string)
func SymlinkReadlink(t *testing.T, mnt string)

SymlinkReadlink tests basic symlink functionality

func TruncateFile

func TruncateFile(t *testing.T, mnt string)

func TruncateNoFile

func TruncateNoFile(t *testing.T, mnt string)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL