posixtest

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: BSD-3-Clause Imports: 14 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,
	"LseekHoleSeeksToEOF":        LseekHoleSeeksToEOF,
	"LseekEnxioCheck":            LseekEnxioCheck,
	"RenameOverwriteDestNoExist": RenameOverwriteDestNoExist,
	"RenameOverwriteDestExist":   RenameOverwriteDestExist,
	"RenameOpenDir":              RenameOpenDir,
	"ReadDir":                    ReadDir,
	"ReadDirPicksUpCreate":       ReadDirPicksUpCreate,
	"DirectIO":                   DirectIO,
	"OpenAt":                     OpenAt,
	"Fallocate":                  Fallocate,
	"DirSeek":                    DirSeek,
	"FcntlFlockSetLk":            FcntlFlockSetLk,
	"FcntlFlockLocksFile":        FcntlFlockLocksFile,
}

All holds a map of all test functions

Functions

func AppendWrite added in v2.0.3

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

test open with O_APPEND

func DirSeek added in v2.1.0

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

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

Go port of xfstests generic/257.

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

func DirectIO added in v2.0.3

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

func Fallocate added in v2.0.3

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

func FcntlFlockLocksFile added in v2.3.0

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

func FcntlFlockSetLk added in v2.3.0

func FcntlFlockSetLk(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 added in v2.0.3

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 added in v2.0.3

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

LinkUnlinkRename implements rename with a link/unlink sequence

func LseekEnxioCheck added in v2.4.1

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

func LseekHoleSeeksToEOF added in v2.3.0

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

func MkdirRmdir

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

func NlinkZero

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

func OpenAt added in v2.0.3

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 added in v2.0.3

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

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

func RenameOpenDir added in v2.0.3

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