// TestEtcd runs a 3 node etcd cluster, partitions the network between the
// nodes, and makes sure key-value puts and gets work.
func TestEtcd(t *testing.T) {
gosim.SetSimulationTimeout(2 * time.Minute)
// run machines:
gosim.NewMachine(gosim.MachineConfig{
Label: "etcd-1",
Addr: netip.MustParseAddr("10.0.0.1"),
MainFunc: func() {
runEtcdNode("etcd-1", "10.0.0.1")
},
})
gosim.NewMachine(gosim.MachineConfig{
Label: "etcd-2",
Addr: netip.MustParseAddr("10.0.0.2"),
MainFunc: func() {
time.Sleep(100 * time.Millisecond)
runEtcdNode("etcd-2", "10.0.0.2")
},
})
gosim.NewMachine(gosim.MachineConfig{
Label: "etcd-3",
Addr: netip.MustParseAddr("10.0.0.3"),
MainFunc: func() {
time.Sleep(200 * time.Millisecond)
runEtcdNode("etcd-3", "10.0.0.3")
},
})
// mess with the network in the background
go nemesis.Sequence(
nemesis.Sleep{
Duration: 10 * time.Second,
},
nemesis.PartitionMachines{
Addresses: []string{
"10.0.0.1",
"10.0.0.2",
"10.0.0.3",
},
Duration: 30 * time.Second,
},
).Run()--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/CAP%3DJquaBu1O5rN6aR6fMs03q4O92cPAc9DfGQZ9fck9zB2sEkw%40mail.gmail.com.
~/go/src/github.com/jellevandenhooff/gosim/examples/etcd (main) $ gosim test -v
2025/08/27 12:28:46 ERROR missing function body pkg=internal/runtime/sys name=GetCallerPC
Does gosim strictly need linkname magic? Is there some approach to fixing Gosim
to work with either of the last two Go versions, given the new linkname restrictions
and/or updates? Have you been able to make Gosim work with Go 1.25 for instance?
Thanks!
Jason
--You received this message because you are subscribed to the Google Groups "golang-nuts" group.To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/e70effea-cf13-4da1-8c65-d7e1c0bb64e2n%40googlegroups.com.
I would recommend better care with the commit messages. I went to take a look at the changes that were being added, and it was tough to follow.On Thu, Feb 26, 2026, at 10:26 AM, Jason E. Aten wrote:
Heh. While it lots of situations I agree whole heartedly,fortunately in this particular situation with Gosimwe have a readily available correctness Oracle:the normal (non-deterministic) Go runtime executioncan be readily compared. If one of the manyinconsistent executions from the normal runtimematches the consistent, reproducible execution fromGosim, then we know the linkname translation minor repairs worked.
On Thursday, February 26, 2026 at 9:39:02 AM UTC-3 Wojciech S. Czarnecki wrote:
Dnia Wed, 25 Feb 2026 16:55:45 -0800 (PST)
"Jason E. Aten" napisał/a: