<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/testing/synctest/synctest.go, branch fix-runtime-test-GOMAXPROCS</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=fix-runtime-test-GOMAXPROCS</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=fix-runtime-test-GOMAXPROCS'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2025-07-10T20:16:07Z</updated>
<entry>
<title>synctest: fix comments for time.Now() in synctests</title>
<updated>2025-07-10T20:16:07Z</updated>
<author>
<name>Christian Hoeppner</name>
<email>hoeppi@google.com</email>
</author>
<published>2025-07-04T18:40:42Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=aa5de9ebb55bbd5e0a38304f8f8e603b2ec03238'/>
<id>urn:sha1:aa5de9ebb55bbd5e0a38304f8f8e603b2ec03238</id>
<content type='text'>
Also add a test case to make sure that time.Now() results in the
documented date.

Change-Id: Ic4cc577eba485b7c6e1a64122da06d7075bbe12e
Reviewed-on: https://go-review.googlesource.com/c/go/+/685677
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Auto-Submit: Christian Höppner &lt;hoeppi@google.com&gt;
Reviewed-by: Damien Neil &lt;dneil@google.com&gt;
</content>
</entry>
<entry>
<title>testing/synctest, runtime: avoid panic when using linker-alloc WG from bubble</title>
<updated>2025-06-10T22:02:26Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2025-06-05T20:47:06Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=4f86f2267167a63b673c4a2a2994e008b32c90ea'/>
<id>urn:sha1:4f86f2267167a63b673c4a2a2994e008b32c90ea</id>
<content type='text'>
We associate WaitGroups with synctest bubbles by attaching a
special to the WaitGroup. It is not possible to attach a special
to a linker-allocated value, such as:

    var wg sync.WaitGroup

Avoid panicking when accessing a linker-allocated WaitGroup
from a bubble. We have no way to associate these WaitGroups
with a bubble, so just treat them as always unbubbled.
This is probably fine, since the WaitGroup was always
created outside the bubble in this case.

Fixes #74005

Change-Id: Ic71514b0b8d0cecd62e45cc929ffcbeb16f54a55
Reviewed-on: https://go-review.googlesource.com/c/go/+/679695
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
Auto-Submit: Damien Neil &lt;dneil@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>testing, testing/synctest: report correct duration after panics</title>
<updated>2025-05-30T16:23:37Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2025-05-23T23:21:19Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=8cd7f17248b9215530e9ce9ed7831fc24b5eeef7'/>
<id>urn:sha1:8cd7f17248b9215530e9ce9ed7831fc24b5eeef7</id>
<content type='text'>
Report the correct wall-clock test duration after handling a
panic in a synctest.Test bubble.

Fixes #73852

Change-Id: I053262e5eac2dd9d5938b17c3093cbc3fa115a0d
Reviewed-on: https://go-review.googlesource.com/c/go/+/676695
Auto-Submit: Damien Neil &lt;dneil@google.com&gt;
Reviewed-by: Alan Donovan &lt;adonovan@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>runtime, testing/synctest: breaking bubble isolation with Cond is fatal</title>
<updated>2025-05-29T19:49:36Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2025-05-22T18:14:53Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=21b7e60c6b64dd3221ab5b95d164fb42492029e8'/>
<id>urn:sha1:21b7e60c6b64dd3221ab5b95d164fb42492029e8</id>
<content type='text'>
sync.Cond.Wait is durably blocking. Waking a goroutine out of Cond.Wait
from outside its bubble panics.

Make this panic a fatal panic, since it leaves the notifyList in an
inconsistent state. We could do some work to make this a recoverable
panic, but the complexity doesn't seem worth the outcome.

For #67434

Change-Id: I88874c1519c2e5c0063175297a9b120cedabcd07
Reviewed-on: https://go-review.googlesource.com/c/go/+/675617
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
Auto-Submit: Damien Neil &lt;dneil@google.com&gt;
</content>
</entry>
<entry>
<title>runtime, internal/synctest, sync: associate WaitGroups with bubbles</title>
<updated>2025-05-29T17:26:00Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2025-05-20T22:56:43Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=b170c7e94c478e616d194af95caa7747d9fa4725'/>
<id>urn:sha1:b170c7e94c478e616d194af95caa7747d9fa4725</id>
<content type='text'>
Add support to internal/synctest for managing associations between
arbitrary pointers and synctest bubbles. (Implemented internally to
the runtime package by attaching a special to the pointer.)

Associate WaitGroups with bubbles.
Since WaitGroups don't have a constructor,
perform the association when Add is called.
All Add calls must be made from within the same bubble,
or outside any bubble.

