silkeh opened this issue
Apr 18, 2022
· 4 comments
Labels
NeedsFixThe path to resolution is known, but the work has not been done.TestingAn issue that has been verified to require only test changes, not just a test failure.
$HOME/Development/go/go/bin/go test os -run TestHostname -v
Note that hostname is located at /usr/bin/hostname.
What did you expect to see?
$HOME/Development/go/go/bin/go test os -run TestHostname -v
=== RUN TestHostname
--- PASS: TestHostname (0.00s)
PASS
ok os 0.003s
What did you see instead?
=== RUN TestHostname
os_test.go:1687: skipping test; test requires /bin/hostname but it does not exist
--- SKIP: TestHostname (0.00s)
PASS
ok os 0.002s
This is caused by hostname being hardcoded as /bin/hostname (see here).
The text was updated successfully, but these errors were encountered:
Which system doesn't have /bin/hostname? A skip isn't a terrible outcome, at least. (A failure would be more concerning.)
My systems (running Solus) have hostname installed in /usr/bin, which seems valid to me. I agree that a skip isn't a terrible outcome, but I also think the test should check PATH for the location of hostname instead of having /bin/hostname hardcoded (see linked patch).
dmitshur
added
NeedsFix
The path to resolution is known, but the work has not been done.
Testing
An issue that has been verified to require only test changes, not just a test failure.
and removed
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
labels
May 18, 2022
NeedsFixThe path to resolution is known, but the work has not been done.TestingAn issue that has been verified to require only test changes, not just a test failure.
5 participants
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Run the
TestHostname
test for the OS package:Note that
hostname
is located at/usr/bin/hostname
.What did you expect to see?
What did you see instead?
This is caused by
hostname
being hardcoded as/bin/hostname
(see here).The text was updated successfully, but these errors were encountered: