fusetesting

package
v0.0.0-...-4a6429e Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BirthtimeIsWithin

func BirthtimeIsWithin(
	expected time.Time,
	d time.Duration) oglematchers.Matcher

Match os.FileInfo values that specify a file birth time within the supplied radius of the given time. On platforms where there is no birth time available, match all os.FileInfo values.

func GetTimes

func GetTimes(fi os.FileInfo) (atime, ctime, mtime time.Time)

Extract time information from the supplied file info. Panic on platforms where this is not possible.

func MtimeIs

func MtimeIs(expected time.Time) oglematchers.Matcher

Match os.FileInfo values that specify an mtime equal to the given time.

func MtimeIsWithin

func MtimeIsWithin(expected time.Time, d time.Duration) oglematchers.Matcher

Like MtimeIs, but allows for a tolerance.

func NlinkIs

func NlinkIs(expected uint64) oglematchers.Matcher

Match os.FileInfo values that specify a number of links equal to the given number. On platforms where there is no nlink field available, match all os.FileInfo values.

func ReadDirPicky

func ReadDirPicky(dirname string) (entries []os.FileInfo, err error)

Read the directory with the given name and return a list of directory entries, sorted by name.

Unlike ioutil.ReadDir (cf. http://goo.gl/i0nNP4), this function does not silently ignore "file not found" errors when stat'ing the names read from the directory.

func RunCreateInParallelTest_Exclusive

func RunCreateInParallelTest_Exclusive(
	ctx context.Context,
	dir string)

Run an ogletest test that checks expectations for parallel calls to open(2) with O_CREAT|O_EXCL.

func RunCreateInParallelTest_NoTruncate

func RunCreateInParallelTest_NoTruncate(
	ctx context.Context,
	dir string)

Run an ogletest test that checks expectations for parallel calls to open(2) with O_CREAT.

func RunCreateInParallelTest_Truncate

func RunCreateInParallelTest_Truncate(
	ctx context.Context,
	dir string)

Run an ogletest test that checks expectations for parallel calls to open(2) with O_CREAT|O_TRUNC.

func RunHardlinkInParallelTest

func RunHardlinkInParallelTest(
	ctx context.Context,
	dir string)

Run an ogletest test that checks expectations for parallel calls to link(2).

func RunMkdirInParallelTest

func RunMkdirInParallelTest(
	ctx context.Context,
	dir string)

Run an ogletest test that checks expectations for parallel calls to mkdir(2).

func RunSymlinkInParallelTest

func RunSymlinkInParallelTest(
	ctx context.Context,
	dir string)

Run an ogletest test that checks expectations for parallel calls to symlink(2).

Types

This section is empty.

Jump to

Keyboard shortcuts

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