testing/fstest: fix function name and comment

Change-Id: I17bc68a2e3a96d0dc3d9ddcad40149df37fc4839
Reviewed-on: https://go-review.googlesource.com/c/go/+/642198
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
This commit is contained in:
cuishuang 2025-01-14 01:11:22 +08:00 committed by Gopher Robot
parent c83f2ca4b3
commit befc43655b

View file

@ -570,7 +570,7 @@ func (t *fsTester) checkFileRead(file, desc string, data1, data2 []byte) {
} }
} }
// checkBadPath checks that various invalid forms of file's name cannot be opened using t.fsys.Open. // checkOpen validates file opening behavior by attempting to open and then close the given file path.
func (t *fsTester) checkOpen(file string) { func (t *fsTester) checkOpen(file string) {
t.checkBadPath(file, "Open", func(file string) error { t.checkBadPath(file, "Open", func(file string) error {
f, err := t.fsys.Open(file) f, err := t.fsys.Open(file)