Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(868)

Issue 4529111: testing: Add verification that tests and benchmarks do ... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 11 months ago by dvyukov
Modified:
13 years, 11 months ago
Reviewers:
CC:
rsc, golang-dev
Visibility:
Public.

Description

testing: Add verification that tests and benchmarks do not spoil GOMAXPROCS. Plus fix spoiling of GOMAXPROCS in 2 existing rwmutex tests. Plus fix benchmark output to stdout (now it outputs to stderr like all other output).

Patch Set 1 #

Patch Set 2 : diff -r fa2bae213af8 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r fa2bae213af8 https://go.googlecode.com/hg/ #

Total comments: 2

Patch Set 4 : diff -r 4ecf51671598 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -2 lines) Patch
M src/pkg/sync/rwmutex_test.go View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M src/pkg/testing/benchmark.go View 1 2 3 3 chunks +7 lines, -2 lines 0 comments Download
M src/pkg/testing/testing.go View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 8
dvyukov
13 years, 11 months ago (2011-06-03 12:29:49 UTC) #1
rsc
To save and restore: defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(-1))
13 years, 11 months ago (2011-06-03 15:26:00 UTC) #2
rsc
http://codereview.appspot.com/4529111/diff/1002/src/pkg/testing/benchmark.go File src/pkg/testing/benchmark.go (right): http://codereview.appspot.com/4529111/diff/1002/src/pkg/testing/benchmark.go#newcode199 src/pkg/testing/benchmark.go:199: print("The benchmark changes runtime.GOMAXPROCS\n") if p := runtime.GOMAXPROCS(-1); p ...
13 years, 11 months ago (2011-06-03 15:27:53 UTC) #3
dvyukov
On 2011/06/03 15:26:00, rsc wrote: > To save and restore: > > defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(-1)) Humm... ...
13 years, 11 months ago (2011-06-03 17:29:11 UTC) #4
rsc
> Humm... the first call must occur at function begin, while the second > call ...
13 years, 11 months ago (2011-06-03 17:30:40 UTC) #5
dvyukov
Done. Please review.
13 years, 11 months ago (2011-06-03 17:43:51 UTC) #6
rsc
LGTM Thanks!
13 years, 11 months ago (2011-06-03 17:50:02 UTC) #7
rsc
13 years, 11 months ago (2011-06-03 17:50:48 UTC) #8
*** Submitted as http://code.google.com/p/go/source/detail?r=10b268bedd1b ***

testing: check that tests and benchmarks do not affect GOMAXPROCS

Plus fix spoiling of GOMAXPROCS in 2 existing rwmutex tests.
Plus fix benchmark output to stdout (now it outputs to stderr like all other
output).

R=rsc
CC=golang-dev
http://codereview.appspot.com/4529111

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b