os, syscall: TestHostname and TestStdioAreInheritable get confused if hostname command emits warnings to stderr #52781
Labels
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
OS-Windows
Testing
An issue that has been verified to require only test changes, not just a test failure.
Milestone
This is really minor, but I've observed the following false positives:
They occurred because in that environment the
hostname
command was emitting a warning to stderr, while still reporting the right hostname and exiting with code 0, but the test considered the stderr output to be a part of the hostname.It happened due to an older Cygwin version on a newer Windows (after an upgrade of the latter), though I expect it can happen in other situations and on other OSes too. I think it's sufficient to rely on the command's exit code and ignore its stderr.
I've since resolved the problem in that environment so
hostname
doesn't print that performance warning to stderr, but figured I'll send a CL since the fix is trivial and should make the tests a tiny bit more robust (if I'm not mistaken).The text was updated successfully, but these errors were encountered: