<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/go-git.git/src/testing, branch dev.debug</title>
<subtitle>github.com: golang/go
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/'/>
<entry>
<title>testing: roll back CL 44352 (show in-progress tests upon SIGINT)</title>
<updated>2017-07-13T16:01:49+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2017-07-13T15:10:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=5bcfd8847207ad8399265bc7efd49c50b286223b'/>
<id>5bcfd8847207ad8399265bc7efd49c50b286223b</id>
<content type='text'>
CL 44352 changed the behavior of SIGINT, which can break tests that
themselves use SIGINT.  I think we can only implement this if the
testing package has a way to know whether the code under test is using
SIGINT, but os/signal does not provide an API for that.  Roll back for
1.9 and think about this again for 1.10.

Updates #19397

Change-Id: I021c314db2b9d0a80d0088b120a6ade685459990
Reviewed-on: https://go-review.googlesource.com/48370
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CL 44352 changed the behavior of SIGINT, which can break tests that
themselves use SIGINT.  I think we can only implement this if the
testing package has a way to know whether the code under test is using
SIGINT, but os/signal does not provide an API for that.  Roll back for
1.9 and think about this again for 1.10.

Updates #19397

Change-Id: I021c314db2b9d0a80d0088b120a6ade685459990
Reviewed-on: https://go-review.googlesource.com/48370
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>testing: revert CL 36791's conditional ReadMemStats</title>
<updated>2017-06-30T16:49:29+00:00</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@golang.org</email>
</author>
<published>2017-06-30T16:12:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=0ff876a8505d61fc20f3176f90bc589d76a4c966'/>
<id>0ff876a8505d61fc20f3176f90bc589d76a4c966</id>
<content type='text'>
Now that ReadMemStats is fast (CL 34937), CL 36791 is not so
necessary, and causes confusion. See #20863

This was already partially reverted in CL 46612 but missed two of the
spots.

Fixes #20863

Change-Id: I1307a0f7b1f9e86e8b6ceaa6a677f24f13431110
Reviewed-on: https://go-review.googlesource.com/47350
Reviewed-by: Austin Clements &lt;austin@google.com&gt;
Run-TryBot: Austin Clements &lt;austin@google.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that ReadMemStats is fast (CL 34937), CL 36791 is not so
necessary, and causes confusion. See #20863

This was already partially reverted in CL 46612 but missed two of the
spots.

Fixes #20863

Change-Id: I1307a0f7b1f9e86e8b6ceaa6a677f24f13431110
Reviewed-on: https://go-review.googlesource.com/47350
Reviewed-by: Austin Clements &lt;austin@google.com&gt;
Run-TryBot: Austin Clements &lt;austin@google.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>testing: clarify rules for concurrent t.Run calls</title>
<updated>2017-06-29T16:21:32+00:00</updated>
<author>
<name>Alberto Donizetti</name>
<email>alb.donizetti@gmail.com</email>
</author>
<published>2017-06-01T10:14:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=68e1b3e361b84ed7a4d5564e37a12a2c3d473283'/>
<id>68e1b3e361b84ed7a4d5564e37a12a2c3d473283</id>
<content type='text'>
Apparently, "all such calls must happen" means that the t.Run call
must *return* before the outer test function returns, or the calls
will cause a data race on t.ran.

Clarify the docs.

Fixes #20339

Change-Id: I191a9af2a9095be1e0aaf10b79c30e00a9c495cb
Reviewed-on: https://go-review.googlesource.com/47150
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Apparently, "all such calls must happen" means that the t.Run call
must *return* before the outer test function returns, or the calls
will cause a data race on t.ran.

Clarify the docs.

Fixes #20339

Change-Id: I191a9af2a9095be1e0aaf10b79c30e00a9c495cb
Reviewed-on: https://go-review.googlesource.com/47150
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>testing: always ReadMemStats before first benchmark run</title>
<updated>2017-06-28T20:47:26+00:00</updated>
<author>
<name>Meir Fischer</name>
<email>meirfischer@gmail.com</email>
</author>
<published>2017-06-26T01:17:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=3858349ec956b4abb052ba3191da16dc487c4ad4'/>
<id>3858349ec956b4abb052ba3191da16dc487c4ad4</id>
<content type='text'>
If the only way the user indicates they want alloc stats shown
is via ReportAllocs, we don't know that until benchFunc is run.
Therefore, StopTimer's ReadMemStats will return incorrect data
for single cycle runs since there's no counterpart ReadMemStats from
StartTimer that initializes alloc stats.

It appears that this bug was introduced by CL 46612,
"testing: only call ReadMemStats if necessary when benchmarking"

Fixes #20590

Change-Id: I3b5ef91677823f4b98011880a3be15423baf7e33
Reviewed-on: https://go-review.googlesource.com/46612
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
Run-TryBot: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the only way the user indicates they want alloc stats shown
is via ReportAllocs, we don't know that until benchFunc is run.
Therefore, StopTimer's ReadMemStats will return incorrect data
for single cycle runs since there's no counterpart ReadMemStats from
StartTimer that initializes alloc stats.

It appears that this bug was introduced by CL 46612,
"testing: only call ReadMemStats if necessary when benchmarking"

Fixes #20590

Change-Id: I3b5ef91677823f4b98011880a3be15423baf7e33
Reviewed-on: https://go-review.googlesource.com/46612
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
Run-TryBot: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>doc: mention testing/quick RNG seeding change in Go 1.9 notes</title>
<updated>2017-06-27T22:41:49+00:00</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@golang.org</email>
</author>
<published>2017-06-27T22:17:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=e25fdb968c4ff93c6d41574f2220a11ee02b0914'/>
<id>e25fdb968c4ff93c6d41574f2220a11ee02b0914</id>
<content type='text'>
Also reword the testing/quick.Config field docs to conform to the
normal subject-first style. Without that style, godoc links
/pkg/testing/quick/#Config.Rand to the wrong line, since it doesn't
recognize the preceding comment as necessarily being attached.

Fixes #20809

Change-Id: I9aebbf763eed9b1ab1a153fa11850d88a65571c6
Reviewed-on: https://go-review.googlesource.com/46910
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also reword the testing/quick.Config field docs to conform to the
normal subject-first style. Without that style, godoc links
/pkg/testing/quick/#Config.Rand to the wrong line, since it doesn't
recognize the preceding comment as necessarily being attached.

Fixes #20809

Change-Id: I9aebbf763eed9b1ab1a153fa11850d88a65571c6
Reviewed-on: https://go-review.googlesource.com/46910
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>testing: harmonize handling of prefix-matched benchmarks</title>
<updated>2017-06-20T14:19:05+00:00</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2017-06-16T18:46:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=a2a3ace51aa0600765d44a71f47fd830fa6217c5'/>
<id>a2a3ace51aa0600765d44a71f47fd830fa6217c5</id>
<content type='text'>
If you have BenchmarkX1 with sub-benchmark Y
and you have BenchmarkX2 with no sub-benchmarks,
then

	go test -bench=X/Y

runs BenchmarkX1 once with b.N=1 (to find out about Y)
and then not again, because it has sub-benchmarks,
but arguably also because we're interested in Y.

In contrast, it runs BenchmarkX2 in full, even though clearly
that is not relevant to the match X/Y. We do have to run X2
once with b.N=1 to probe for having X2/Y, but we should not
run it with larger b.N.

Fixes #20589.

Change-Id: Ib86907e844f34dcaac6cd05757f57db1019201d0
Reviewed-on: https://go-review.googlesource.com/46031
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-by: Marcel van Lohuizen &lt;mpvl@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If you have BenchmarkX1 with sub-benchmark Y
and you have BenchmarkX2 with no sub-benchmarks,
then

	go test -bench=X/Y

runs BenchmarkX1 once with b.N=1 (to find out about Y)
and then not again, because it has sub-benchmarks,
but arguably also because we're interested in Y.

In contrast, it runs BenchmarkX2 in full, even though clearly
that is not relevant to the match X/Y. We do have to run X2
once with b.N=1 to probe for having X2/Y, but we should not
run it with larger b.N.

Fixes #20589.

Change-Id: Ib86907e844f34dcaac6cd05757f57db1019201d0
Reviewed-on: https://go-review.googlesource.com/46031
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-by: Marcel van Lohuizen &lt;mpvl@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>testing: clarify -timeout flag</title>
<updated>2017-06-15T05:57:29+00:00</updated>
<author>
<name>Kale Blankenship</name>
<email>kale@lemnisys.com</email>
</author>
<published>2017-06-15T03:11:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=e7c650bca5fc7a8161527924bc7cb889fb8ab5e0'/>
<id>e7c650bca5fc7a8161527924bc7cb889fb8ab5e0</id>
<content type='text'>
Fixes #20090

Change-Id: I881607e55cd946a703e74a7d8ae2bbde67546510
Reviewed-on: https://go-review.googlesource.com/45816
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
Run-TryBot: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #20090

