Documentation
¶
Overview ¶
Package posixtest file systems for generic posix conformance.
Index ¶
- Variables
- func AppendWrite(t *testing.T, mnt string)
- func DirSeek(t *testing.T, mnt string)
- func DirectIO(t *testing.T, mnt string)
- func Fallocate(t *testing.T, mnt string)
- func FallocateKeepSize(t *testing.T, mnt string)
- func FcntlFlockLocksFile(t *testing.T, mnt string)
- func FcntlFlockSetLk(t *testing.T, mnt string)
- func FdLeak(t *testing.T, mnt string)
- func FileBasic(t *testing.T, mnt string)
- func FstatDeleted(t *testing.T, mnt string)
- func Link(t *testing.T, mnt string)
- func LinkUnlinkRename(t *testing.T, mnt string)
- func LseekEnxioCheck(t *testing.T, mnt string)
- func LseekHoleSeeksToEOF(t *testing.T, mnt string)
- func MkdirRmdir(t *testing.T, mnt string)
- func NlinkZero(t *testing.T, mnt string)
- func OpenAt(t *testing.T, mnt string)
- func OpenSymlinkRace(t *testing.T, mnt string)
- func ParallelFileOpen(t *testing.T, mnt string)
- func ReadDir(t *testing.T, mnt string)
- func ReadDirConsistency(t *testing.T, mnt string)
- func RenameOpenDir(t *testing.T, mnt string)
- func RenameOverwrite(t *testing.T, mnt string, destExists bool)
- func RenameOverwriteDestExist(t *testing.T, mnt string)
- func RenameOverwriteDestNoExist(t *testing.T, mnt string)
- func SetattrSymlink(t *testing.T, mnt string)
- func SymlinkReadlink(t *testing.T, mnt string)
- func TruncateFile(t *testing.T, mnt string)
- func TruncateNoFile(t *testing.T, mnt string)
- func XAttr(t *testing.T, mntDir string)
Constants ¶
This section is empty.
Variables ¶
var All = map[string]func(*testing.T, string){ "AppendWrite": AppendWrite, "DirSeek": DirSeek, "DirectIO": DirectIO, "Fallocate": Fallocate, "FallocateKeepSize": FallocateKeepSize, "FcntlFlockLocksFile": FcntlFlockLocksFile, "FcntlFlockSetLk": FcntlFlockSetLk, "FdLeak": FdLeak, "FileBasic": FileBasic, "FstatDeleted": FstatDeleted, "Link": Link, "LinkUnlinkRename": LinkUnlinkRename, "LseekEnxioCheck": LseekEnxioCheck, "LseekHoleSeeksToEOF": LseekHoleSeeksToEOF, "MkdirRmdir": MkdirRmdir, "NlinkZero": NlinkZero, "OpenAt": OpenAt, "OpenSymlinkRace": OpenSymlinkRace, "ParallelFileOpen": ParallelFileOpen, "ReadDir": ReadDir, "ReadDirConsistency": ReadDirConsistency, "RenameOpenDir": RenameOpenDir, "RenameOverwriteDestExist": RenameOverwriteDestExist, "RenameOverwriteDestNoExist": RenameOverwriteDestNoExist, "SetattrSymlink": SetattrSymlink, "SymlinkReadlink": SymlinkReadlink, "TruncateFile": TruncateFile, "TruncateNoFile": TruncateNoFile, "XAttr": XAttr, }
All holds a map of all test functions
Functions ¶
func DirSeek ¶
DirSeek tests that seeking on a directory works for https://github.com/4831c0/go-fuse/issues/344 .
Go port of xfstests generic/257.
Hint: $ go test ./fs -run TestPosix/DirSeek -v
func FallocateKeepSize ¶
func FcntlFlockLocksFile ¶
func FcntlFlockSetLk ¶
func FstatDeleted ¶
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 LinkUnlinkRename ¶
LinkUnlinkRename implements rename with a link/unlink sequence
func LseekEnxioCheck ¶
func LseekHoleSeeksToEOF ¶
func MkdirRmdir ¶
func OpenSymlinkRace ¶
Test if Open() is vulnerable to symlink-race attacks using two goroutines:
goroutine "shuffler": In a loop: * Replace empty file "OpenSymlinkRace" with a symlink pointing to /etc/passwd * Replace back with empty file
goroutine "opener": In a loop: * Open "OpenSymlinkRace" and call Fstat on it. Now there's three cases:
- Size=0: we opened the empty file created by shuffler. Normal and uninteresting.
- Size>0 but Dev number different: we (this test) opened /etc/passwd ourselves because we resolved the symlink. Normal.
- Size>0 and Dev number matches the FUSE mount: go-fuse opened /etc/passwd. The attack has worked.
func ParallelFileOpen ¶
func ReadDir ¶
ReadDir creates 110 files one by one, checking that we get the expected entries after each file creation.
func ReadDirConsistency ¶
Creates files, read them back using readdir
func RenameOpenDir ¶
func SetattrSymlink ¶
func SymlinkReadlink ¶
SymlinkReadlink tests basic symlink functionality
func TruncateFile ¶
func TruncateNoFile ¶
Types ¶
This section is empty.