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

Issue 7545043: code review 7545043: fmt: Skip TestCountMallocs if GOMAXPROCS>1. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 8 months ago by albert.strasheim
Modified:
12 years, 8 months ago
Reviewers:
minux1
CC:
rsc, bradfitz, r, golang-dev
Visibility:
Public.

Description

all: Skip AllocsPerRun tests if GOMAXPROCS>1. Fixes issue 4974.

Patch Set 1 #

Patch Set 2 : diff -r 37d4691df584 https://code.google.com/p/go/ #

Patch Set 3 : diff -r 37d4691df584 https://code.google.com/p/go/ #

Patch Set 4 : diff -r 37d4691df584 https://code.google.com/p/go/ #

Patch Set 5 : diff -r 37d4691df584 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -0 lines) Patch
M src/pkg/encoding/gob/timing_test.go View 1 2 3 3 chunks +9 lines, -0 lines 0 comments Download
M src/pkg/fmt/fmt_test.go View 1 2 chunks +4 lines, -0 lines 0 comments Download
M src/pkg/net/http/header_test.go View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
M src/pkg/net/rpc/server_test.go View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M src/pkg/path/filepath/path_test.go View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M src/pkg/path/path_test.go View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download
M src/pkg/reflect/all_test.go View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
M src/pkg/sort/search_test.go View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
M src/pkg/strconv/strconv_test.go View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
M src/pkg/time/time_test.go View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 10
albert.strasheim
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
12 years, 8 months ago (2013-03-06 23:10:20 UTC) #1
bradfitz
LGTM On Wed, Mar 6, 2013 at 3:10 PM, <fullung@gmail.com> wrote: > Reviewers: rsc, > ...
12 years, 8 months ago (2013-03-06 23:13:15 UTC) #2
r
What about these? src/pkg/encoding/gob/timing_test.go:50:func TestCountEncodeMallocs(t *testing.T) { src/pkg/encoding/gob/timing_test.go:66:func TestCountDecodeMallocs(t *testing.T) { src/pkg/net/http/header_test.go:193:func TestHeaderWriteSubsetMallocs(t *testing.T) { ...
12 years, 8 months ago (2013-03-06 23:13:29 UTC) #3
albert.strasheim
On 2013/03/06 23:13:29, r wrote: > What about these? I'll take a quick look and ...
12 years, 8 months ago (2013-03-06 23:14:37 UTC) #4
albert.strasheim
PTAL I've never seen any of the other ones fail, but I guess it's only ...
12 years, 8 months ago (2013-03-06 23:34:15 UTC) #5
r
LGTM
12 years, 8 months ago (2013-03-06 23:50:09 UTC) #6
r
*** Submitted as https://code.google.com/p/go/source/detail?r=cb98d0bcf923 *** all: Skip AllocsPerRun tests if GOMAXPROCS>1. Fixes issue 4974. R=rsc, ...
12 years, 8 months ago (2013-03-06 23:52:34 UTC) #7
minux1
this is strange, testing.AllocsPerRun already force GOMAXPROCS to 1 before tests start. perhaps this is ...
12 years, 8 months ago (2013-03-07 10:03:32 UTC) #8
rsc
On Thu, Mar 7, 2013 at 5:03 AM, minux <minux.ma@gmail.com> wrote: > this is strange, ...
12 years, 8 months ago (2013-03-07 14:18:37 UTC) #9
minux1
12 years, 8 months ago (2013-03-07 14:44:12 UTC) #10
On Thu, Mar 7, 2013 at 10:18 PM, Russ Cox <rsc@golang.org> wrote:
> Want to take a look? It was failing with 1.2 allocations per test instead of
> the expected 1.0.
I'm still tackling the cgo problems on arm,
so i filed https://code.google.com/p/go/issues/detail?id=5000 to remind us.

Note:
from the original issue report, fullung said that the allocation comes from
runtime, so we should do something or this problem might affect other
Go 1 allocation tests in the wild that adopt the idiom:
defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(1))
before tests.
Sign in to reply to this message.

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