go/src/testing
Austin Clements 0c5afc4fb7 testing/fstest,os: clarify racy behavior of TestFS
The testing.TestFS function assumes that the file system it's testing
doesn't change under it. Clarify this in the documentation and fix the
use of os.TestDirFS that's currently susceptible to this race.

Fixes #42637.

Change-Id: Ia7792380726177f8953d150ee87381b66cb01cb3
Reviewed-on: https://go-review.googlesource.com/c/go/+/282452
Trust: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2021-01-08 16:34:00 +00:00
..
fstest testing/fstest,os: clarify racy behavior of TestFS 2021-01-08 16:34:00 +00:00
internal/testdeps cmd/go, testing, os: fail test that calls os.Exit(0) 2020-08-27 23:19:15 +00:00
iotest all: update references to symbols moved from io/ioutil to io 2020-10-20 18:41:18 +00:00
quick all: shorten some tests 2019-05-22 12:54:00 +00:00
allocs.go
allocs_test.go
benchmark.go testing: increase benchmark output to four significant figures 2020-11-07 22:38:01 +00:00
benchmark_test.go testing: increase benchmark output to four significant figures 2020-11-07 22:38:01 +00:00
cover.go testing/cover: improve message when a package has no statements 2019-03-13 04:11:58 +00:00
example.go testing: fail Example tests that invoke runtime.Goexit 2020-09-01 20:13:34 +00:00
export_test.go testing: stop rounding b.N 2019-03-20 21:19:16 +00:00
helper_test.go testing: add benchmark for TB.Helper 2020-09-28 20:51:39 +00:00
helperfuncs_test.go testing: fix reported caller name for funcs passed to Cleanup 2020-05-05 22:44:36 +00:00
match.go testing: fix typo mistake 2018-04-27 13:29:12 +00:00
match_test.go
panic_test.go testing: don't run Cleanup functions until parallel subtests complete 2020-01-16 21:32:12 +00:00
run_example.go testing: fail Example tests that invoke runtime.Goexit 2020-09-01 20:13:34 +00:00
run_example_js.go testing: fail Example tests that invoke runtime.Goexit 2020-09-01 20:13:34 +00:00
sub_test.go testing: flush test summaries to stdout atomically when streaming output 2020-09-02 14:22:42 +00:00
testing.go all: update to use os.ReadFile, os.WriteFile, os.CreateTemp, os.MkdirTemp 2020-12-09 19:12:23 +00:00
testing_test.go all: update to use os.ReadDir where appropriate 2020-12-09 19:12:27 +00:00