blob: 2f1a91cab1d9c12b5d7b02481f77b1e512217c2c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// Copyright 2020 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build race
package race
import (
"bytes"
"os/exec"
"path/filepath"
"runtime"
"testing"
)
func TestIssue37485(t *testing.T) {
files, err := filepath.Glob("./*.syso")
if err != nil {
t.Fatalf("can't find syso files: %s", err)
}
for _, f := range files {
cmd := exec.Command(filepath.Join(runtime.GOROOT(), "bin", "go"), "tool", "nm", f)
res, err := cmd.CombinedOutput()
if err != nil {
t.Errorf("nm of %s failed: %s", f, err)
continue
}
if bytes.Contains(res, []byte("getauxval")) {
t.Errorf("%s contains getauxval", f)
}
}
}
|