testing: Verbose test output has cpu number appended to test name because of GOMAXPROCS default change in Go 1.5; the number lacks an explanation/source/unit #11200
Comments
I am unhappy about this change, too, but am unsure what to do about it. |
Rob, do you see any harm in changing Line 550 in fddc3ca That would at least make it a bit clearer where that number is coming from... |
Can the |
Theoretically yes, but in case a test fails on one machine and doesn't on another it can take ages to nail it down to a different default GOMAXPROCS value. So I personally would keep |
How about I send a change? Maybe that makes discussing this issue easier... ;-) |
Please don't yet. |
Perhaps the GOMAXPROCS value could be in a parenthetical beside the test It might make remote debugging (via mail or otherwise) easier. On 14 June 2015 at 13:24, Rob Pike notifications@github.com wrote:
|
@robpike Alrighty. My intention for this bug was to fix this Go 1.5 specific issue before Go 1.5 is released. So I only had a very small change in mind... @adg Great idea but shouldn't this be a separate bug? IMHO details like |
We should probably drop the suffix from the test names. We should keep the suffix in benchmark names. We should not change the suffix for benchmark names. |
Thanks for the fix, Rob. I just hope that broken tests because of the GOMAXPROCS default change, like #11157, aren't too common. |
With Go 1.5 the default GOMAXPROCS value has changed:
https://docs.google.com/document/d/1At2Ls5_fhJQ59kDK2DFVhFu3g5mATSXqqV5QrxinasI/preview?sle=true
With Go 1.4.2 tests always ran with
GOMAXPROCS=1
unless someone used the-cpu
command line parameter. This resulted in stable verbose test output like this one:With Go 1.5 the verbose test output has a number appended to the test name:
Some users could wonder where this appended number is coming from...
Explanation:
The additional
-4
in my verbose test output is becauseGOMAXPROCS
is set to4
on my quad-core machine. On a different machine with a different CPU countGOMAXPROCS
would be different and hence the test name would be different.Possible fix:
We could change the test name to something more understandable. I would prefer
TestExample-4Procs
overTestExample-4
to make clear that the test ran withGOMAXPROCS=4
. I'm happy to send a patch.Source code location:
https://github.com/golang/go/blob/fddc3ca11c38b063cb24e14d99cc023e746d0e20/src/testing/testing.go#L548-551
The text was updated successfully, but these errors were encountered: