go/src/os/os_test.go

func TestMain(m *testing.M) {}

var dot

type sysDir

var sysdir

func size(name string, t *testing.T) int64 {}

func equal(name1, name2 string) (r bool) {}

func newFile(t *testing.T) (f *File) {}

var sfdir

var sfname

func TestStat(t *testing.T) {}

func TestStatError(t *testing.T) {}

func TestStatSymlinkLoop(t *testing.T) {}

func TestFstat(t *testing.T) {}

func TestLstat(t *testing.T) {}

// Read with length 0 should not return EOF.
func TestRead0(t *testing.T) {}

// Reading a closed file should return ErrClosed error
func TestReadClosed(t *testing.T) {}

func testReaddirnames(dir string, contents []string) func(*testing.T) {}

func testReaddir(dir string, contents []string) func(*testing.T) {}

func testReadDir(dir string, contents []string) func(*testing.T) {}

func TestFileReaddirnames(t *testing.T) {}

func TestFileReaddir(t *testing.T) {}

func TestFileReadDir(t *testing.T) {}

func benchmarkReaddirname(path string, b *testing.B) {}

func benchmarkReaddir(path string, b *testing.B) {}

func benchmarkReadDir(path string, b *testing.B) {}

func BenchmarkReaddirname(b *testing.B) {}

func BenchmarkReaddir(b *testing.B) {}

func BenchmarkReadDir(b *testing.B) {}

func benchmarkStat(b *testing.B, path string) {}

func benchmarkLstat(b *testing.B, path string) {}

func BenchmarkStatDot(b *testing.B) {}

func BenchmarkStatFile(b *testing.B) {}

func BenchmarkStatDir(b *testing.B) {}

func BenchmarkLstatDot(b *testing.B) {}

func BenchmarkLstatFile(b *testing.B) {}

func BenchmarkLstatDir(b *testing.B) {}

// Read the directory one entry at a time.
func smallReaddirnames(file *File, length int, t *testing.T) []string {}

// Check that reading a directory one entry at a time gives the same result
// as reading it all at once.
func TestReaddirnamesOneAtATime(t *testing.T) {}

func TestReaddirNValues(t *testing.T) {}

func touch(t *testing.T, name string) {}

func TestReaddirStatFailures(t *testing.T) {}

// Readdir on a regular file should fail.
func TestReaddirOfFile(t *testing.T) {}

func TestHardLink(t *testing.T) {}

func TestSymlink(t *testing.T) {}

func TestLongSymlink(t *testing.T) {}

func TestRename(t *testing.T) {}

func TestRenameOverwriteDest(t *testing.T) {}

func TestRenameFailed(t *testing.T) {}

func TestRenameNotExisting(t *testing.T) {}

func TestRenameToDirFailed(t *testing.T) {}

func TestRenameCaseDifference(pt *testing.T) {}

func testStartProcess(dir, cmd string, args []string, expect string) func(t *testing.T) {}

func TestStartProcess(t *testing.T) {}

func checkMode(t *testing.T, path string, mode FileMode) {}

func TestChmod(t *testing.T) {}

func checkSize(t *testing.T, f *File, size int64) {}

func TestFTruncate(t *testing.T) {}

func TestTruncate(t *testing.T) {}

func TestTruncateNonexistentFile(t *testing.T) {}

var hasNoatime

func TestChtimes(t *testing.T) {}

func TestChtimesOmit(t *testing.T) {}

func testChtimesOmit(t *testing.T, omitAt, omitMt bool) {}

func TestChtimesDir(t *testing.T) {}

func testChtimes(t *testing.T, name string) {}

func TestChtimesToUnixZero(t *testing.T) {}

func TestFileChdir(t *testing.T) {}

func TestChdirAndGetwd(t *testing.T) {}

// Test that Chdir+Getwd is program-wide.
func TestProgWideChdir(t *testing.T) {}

func TestSeek(t *testing.T) {}

func TestSeekError(t *testing.T) {}

func TestOpenError(t *testing.T) {}

func TestOpenNoName(t *testing.T) {}

func runBinHostname(t *testing.T) string {}

func testWindowsHostname(t *testing.T, hostname string) {}

func TestHostname(t *testing.T) {}

func TestReadAt(t *testing.T) {}

