<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/go-git.git/src/testing, branch dev.cmdgo</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/fstest: allow specifying file for "." in MapFS</title>
<updated>2021-08-16T22:27:47+00:00</updated>
<author>
<name>Josh Bleecher Snyder</name>
<email>josharian@gmail.com</email>
</author>
<published>2021-06-15T23:01:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=213e157d3aad3fbb289d184a5cb4b18258162634'/>
<id>213e157d3aad3fbb289d184a5cb4b18258162634</id>
<content type='text'>
Prior to this commit, specifying a file for "." in MapFS
created an invalid fs.FS and caused infinite recursion in fs.WalkDir.

Fixes #46776

Change-Id: Ia9e4ae1125355a74dba9ee6b36451b7fda75a862
Reviewed-on: https://go-review.googlesource.com/c/go/+/328409
Trust: Josh Bleecher Snyder &lt;josharian@gmail.com&gt;
Run-TryBot: Josh Bleecher Snyder &lt;josharian@gmail.com&gt;
TryBot-Result: Go Bot &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>
Prior to this commit, specifying a file for "." in MapFS
created an invalid fs.FS and caused infinite recursion in fs.WalkDir.

Fixes #46776

Change-Id: Ia9e4ae1125355a74dba9ee6b36451b7fda75a862
Reviewed-on: https://go-review.googlesource.com/c/go/+/328409
Trust: Josh Bleecher Snyder &lt;josharian@gmail.com&gt;
Run-TryBot: Josh Bleecher Snyder &lt;josharian@gmail.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>testing: clarify T.Name returns a distinct name of the running test</title>
<updated>2021-07-27T05:07:46+00:00</updated>
<author>
<name>Changkun Ou</name>
<email>hi@changkun.de</email>
</author>
<published>2021-07-26T13:04:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=7ba8e796c91eaf4befcacc4d24127ae54475d6a5'/>
<id>7ba8e796c91eaf4befcacc4d24127ae54475d6a5</id>
<content type='text'>
According to the discussion, it is clear that T.Name returns a
distinct name among all tests. However, there is no specification
of how sub-tests with the same specified test name are constructed.
This change only clarifies the uniqueness and the components of the
name without suggesting any explicit format of the returned name.

Fixes #46488

Change-Id: I6cebd419b69fb08d8646cb744a129548452042ef
Reviewed-on: https://go-review.googlesource.com/c/go/+/337392
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Emmanuel Odeke &lt;emmanuel@orijtech.com&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
According to the discussion, it is clear that T.Name returns a
distinct name among all tests. However, there is no specification
of how sub-tests with the same specified test name are constructed.
This change only clarifies the uniqueness and the components of the
name without suggesting any explicit format of the returned name.

Fixes #46488

Change-Id: I6cebd419b69fb08d8646cb744a129548452042ef
Reviewed-on: https://go-review.googlesource.com/c/go/+/337392
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Emmanuel Odeke &lt;emmanuel@orijtech.com&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>testing: clarify in docs that TestMain is advanced</title>
<updated>2021-07-15T20:39:22+00:00</updated>
<author>
<name>Matt T. Proud</name>
<email>matt.proud@gmail.com</email>
</author>
<published>2021-07-14T20:42:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=0941dbca6ae805dd7b5f7871d5811b7b7f14f77f'/>
<id>0941dbca6ae805dd7b5f7871d5811b7b7f14f77f</id>
<content type='text'>
Beginner and intermediate Go users periodically use TestMain when
requirements do not necessitate TestMain (exceeding least-mechanism
design). This commit expands package testing's documentation to convey
that the TestMain feature itself is somewhat low-level and potentially
unsuitable for casual testing where ordinary test functions would
suffice.

Fixes #42161
Updates #44200

Change-Id: I91ba0b048c3d6f79110fe8f0fbb58d896edca366
Reviewed-on: https://go-review.googlesource.com/c/go/+/334649
Trust: Ian Lance Taylor &lt;iant@golang.org&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Beginner and intermediate Go users periodically use TestMain when
requirements do not necessitate TestMain (exceeding least-mechanism
design). This commit expands package testing's documentation to convey
that the TestMain feature itself is somewhat low-level and potentially
unsuitable for casual testing where ordinary test functions would
suffice.

Fixes #42161
Updates #44200

Change-Id: I91ba0b048c3d6f79110fe8f0fbb58d896edca366
Reviewed-on: https://go-review.googlesource.com/c/go/+/334649
Trust: Ian Lance Taylor &lt;iant@golang.org&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Rob Pike &lt;r@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>testing: add TB.Setenv</title>
<updated>2021-07-01T18:35:33+00:00</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2021-06-10T19:17:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=877688c838c35c48f8c658891ead6c381e21f6fa'/>
<id>877688c838c35c48f8c658891ead6c381e21f6fa</id>
<content type='text'>
For #41260 and #46688.