When a bubbled goroutine calls WaitGroup.Wait,
the wait is durably blocking iff the WaitGroup is associated
with the current bubble.

Change-Id: I77e2701e734ac2fa2b32b28d5b0c853b7b2825c9
Reviewed-on: https://go-review.googlesource.com/c/go/+/676656
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Auto-Submit: Damien Neil &lt;dneil@google.com&gt;
</content>
</entry>
<entry>
<title>runtime, testing/synctest: verify cleanups/finalizers run outside bubbles</title>
<updated>2025-05-27T21:47:13Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2025-05-21T22:08:08Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=fce9d4515defec0473ca3a685408ef5304d23aa9'/>
<id>urn:sha1:fce9d4515defec0473ca3a685408ef5304d23aa9</id>
<content type='text'>
Cleanup functions and finalizers must not run in a synctest bubble.
If they did, a function run by the GC at an unpredictable time
could unblock a bubble that synctest believes is durably
blocked.

Add a test verifying that cleanups and finalizers are always
run by non-bubbled goroutines. (This is already the case because
we never add system goroutines to a bubble.)

For #67434

Change-Id: I5a48db2b26f9712c3b0dc1f425d99814031a2fc1
Reviewed-on: https://go-review.googlesource.com/c/go/+/675257
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Auto-Submit: Damien Neil &lt;dneil@google.com&gt;
</content>
</entry>
<entry>
<title>testing/synctest: correct duration in doc example</title>
<updated>2025-05-24T15:42:04Z</updated>
<author>
<name>Sean Liao</name>
<email>sean@liao.dev</email>
</author>
<published>2025-05-24T11:10:12Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=c07ffe980a52b309d48d33265cfee438a01cb513'/>
<id>urn:sha1:c07ffe980a52b309d48d33265cfee438a01cb513</id>
<content type='text'>
Fixes #73839

Change-Id: I961641c6d8244cdeb101a3c9ae91931828a893ad
Reviewed-on: https://go-review.googlesource.com/c/go/+/676035
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
Reviewed-by: Alan Donovan &lt;adonovan@google.com&gt;
</content>
</entry>
<entry>
<title>testing/synctest: add Test</title>
<updated>2025-05-20T22:46:03Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2025-05-12T18:15:08Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=49a660e22cb349cf13ef0a2f6214c6fdd75afda0'/>
<id>urn:sha1:49a660e22cb349cf13ef0a2f6214c6fdd75afda0</id>
<content type='text'>
Add a synctest.Test function, superseding the experimental
synctest.Run function. Promote the testing/synctest package
out of experimental status.

For #67434
For #73567

Change-Id: I3c5ba030860d90fe2ddb517a2f3536efd60181a9
Reviewed-on: https://go-review.googlesource.com/c/go/+/671961
Auto-Submit: Damien Neil &lt;dneil@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
</content>
</entry>
<entry>
<title>runtime, testing/synctest: stop advancing time when main goroutine exits</title>
<updated>2025-05-07T20:14:25Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2025-04-01T22:43:22Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=d6c8bedc7b3d2de7714dca75bd05912b371538f1'/>
<id>urn:sha1:d6c8bedc7b3d2de7714dca75bd05912b371538f1</id>
<content type='text'>
Once the goroutine started by synctest.Run exits, stop advancing
the fake clock in its bubble. This avoids confusing situations
where a bubble remains alive indefinitely while a background
goroutine reads from a time.Ticker or otherwise advances the clock.

For #67434

Change-Id: Id608ffe3c7d7b07747b56a21f365787fb9a057d7
Reviewed-on: https://go-review.googlesource.com/c/go/+/662155
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Auto-Submit: Damien Neil &lt;dneil@google.com&gt;
</content>
</entry>
<entry>
<title>testing/synctest: add experimental synctest package</title>
<updated>2024-11-20T16:26:46Z</updated>
<author>
<name>Damien Neil</name>
<email>dneil@google.com</email>
</author>
<published>2024-11-19T18:42:11Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=76e4efdc77861954969ce192966e1595c268d8c1'/>
<id>urn:sha1:76e4efdc77861954969ce192966e1595c268d8c1</id>
<content type='text'>
The testing/synctest package is experimental,
subject to change or removal,
and only present when GOEXPERIMENT=synctest.

Fixes #69687

Change-Id: I6c79e7d1479a54bebcd2de754854c87bfd0a5fa1
Reviewed-on: https://go-review.googlesource.com/c/go/+/629735
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
</feed>