// Verify that ReadAt doesn't affect seek offset.
// In the Plan 9 kernel, there used to be a bug in the implementation of
// the pread syscall, where the channel offset was erroneously updated after
// calling pread on a file.
func TestReadAtOffset(t *testing.T) {}

// Verify that ReadAt doesn't allow negative offset.
func TestReadAtNegativeOffset(t *testing.T) {}

func TestWriteAt(t *testing.T) {}

// Verify that WriteAt doesn't allow negative offset.
func TestWriteAtNegativeOffset(t *testing.T) {}

// Verify that WriteAt doesn't work in append mode.
func TestWriteAtInAppendMode(t *testing.T) {}

func writeFile(t *testing.T, fname string, flag int, text string) string {}

func TestAppend(t *testing.T) {}

func TestStatDirWithTrailingSlash(t *testing.T) {}

func TestNilProcessStateString(t *testing.T) {}

func TestSameFile(t *testing.T) {}

func testDevNullFileInfo(t *testing.T, statname, devNullName string, fi FileInfo) {}

func testDevNullFile(t *testing.T, devNullName string) {}

func TestDevNullFile(t *testing.T) {}

var testLargeWrite

func TestLargeWriteToConsole(t *testing.T) {}

func TestStatDirModeExec(t *testing.T) {}

func TestStatStdin(t *testing.T) {}

func TestStatRelativeSymlink(t *testing.T) {}

func TestReadAtEOF(t *testing.T) {}

func TestLongPath(t *testing.T) {}

func testKillProcess(t *testing.T, processKiller func(p *Process)) {}

func TestKillStartProcess(t *testing.T) {}

func TestGetppid(t *testing.T) {}

func TestKillFindProcess(t *testing.T) {}

var nilFileMethodTests

// Test that all File methods give ErrInvalid if the receiver is nil.
func TestNilFileMethods(t *testing.T) {}

func mkdirTree(t *testing.T, root string, level, max int) {}

// Test that simultaneous RemoveAll do not report an error.
// As long as it gets removed, we should be happy.
func TestRemoveAllRace(t *testing.T) {}

// Test that reading from a pipe doesn't use up a thread.
func TestPipeThreads(t *testing.T) {}

func testDoubleCloseError(path string) func(*testing.T) {}

func TestDoubleCloseError(t *testing.T) {}

func TestUserCacheDir(t *testing.T) {}

func TestUserCacheDirXDGConfigDirEnvVar(t *testing.T) {}

func TestUserConfigDir(t *testing.T) {}

func TestUserConfigDirXDGConfigDirEnvVar(t *testing.T) {}

func TestUserHomeDir(t *testing.T) {}

func TestDirSeek(t *testing.T) {}

func TestReaddirSmallSeek(t *testing.T) {}

// isDeadlineExceeded reports whether err is or wraps ErrDeadlineExceeded.
// We also check that the error has a Timeout method that returns true.
func isDeadlineExceeded(err error) bool {}

// Test that opening a file does not change its permissions.  Issue 38225.
func TestOpenFileKeepsPermissions(t *testing.T) {}

func forceMFTUpdateOnWindows(t *testing.T, path string) {}

func TestDirFS(t *testing.T) {}

func TestDirFSRootDir(t *testing.T) {}

func TestDirFSEmptyDir(t *testing.T) {}

func TestDirFSPathsValid(t *testing.T) {}

func TestReadFileProc(t *testing.T) {}

func TestDirFSReadFileProc(t *testing.T) {}

func TestWriteStringAlloc(t *testing.T) {}

// Test that it's OK to have parallel I/O and Close on a pipe.
func TestPipeIOCloseRace(t *testing.T) {}

// Test that it's OK to call Close concurrently on a pipe.
func TestPipeCloseRace(t *testing.T) {}

func TestRandomLen(t *testing.T) {}

func TestCopyFS(t *testing.T) {}

// verifyCopyFS checks the content and permission of each file inside copied FS to ensure
// the copied files satisfy the convention stipulated in CopyFS.
func verifyCopyFS(t *testing.T, originFS, copiedFS fs.FS) error {}

func TestCopyFSWithSymlinks(t *testing.T) {}

func TestAppendDoesntOverwrite(t *testing.T) {}