Change-Id: I6f42742cc3234a90003136ae8798a6b0e1291788
Reviewed-on: https://go-review.googlesource.com/c/go/+/326790
Trust: Russ Cox &lt;rsc@golang.org&gt;
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
TryBot-Result: Go Bot &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>
For #41260 and #46688.

Change-Id: I6f42742cc3234a90003136ae8798a6b0e1291788
Reviewed-on: https://go-review.googlesource.com/c/go/+/326790
Trust: Russ Cox &lt;rsc@golang.org&gt;
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>testing: drop unusual characters from TempDir directory name</title>
<updated>2021-06-17T04:32:50+00:00</updated>
<author>
<name>Tobias Klauser</name>
<email>tklauser@distanz.ch</email>
</author>
<published>2021-06-08T13:33:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=97cee43c93cfccded197cd281f0a5885cdb605b4'/>
<id>97cee43c93cfccded197cd281f0a5885cdb605b4</id>
<content type='text'>
Only use safe characters of the test name for the os.MkdirTemp pattern.
This currently includes the alphanumeric characters and ASCII
punctuation characters known not to interact with globs.

Fixes #46624

Change-Id: I402c34775b943fed9b97963c52f79245cc16dc1d
Reviewed-on: https://go-review.googlesource.com/c/go/+/326010
Trust: Tobias Klauser &lt;tobias.klauser@gmail.com&gt;
Run-TryBot: Tobias Klauser &lt;tobias.klauser@gmail.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Bryan C. Mills &lt;bcmills@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only use safe characters of the test name for the os.MkdirTemp pattern.
This currently includes the alphanumeric characters and ASCII
punctuation characters known not to interact with globs.

Fixes #46624

Change-Id: I402c34775b943fed9b97963c52f79245cc16dc1d
Reviewed-on: https://go-review.googlesource.com/c/go/+/326010
Trust: Tobias Klauser &lt;tobias.klauser@gmail.com&gt;
Run-TryBot: Tobias Klauser &lt;tobias.klauser@gmail.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Bryan C. Mills &lt;bcmills@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>testing: add -shuffle=off|on|N to alter the execution order of tests and benchmarks</title>
<updated>2021-04-28T16:06:21+00:00</updated>
<author>
<name>Paschalis Tsilias</name>
<email>paschalis.tsilias@gmail.com</email>
</author>
<published>2021-04-14T20:55:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=cbb3f090477de92a7e158050803ef71a5ea825ee'/>
<id>cbb3f090477de92a7e158050803ef71a5ea825ee</id>
<content type='text'>
This CL adds a new flag to the testing package and the go test command
which randomizes the execution order for tests and benchmarks.
This can be useful for identifying unwanted dependencies
between test or benchmark functions.
The flag is off by default. If `-shuffle` is set to `on` then the system
clock will be used as the seed value. If `-shuffle` is set to an integer
N, then N will be used as the seed value. In both cases, the seed will
be reported for failed runs so that they can reproduced later on.

Fixes #28592

Change-Id: I62e7dfae5f63f97a0cbd7830ea844d9f7beac335
Reviewed-on: https://go-review.googlesource.com/c/go/+/310033
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Emmanuel Odeke &lt;emmanuel@orijtech.com&gt;
Trust: Bryan C. Mills &lt;bcmills@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This CL adds a new flag to the testing package and the go test command
which randomizes the execution order for tests and benchmarks.
This can be useful for identifying unwanted dependencies
between test or benchmark functions.
The flag is off by default. If `-shuffle` is set to `on` then the system
clock will be used as the seed value. If `-shuffle` is set to an integer
N, then N will be used as the seed value. In both cases, the seed will
be reported for failed runs so that they can reproduced later on.

Fixes #28592

Change-Id: I62e7dfae5f63f97a0cbd7830ea844d9f7beac335
Reviewed-on: https://go-review.googlesource.com/c/go/+/310033
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Emmanuel Odeke &lt;emmanuel@orijtech.com&gt;
Trust: Bryan C. Mills &lt;bcmills@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>testing: document that TestMain can be used with benchmarks</title>
<updated>2021-04-27T21:44:16+00:00</updated>
<author>
<name>Julien Tant</name>
<email>julien@craftyx.fr</email>
</author>
<published>2021-04-27T21:32:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=645cb62ee3926ce88b8c2cf556fed6dea3d525ce'/>
<id>645cb62ee3926ce88b8c2cf556fed6dea3d525ce</id>
<content type='text'>
Fixes #45764

Change-Id: Ie6c18bb5c20721c2ffa8b4a9cf9f97cdc665a450
GitHub-Last-Rev: 8bcea7e0ff60227c05437b372c0a3546e151af31
GitHub-Pull-Request: golang/go#45808
Reviewed-on: https://go-review.googlesource.com/c/go/+/314349
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Trust: Bryan C. Mills &lt;bcmills@google.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #45764

Change-Id: Ie6c18bb5c20721c2ffa8b4a9cf9f97cdc665a450
GitHub-Last-Rev: 8bcea7e0ff60227c05437b372c0a3546e151af31
GitHub-Pull-Request: golang/go#45808
Reviewed-on: https://go-review.googlesource.com/c/go/+/314349
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Trust: Bryan C. Mills &lt;bcmills@google.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>io/fs: document that caller can modify slice returned by ReadFile</title>
<updated>2021-04-21T16:46:52+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2021-04-19T23:05:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=35806efda21242df2c56ca276a842481acf6fea0'/>
<id>35806efda21242df2c56ca276a842481acf6fea0</id>
<content type='text'>
Also add a test to testing/fstest.

Fixes #45186

Change-Id: I00e5f46ccd5269dbc266a8f2ebc9a62ebb1297b8
Reviewed-on: https://go-review.googlesource.com/c/go/+/311649
Trust: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also add a test to testing/fstest.

Fixes #45186

Change-Id: I00e5f46ccd5269dbc266a8f2ebc9a62ebb1297b8
Reviewed-on: https://go-review.googlesource.com/c/go/+/311649
Trust: Ian Lance Taylor &lt;iant@golang.org&gt;
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>testing: remove data races so that parallel benchmarks can safely call .Fatal* and .Skip*</title>
<updated>2021-04-19T22:06:05+00:00</updated>
<author>
<name>Michael Fraenkel</name>
<email>michael.fraenkel@gmail.com</email>
</author>
<published>2021-04-13T00:34:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=bc5de81e70f9572d7b1d63040c95b999dac57f50'/>
<id>bc5de81e70f9572d7b1d63040c95b999dac57f50</id>
<content type='text'>
Protects the usages of (*common).finished with locks
to prevent data races, thus allowing benchmarks to safely invoke
.Fatal* and .Skip* concurrently.

Fixes #45526

Change-Id: I2b4846f525c426d6c7d3418f8f6c86446adbf986
Reviewed-on: https://go-review.googlesource.com/c/go/+/309572
Reviewed-by: Emmanuel Odeke &lt;emmanuel@orijtech.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Run-TryBot: Emmanuel Odeke &lt;emmanuel@orijtech.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Trust: Tobias Klauser &lt;tobias.klauser@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Protects the usages of (*common).finished with locks
to prevent data races, thus allowing benchmarks to safely invoke
.Fatal* and .Skip* concurrently.

Fixes #45526

Change-Id: I2b4846f525c426d6c7d3418f8f6c86446adbf986
Reviewed-on: https://go-review.googlesource.com/c/go/+/309572
Reviewed-by: Emmanuel Odeke &lt;emmanuel@orijtech.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Run-TryBot: Emmanuel Odeke &lt;emmanuel@orijtech.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Trust: Tobias Klauser &lt;tobias.klauser@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>embed, testing/fstest: small optimization for ReadDir</title>
<updated>2021-04-07T09:59:58+00:00</updated>
<author>
<name>徐志伟</name>
<email>juwan.xu@qq.com</email>
</author>
<published>2021-04-06T04:56:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=d6aa162f30d63f21f5f4db75e302dbb90595bbe2'/>
<id>d6aa162f30d63f21f5f4db75e302dbb90595bbe2</id>
<content type='text'>
Change-Id: If8dc6d917b55119b5662ce5b0b87328d220d684d
GitHub-Last-Rev: cc9a1d5a7e2599ee7f98c61d35b2450b9b6a92c3
GitHub-Pull-Request: golang/go#45388
Reviewed-on: https://go-review.googlesource.com/c/go/+/307250
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Trust: Tobias Klauser &lt;tobias.klauser@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: If8dc6d917b55119b5662ce5b0b87328d220d684d
GitHub-Last-Rev: cc9a1d5a7e2599ee7f98c61d35b2450b9b6a92c3
GitHub-Pull-Request: golang/go#45388
Reviewed-on: https://go-review.googlesource.com/c/go/+/307250
Run-TryBot: Ian Lance Taylor &lt;iant@golang.org&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@golang.org&gt;
Trust: Tobias Klauser &lt;tobias.klauser@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
