mirror of
https://github.com/golang/go.git
synced 2026-06-27 19:30:52 +00:00
runtime: fix TestUsingVDSO on linux/ppc64le
Only check for clock_gettime64 on 32b hosts. Fixes #74672 Change-Id: I24a008575522f2eff73427263cc7a155c36f37b0 Reviewed-on: https://go-review.googlesource.com/c/go/+/776061 Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
parent
2403e594a5
commit
2568174249
1 changed files with 9 additions and 4 deletions
|
|
@ -9,6 +9,7 @@ package runtime_test
|
|||
import (
|
||||
"bytes"
|
||||
"internal/asan"
|
||||
"internal/goarch"
|
||||
"internal/testenv"
|
||||
"os"
|
||||
"os/exec"
|
||||
|
|
@ -53,10 +54,14 @@ func TestUsingVDSO(t *testing.T) {
|
|||
t.Skipf("skipping because Executable failed: %v", err)
|
||||
}
|
||||
|
||||
// Trace both clock_gettime and clock_gettime64: 32-bit Linux glibc uses
|
||||
// the y2038-safe clock_gettime64 syscall, and strace's -e filter is an
|
||||
// exact match, not a prefix.
|
||||
const traceFilter = "clock_gettime,clock_gettime64"
|
||||
traceFilter := "clock_gettime"
|
||||
|
||||
if goarch.PtrSize == 4 {
|
||||
// Trace both clock_gettime and clock_gettime64: 32-bit Linux glibc uses
|
||||
// the y2038-safe clock_gettime64 syscall, and strace's -e filter is an
|
||||
// exact match, not a prefix.
|
||||
traceFilter += ",clock_gettime64"
|
||||
}
|
||||
|
||||
t.Logf("GO_WANT_HELPER_PROCESS=1 %s -f -e %s %s -test.run=^TestUsingVDSO$", strace, traceFilter, exe)
|
||||
cmd := testenv.Command(t, strace, "-f", "-e", traceFilter, exe, "-test.run=^TestUsingVDSO$")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue