Skip to content

Commit

Permalink
Revert "internal: use atomic type (ethereum#27858)"
Browse files Browse the repository at this point in the history
This reverts commit f7b3aed.
  • Loading branch information
devopsbo3 committed Nov 10, 2023
1 parent 523f23d commit 4006438
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/cmdtest/test_cmd.go
Expand Up @@ -55,13 +55,13 @@ type TestCmd struct {
Err error
}

var id atomic.Int32
var id int32

// Run exec's the current binary using name as argv[0] which will trigger the
// reexec init function for that name (e.g. "geth-test" in cmd/geth/run_test.go)
func (tt *TestCmd) Run(name string, args ...string) {
id.Add(1)
tt.stderr = &testlogger{t: tt.T, name: fmt.Sprintf("%d", id.Load())}
id := atomic.AddInt32(&id, 1)
tt.stderr = &testlogger{t: tt.T, name: fmt.Sprintf("%d", id)}
tt.cmd = &exec.Cmd{
Path: reexec.Self(),
Args: append([]string{name}, args...),
Expand Down

0 comments on commit 4006438

Please sign in to comment.