1
2
3
4
5
6
7
8 package race
9
10 import (
11 "bytes"
12 "os/exec"
13 "path/filepath"
14 "runtime"
15 "testing"
16 )
17
18 func TestIssue37485(t *testing.T) {
19 files, err := filepath.Glob("./*.syso")
20 if err != nil {
21 t.Fatalf("can't find syso files: %s", err)
22 }
23 for _, f := range files {
24 cmd := exec.Command(filepath.Join(runtime.GOROOT(), "bin", "go"), "tool", "nm", f)
25 res, err := cmd.CombinedOutput()
26 if err != nil {
27 t.Errorf("nm of %s failed: %s", f, err)
28 continue
29 }
30 if bytes.Contains(res, []byte("getauxval")) {
31 t.Errorf("%s contains getauxval", f)
32 }
33 }
34 }
35
View as plain text