CL 503919 breaks tests for ios, this change fixes that.
Fixes #61891
Change-Id: I58508a780abb7a2150faec83c0f002cb22abafb7
Reviewed-on: https://go-review.googlesource.com/c/go/+/517795
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
addr2 = mprof.Mapping[1].Start
map2 = mprof.Mapping[1]
map2.BuildID, _ = elfBuildID(map2.File)
- case "windows", "darwin":
+ case "windows", "darwin", "ios":
addr1 = uint64(abi.FuncPCABIInternal(f1))
addr2 = uint64(abi.FuncPCABIInternal(f2))
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !ios
+
package pprof
import (
"bufio"
"bytes"
"internal/abi"
+ "internal/testenv"
"os"
- "os/exec"
"strconv"
"strings"
"testing"
func useVMMap(t *testing.T) (hi, lo uint64) {
pid := strconv.Itoa(os.Getpid())
- out, err := exec.Command("vmmap", pid).Output()
+ testenv.MustHaveExecPath(t, "vmmap")
+ out, err := testenv.Command(t, "vmmap", pid).Output()
if err != nil {
t.Fatal(err)
}