Change-Id: I881607e55cd946a703e74a7d8ae2bbde67546510
Reviewed-on: https://go-review.googlesource.com/45816
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
Run-TryBot: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>testing: show in-progress tests upon SIGINT</title>
<updated>2017-06-09T04:38:37+00:00</updated>
<author>
<name>Meir Fischer</name>
<email>meirfischer@gmail.com</email>
</author>
<published>2017-06-04T04:29:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=11c61eb6afaf72c4919cc7806f1016c8bcdf311a'/>
<id>11c61eb6afaf72c4919cc7806f1016c8bcdf311a</id>
<content type='text'>
Because of parallel tests, which have stalled executions, the RUN
output of a test can be much earlier than its completion output resulting
in hard-to-read verbose output.

The tests are displayed in the order in which the output shows
that they began, to make it easy to line up with the "RUN" output.
Similarly, the definitions of when tests begin and complete is
determined by when RUN and FAIL/SKIP/PASS are output since the
focus of this code is on enhancing readability.

Fixes #19397

Change-Id: I4d0ca3fd268b620484e7a190117f79a33b3dc461
Reviewed-on: https://go-review.googlesource.com/44352
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Because of parallel tests, which have stalled executions, the RUN
output of a test can be much earlier than its completion output resulting
in hard-to-read verbose output.

The tests are displayed in the order in which the output shows
that they began, to make it easy to line up with the "RUN" output.
Similarly, the definitions of when tests begin and complete is
determined by when RUN and FAIL/SKIP/PASS are output since the
focus of this code is on enhancing readability.

Fixes #19397

Change-Id: I4d0ca3fd268b620484e7a190117f79a33b3dc461
Reviewed-on: https://go-review.googlesource.com/44352
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>testing: clarify that subtests are run as goroutines</title>
<updated>2017-05-30T16:28:16+00:00</updated>
<author>
<name>Marcel van Lohuizen</name>
<email>mpvl@golang.org</email>
</author>
<published>2017-05-30T10:11:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=d10549fb5763d33667ab02c0713c22c14f90078c'/>
<id>d10549fb5763d33667ab02c0713c22c14f90078c</id>
<content type='text'>
Fixes #20394

Change-Id: Iabb2a53fd1ddb783e7fb5b60ced8482c2e2569c4
Reviewed-on: https://go-review.googlesource.com/44377
Run-TryBot: Marcel van Lohuizen &lt;mpvl@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #20394

Change-Id: Iabb2a53fd1ddb783e7fb5b60ced8482c2e2569c4
Reviewed-on: https://go-review.googlesource.com/44377
Run-TryBot: Marcel van Lohuizen &lt;mpvl@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>testing: add argument to list tests, benchmarks, and examples</title>
<updated>2017-04-26T15:53:32+00:00</updated>
<author>
<name>Brandon Bennett</name>
<email>bbennett@fb.com</email>
</author>
<published>2017-04-20T16:26:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=ba8ff87dbeb87813a4604e36adb609b1e8fcb7be'/>
<id>ba8ff87dbeb87813a4604e36adb609b1e8fcb7be</id>
<content type='text'>
Some large testing/build systems require some form of test discovery before
running tests.  This usually allows for analytics, history, and stats on a per
tests basis.  Typically these systems are meant used in multi-language
environments and the original source code is not known or available.

This adds a -test.list option which takes a regular expression as an
argument. Any tests, benchmarks, or examples that match that regular
expression will be printed, one per line, to stdout and then the program
will exit.

Since subtests are named/discovered at run time this will only show
top-level tests names and is a known limitation.

Fixes #17209

Change-Id: I7e607f5f4f084d623a1cae88a1f70e7d92b7f13e
Reviewed-on: https://go-review.googlesource.com/41195
Reviewed-by: Marcel van Lohuizen &lt;mpvl@golang.org&gt;
Run-TryBot: Marcel van Lohuizen &lt;mpvl@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some large testing/build systems require some form of test discovery before
running tests.  This usually allows for analytics, history, and stats on a per
tests basis.  Typically these systems are meant used in multi-language
environments and the original source code is not known or available.

This adds a -test.list option which takes a regular expression as an
argument. Any tests, benchmarks, or examples that match that regular
expression will be printed, one per line, to stdout and then the program
will exit.

Since subtests are named/discovered at run time this will only show
top-level tests names and is a known limitation.

Fixes #17209

Change-Id: I7e607f5f4f084d623a1cae88a1f70e7d92b7f13e
Reviewed-on: https://go-review.googlesource.com/41195
Reviewed-by: Marcel van Lohuizen &lt;mpvl@golang.org&gt;
Run-TryBot: Marcel van Lohuizen &lt;mpvl@golang.org&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
