Insufficient test coverage for Stdin::Read
on Windows "console mode"
#93055
Labels
A-code-coverage
Area: Source-based code coverage (-Cinstrument-coverage)
A-io
Area: `std::io`, `std::fs`, `std::net` and `std::path`
C-bug
Category: This is a bug.
E-hard
Call for participation: Hard difficulty. Experience needed to fix: A lot.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
O-windows
Operating system: Windows
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
While implementing #91754, we came across a lack of test coverage for
Stdin::Read
. The function has two code paths, one of which is triggered when input is piped in, and the other is triggered when the user is calling the executable from the console. This "console mode" code path is, as far as I'm able to tell, entirely ignored by automated tests and the CI.I was unable to get anything near automated to actually use the console mode. However, manually feeding it inputs is easy, and has been the main method of testing that code path since the path's creation. This is sub-optimal, and should be remedied.
We have a couple approaches that could be attempted, but I seek larger input from the community, since this is not a trivial problem.
The text was updated successfully, but these errors were encountered: