golang/go

testing/fstest: test that ReadDir on file returns error, or returns 0 entries if file is empty

Open

#44,967 opened on 2021年3月12日

GitHub で見る
 (17 comments) (0 reactions) (0 assignees)Go (19,008 forks)batch import
NeedsFixhelp wanted

Repository metrics

Stars
 (133,883 stars)
PR merge metrics
 (30d に merged PR はありません)

説明

The Plan 9 builders are consistently failing on the new check added to testing/fstest.TestFS in CL 296391

--- FAIL: TestDirFS (0.07s)
    os_test.go:2720: TestFS found errors:
        a: ReadDir of non-dir file should return an error
        b: ReadDir of non-dir file should return an error
        dir/x: ReadDir of non-dir file should return an error
FAIL
FAIL	os	9.258s

2021-03-12T02:56:04-e8b8278/plan9-arm 2021-03-12T02:30:33-e87c4bb/plan9-arm 2021-03-12T01:47:01-a607408/plan9-arm 2021-03-12T00:52:00-71a6c13/plan9-arm 2021-03-11T21:43:04-7fc638d/plan9-arm 2021-03-11T20:46:21-b3896fc/plan9-arm 2021-03-11T20:01:00-4dd9c7c/plan9-arm 2021-03-11T19:11:46-43d5f21/plan9-arm 2021-03-11T19:04:42-b0733ba/plan9-386-0intro 2021-03-11T19:04:42-b0733ba/plan9-arm 2021-03-11T19:00:06-64d323f/plan9-arm 2021-03-11T18:50:12-ae9cd12/plan9-arm 2021-03-11T18:25:50-86d6678/plan9-386-0intro 2021-03-11T18:25:50-86d6678/plan9-arm 2021-03-11T18:25:41-1853411/plan9-arm

It's not obvious to me whether this is a defect in the os implementation of ReadDir on Plan 9, or an overly-optimistic assertion in testing/fstest.TestFS.

CC @josharian @rsc @ianlancetaylor @fhs @millerresearch @0intro

コントリビューターガイド