提交 1c9cfc03 编写于 作者: H hengwu0 提交者: Derek Parker

test: skip failed tests on arm64

Skip the failed tests that don't work on arm64.
上级 36574e34
......@@ -5,6 +5,10 @@ os:
- linux
- osx
arch:
- amd64
- arm64
go:
- tip
- 1.13.x
......
......@@ -22,7 +22,6 @@ require (
golang.org/x/arch v0.0.0-20190927153633-4e8777c89be4
golang.org/x/crypto v0.0.0-20180614174826-fd5f17ee7299 // indirect
golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb
golang.org/x/tools v0.0.0-20181120060634-fc4f04983f62
gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 // indirect
......
......@@ -58,8 +58,6 @@ golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb h1:fgwFCsaw9buMuxNd6+DQfAuSF
golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/tools v0.0.0-20181120060634-fc4f04983f62 h1:1Q34CedRebzugYW3YoBK2ueHjonPQ6wiOEHoeQ1fCP4=
golang.org/x/tools v0.0.0-20181120060634-fc4f04983f62/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
gopkg.in/airbrake/gobrake.v2 v2.0.9 h1:7z2uVWwn7oVeeugY1DtlPAy5H+KYgB1KeKTnqjNatLo=
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
......@@ -73,3 +71,4 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkep
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
......@@ -154,6 +154,9 @@ func TestExit(t *testing.T) {
}
func TestExitAfterContinue(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
protest.AllowRecording(t)
withTestProcess("continuetestprog", t, func(p proc.Process, fixture protest.Fixture) {
setFunctionBreakpoint(p, t, "main.sayhi")
......@@ -540,6 +543,9 @@ func TestNextConcurrent(t *testing.T) {
if runtime.GOOS == "freebsd" {
t.Skip("test is not valid on FreeBSD")
}
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
testcases := []nextTest{
{8, 9},
{9, 10},
......@@ -578,6 +584,9 @@ func TestNextConcurrentVariant2(t *testing.T) {
if runtime.GOOS == "freebsd" {
t.Skip("test is not valid on FreeBSD")
}
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
// Just like TestNextConcurrent but instead of removing the initial breakpoint we check that when it happens is for other goroutines
testcases := []nextTest{
{8, 9},
......@@ -820,6 +829,9 @@ func (l1 *loc) match(l2 proc.Stackframe) bool {
}
func TestStacktrace(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
stacks := [][]loc{
{{4, "main.stacktraceme"}, {8, "main.func1"}, {16, "main.main"}},
{{4, "main.stacktraceme"}, {8, "main.func1"}, {12, "main.func2"}, {17, "main.main"}},
......@@ -855,6 +867,9 @@ func TestStacktrace(t *testing.T) {
}
func TestStacktrace2(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
withTestProcess("retstack", t, func(p proc.Process, fixture protest.Fixture) {
assertNoError(proc.Continue(p), t, "Continue()")
......@@ -903,6 +918,9 @@ func stackMatch(stack []loc, locations []proc.Stackframe, skipRuntime bool) bool
}
func TestStacktraceGoroutine(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
mainStack := []loc{{14, "main.stacktraceme"}, {29, "main.main"}}
if goversion.VersionAfterOrEqual(runtime.Version(), 1, 11) {
mainStack[0].line = 15
......@@ -972,6 +990,9 @@ func TestStacktraceGoroutine(t *testing.T) {
}
func TestKill(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
if testBackend == "lldb" {
// k command presumably works but leaves the process around?
return
......@@ -1029,6 +1050,9 @@ func TestGetG(t *testing.T) {
}
func TestContinueMulti(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
protest.AllowRecording(t)
withTestProcess("integrationprog", t, func(p proc.Process, fixture protest.Fixture) {
bp1 := setFunctionBreakpoint(p, t, "main.main")
......@@ -1222,6 +1246,9 @@ func TestVariableEvaluation(t *testing.T) {
}
func TestFrameEvaluation(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
protest.AllowRecording(t)
withTestProcess("goroutinestackprog", t, func(p proc.Process, fixture protest.Fixture) {
setFunctionBreakpoint(p, t, "main.stacktraceme")
......@@ -1376,6 +1403,9 @@ func TestBreakpointCounts(t *testing.T) {
if runtime.GOOS == "freebsd" {
t.Skip("test is not valid on FreeBSD")
}
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
protest.AllowRecording(t)
withTestProcess("bpcountstest", t, func(p proc.Process, fixture protest.Fixture) {
bp := setFileBreakpoint(p, t, fixture.Source, 12)
......@@ -1702,6 +1732,9 @@ func TestIssue384(t *testing.T) {
}
func TestIssue332_Part1(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
// Next shouldn't step inside a function call
protest.AllowRecording(t)
withTestProcess("issue332", t, func(p proc.Process, fixture protest.Fixture) {
......@@ -1723,6 +1756,9 @@ func TestIssue332_Part1(t *testing.T) {
}
func TestIssue332_Part2(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
// Step should skip a function's prologue
// In some parts of the prologue, for some functions, the FDE data is incorrect
// which leads to 'next' and 'stack' failing with error "could not find FDE for PC: <garbage>"
......@@ -1909,6 +1945,9 @@ func TestNextParked(t *testing.T) {
if runtime.GOOS == "freebsd" {
t.Skip("test is not valid on FreeBSD")
}
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
protest.AllowRecording(t)
withTestProcess("parallel_next", t, func(p proc.Process, fixture protest.Fixture) {
bp := setFunctionBreakpoint(p, t, "main.sayhi")
......@@ -1959,6 +1998,9 @@ func TestNextParked(t *testing.T) {
}
func TestStepParked(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
if runtime.GOOS == "freebsd" {
t.Skip("test is not valid on FreeBSD")
}
......@@ -2094,6 +2136,9 @@ func TestIssue573(t *testing.T) {
}
func TestTestvariables2Prologue(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
withTestProcess("testvariables2", t, func(p proc.Process, fixture protest.Fixture) {
addrEntry := p.BinInfo().LookupFunc["main.main"].Entry
addrPrologue := findFunctionLocation(p, t, "main.main")
......@@ -2282,6 +2327,9 @@ func TestStepConcurrentDirect(t *testing.T) {
if runtime.GOOS == "freebsd" {
t.Skip("test is not valid on FreeBSD")
}
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
protest.AllowRecording(t)
withTestProcess("teststepconcurrent", t, func(p proc.Process, fixture protest.Fixture) {
bp := setFileBreakpoint(p, t, fixture.Source, 37)
......@@ -2345,6 +2393,9 @@ func TestStepConcurrentDirect(t *testing.T) {
}
func TestStepConcurrentPtr(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
if runtime.GOOS == "freebsd" {
t.Skip("test is not valid on FreeBSD")
}
......@@ -2449,6 +2500,9 @@ func TestStepOutDeferReturnAndDirectCall(t *testing.T) {
const maxInstructionLength uint64 = 15
func TestStepOnCallPtrInstr(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
protest.AllowRecording(t)
withTestProcess("teststepprog", t, func(p proc.Process, fixture protest.Fixture) {
setFileBreakpoint(p, t, fixture.Source, 10)
......@@ -2657,6 +2711,9 @@ func getg(goid int, gs []*proc.G) *proc.G {
}
func TestStacktraceWithBarriers(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
// Go's Garbage Collector will insert stack barriers into stacks.
// This stack barrier is inserted by overwriting the return address for the
// stack frame with the address of runtime.stackBarrier.
......@@ -3219,6 +3276,9 @@ func frameInFile(frame proc.Stackframe, file string) bool {
}
func TestCgoStacktrace(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
if runtime.GOOS == "windows" {
ver, _ := goversion.Parse(runtime.Version())
if ver.Major > 0 && !ver.AfterOrEqual(goversion.GoVersion{1, 9, -1, 0, 0, ""}) {
......@@ -3324,6 +3384,9 @@ func TestCgoStacktrace(t *testing.T) {
}
func TestCgoSources(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
if runtime.GOOS == "windows" {
ver, _ := goversion.Parse(runtime.Version())
if ver.Major > 0 && !ver.AfterOrEqual(goversion.GoVersion{1, 9, -1, 0, 0, ""}) {
......@@ -3349,6 +3412,9 @@ func TestCgoSources(t *testing.T) {
}
func TestSystemstackStacktrace(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
// check that we can follow a stack switch initiated by runtime.systemstack()
withTestProcess("panic", t, func(p proc.Process, fixture protest.Fixture) {
setFunctionBreakpoint(p, t, "runtime.startpanic_m")
......@@ -3367,6 +3433,9 @@ func TestSystemstackStacktrace(t *testing.T) {
}
func TestSystemstackOnRuntimeNewstack(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
// The bug being tested here manifests as follows:
// - set a breakpoint somewhere or interrupt the program with Ctrl-C
// - try to look at stacktraces of other goroutines
......@@ -3400,6 +3469,9 @@ func TestSystemstackOnRuntimeNewstack(t *testing.T) {
}
func TestIssue1034(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
// The external linker on macOS produces an abbrev for DW_TAG_subprogram
// without the "has children" flag, we should support this.
withTestProcess("cgostacktest/", t, func(p proc.Process, fixture protest.Fixture) {
......@@ -3417,6 +3489,9 @@ func TestIssue1034(t *testing.T) {
}
func TestIssue1008(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
// The external linker on macOS inserts "end of sequence" extended opcodes
// in debug_line. which we should support correctly.
withTestProcess("cgostacktest/", t, func(p proc.Process, fixture protest.Fixture) {
......@@ -3533,6 +3608,9 @@ func TestIssue1145(t *testing.T) {
}
func TestDisassembleGlobalVars(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
withTestProcess("teststepconcurrent", t, func(p proc.Process, fixture protest.Fixture) {
mainfn := p.BinInfo().LookupFunc["main.main"]
regs, _ := p.CurrentThread().Registers(false)
......@@ -3590,6 +3668,9 @@ func TestAllPCsForFileLines(t *testing.T) {
}
func TestInlinedStacktraceAndVariables(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
if ver, _ := goversion.Parse(runtime.Version()); ver.Major >= 0 && !ver.AfterOrEqual(goversion.GoVersion{1, 10, -1, 0, 0, ""}) {
// Versions of go before 1.10 do not have DWARF information for inlined calls
t.Skip("inlining not supported")
......@@ -3837,6 +3918,9 @@ func TestIssue951(t *testing.T) {
}
func TestDWZCompression(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
// If dwz is not available in the system, skip this test
if _, err := exec.LookPath("dwz"); err != nil {
t.Skip("dwz not installed")
......@@ -3878,6 +3962,9 @@ func TestMapLoadConfigWithReslice(t *testing.T) {
}
func TestStepOutReturn(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
ver, _ := goversion.Parse(runtime.Version())
if ver.Major >= 0 && !ver.AfterOrEqual(goversion.GoVersion{1, 10, -1, 0, 0, ""}) {
t.Skip("return variables aren't marked on 1.9 or earlier")
......@@ -4018,6 +4105,9 @@ func TestReadDefer(t *testing.T) {
}
func TestNextUnknownInstr(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
if !goversion.VersionAfterOrEqual(runtime.Version(), 1, 10) {
t.Skip("versions of Go before 1.10 can't assemble the instruction VPUNPCKLWD")
}
......@@ -4029,6 +4119,9 @@ func TestNextUnknownInstr(t *testing.T) {
}
func TestReadDeferArgs(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
var tests = []struct {
frame, deferCall int
a, b int64
......@@ -4072,6 +4165,9 @@ func TestReadDeferArgs(t *testing.T) {
}
func TestIssue1374(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
// Continue did not work when stopped at a breakpoint immediately after calling CallFunction.
protest.MustSupportFunctionCalls(t, testBackend)
withTestProcess("issue1374", t, func(p proc.Process, fixture protest.Fixture) {
......@@ -4291,6 +4387,9 @@ func TestCallConcurrent(t *testing.T) {
if runtime.GOOS == "freebsd" {
t.Skip("test is not valid on FreeBSD")
}
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
protest.MustSupportFunctionCalls(t, testBackend)
withTestProcess("teststepconcurrent", t, func(p proc.Process, fixture protest.Fixture) {
bp := setFileBreakpoint(p, t, fixture.Source, 24)
......@@ -4372,6 +4471,9 @@ func TestIssue1615(t *testing.T) {
}
func TestCgoStacktrace2(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
if runtime.GOOS == "windows" {
t.Skip("fixture crashes go runtime on windows")
}
......@@ -4387,6 +4489,9 @@ func TestCgoStacktrace2(t *testing.T) {
}
func TestIssue1656(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
withTestProcess("issue1656/", t, func(p proc.Process, fixture protest.Fixture) {
setFileBreakpoint(p, t, filepath.ToSlash(filepath.Join(fixture.BuildDir, "main.s")), 5)
assertNoError(proc.Continue(p), t, "Continue()")
......
......@@ -2,6 +2,7 @@ package proc_test
import (
"path/filepath"
"runtime"
"testing"
"github.com/go-delve/delve/pkg/proc"
......@@ -9,6 +10,9 @@ import (
)
func TestGoroutineCreationLocation(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
protest.AllowRecording(t)
withTestProcess("goroutinestackprog", t, func(p proc.Process, fixture protest.Fixture) {
bp := setFunctionBreakpoint(p, t, "main.agoroutine")
......
......@@ -266,6 +266,9 @@ func TestIssue354(t *testing.T) {
}
func TestIssue411(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
test.AllowRecording(t)
withTestTerminal("math", t, func(term *FakeTerminal) {
term.MustExec("break math.go:8")
......@@ -279,6 +282,9 @@ func TestIssue411(t *testing.T) {
}
func TestScopePrefix(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
const goroutinesLinePrefix = " Goroutine "
const goroutinesCurLinePrefix = "* Goroutine "
test.AllowRecording(t)
......@@ -420,6 +426,9 @@ func TestScopePrefix(t *testing.T) {
}
func TestOnPrefix(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
if runtime.GOOS == "freebsd" {
t.Skip("test is not valid on FreeBSD")
}
......@@ -476,6 +485,9 @@ func TestNoVars(t *testing.T) {
}
func TestOnPrefixLocals(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
if runtime.GOOS == "freebsd" {
t.Skip("test is not valid on FreeBSD")
}
......@@ -534,6 +546,9 @@ func countOccurrences(s string, needle string) int {
}
func TestIssue387(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
if runtime.GOOS == "freebsd" {
t.Skip("test is not valid on FreeBSD")
}
......@@ -663,6 +678,9 @@ func TestCheckpoints(t *testing.T) {
}
func TestNextWithCount(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
test.AllowRecording(t)
withTestTerminal("nextcond", t, func(term *FakeTerminal) {
term.MustExec("break main.main")
......@@ -831,6 +849,9 @@ func TestIssue1090(t *testing.T) {
}
func TestPrintContextParkedGoroutine(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
withTestTerminal("goroutinestackprog", t, func(term *FakeTerminal) {
term.MustExec("break stacktraceme")
term.MustExec("continue")
......@@ -866,6 +887,9 @@ func TestPrintContextParkedGoroutine(t *testing.T) {
}
func TestStepOutReturn(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
ver, _ := goversion.Parse(runtime.Version())
if ver.Major >= 0 && !ver.AfterOrEqual(goversion.GoVersion{1, 10, -1, 0, 0, ""}) {
t.Skip("return variables aren't marked on 1.9 or earlier")
......@@ -904,6 +928,9 @@ func TestOptimizationCheck(t *testing.T) {
}
func TestTruncateStacktrace(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
withTestTerminal("stacktraceprog", t, func(term *FakeTerminal) {
term.MustExec("break main.stacktraceme")
term.MustExec("continue")
......@@ -921,6 +948,9 @@ func TestTruncateStacktrace(t *testing.T) {
}
func TestIssue1493(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
// The 'regs' command without the '-a' option should only return
// general purpose registers.
withTestTerminal("continuetestprog", t, func(term *FakeTerminal) {
......@@ -941,6 +971,9 @@ func findStarFile(name string) string {
}
func TestIssue1598(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
test.MustSupportFunctionCalls(t, testBackend)
withTestTerminal("issue1598", t, func(term *FakeTerminal) {
term.MustExec("break issue1598.go:5")
......
......@@ -2,11 +2,15 @@ package terminal
import (
"fmt"
"runtime"
"strings"
"testing"
)
func TestStarlarkExamples(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
withTestTerminal("testvariables2", t, func(term *FakeTerminal) {
term.MustExec("continue")
t.Run("goroutine_start_line", func(t *testing.T) { testStarlarkExampleGoroutineStartLine(t, term) })
......
......@@ -191,6 +191,9 @@ func Test1ClientServer_exit(t *testing.T) {
}
func Test1ClientServer_step(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
withTestClient1("testprog", t, func(c *rpc1.RPCClient) {
_, err := c.CreateBreakpoint(&api.Breakpoint{FunctionName: "main.helloworld", Line: -1})
if err != nil {
......@@ -724,6 +727,9 @@ func Test1ClientServer_SetVariable(t *testing.T) {
}
func Test1ClientServer_FullStacktrace(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
withTestClient1("goroutinestackprog", t, func(c *rpc1.RPCClient) {
_, err := c.CreateBreakpoint(&api.Breakpoint{FunctionName: "main.stacktraceme", Line: -1})
assertNoError(err, t, "CreateBreakpoint()")
......@@ -796,6 +802,9 @@ func Test1ClientServer_FullStacktrace(t *testing.T) {
}
func Test1Issue355(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
// After the target process has terminated should return an error but not crash
withTestClient1("continuetestprog", t, func(c *rpc1.RPCClient) {
bp, err := c.CreateBreakpoint(&api.Breakpoint{FunctionName: "main.sayhi", Line: -1})
......@@ -854,6 +863,9 @@ func Test1Issue355(t *testing.T) {
}
func Test1Disasm(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
// Tests that disassembling by PC, range, and current PC all yeld similar results
// Tests that disassembly by current PC will return a disassembly containing the instruction at PC
// Tests that stepping on a calculated CALL instruction will yield a disassembly that contains the
......
......@@ -246,6 +246,9 @@ func TestClientServer_step(t *testing.T) {
}
func TestClientServer_stepout(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
protest.AllowRecording(t)
withTestClient2("testnextprog", t, func(c service.Client) {
_, err := c.CreateBreakpoint(&api.Breakpoint{FunctionName: "main.helloworld", Line: -1})
......@@ -803,6 +806,9 @@ func TestClientServer_SetVariable(t *testing.T) {
}
func TestClientServer_FullStacktrace(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
protest.AllowRecording(t)
withTestClient2("goroutinestackprog", t, func(c service.Client) {
_, err := c.CreateBreakpoint(&api.Breakpoint{FunctionName: "main.stacktraceme", Line: -1})
......@@ -876,6 +882,9 @@ func TestClientServer_FullStacktrace(t *testing.T) {
}
func TestIssue355(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
// After the target process has terminated should return an error but not crash
protest.AllowRecording(t)
withTestClient2("continuetestprog", t, func(c service.Client) {
......@@ -939,6 +948,9 @@ func TestIssue355(t *testing.T) {
}
func TestDisasm(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
// Tests that disassembling by PC, range, and current PC all yeld similar results
// Tests that disassembly by current PC will return a disassembly containing the instruction at PC
// Tests that stepping on a calculated CALL instruction will yield a disassembly that contains the
......@@ -1098,6 +1110,9 @@ func clientEvalVariable(t *testing.T, c service.Client, expr string) *api.Variab
}
func TestSkipPrologue(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
withTestClient2("locationsprog2", t, func(c service.Client) {
<-c.Continue()
......@@ -1114,6 +1129,9 @@ func TestSkipPrologue(t *testing.T) {
}
func TestSkipPrologue2(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
withTestClient2("callme", t, func(c service.Client) {
callme := findLocationHelper(t, c, "main.callme", false, 1, 0)[0]
callmeZ := uint64(clientEvalVariable(t, c, "main.callme").Addr)
......@@ -1249,6 +1267,9 @@ func TestClientServer_Issue528(t *testing.T) {
}
func TestClientServer_FpRegisters(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
regtests := []struct{ name, value string }{
{"ST(0)", "0x3fffe666660000000000"},
{"ST(1)", "0x3fffd9999a0000000000"},
......@@ -1429,6 +1450,9 @@ func TestClientServer_collectBreakpointInfoError(t *testing.T) {
}
func TestClientServerConsistentExit(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
// This test is useful because it ensures that Next and Continue operations both
// exit with the same exit status and details when the target application terminates.
// Other program execution API calls should also behave in the same way.
......@@ -1457,6 +1481,9 @@ func TestClientServerConsistentExit(t *testing.T) {
}
func TestClientServer_StepOutReturn(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
ver, _ := goversion.Parse(runtime.Version())
if ver.Major >= 0 && !ver.AfterOrEqual(goversion.GoVersion{1, 10, -1, 0, 0, ""}) {
t.Skip("return variables aren't marked on 1.9 or earlier")
......@@ -1559,6 +1586,9 @@ func mustHaveDebugCalls(t *testing.T, c service.Client) {
}
func TestClientServerFunctionCall(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
protest.MustSupportFunctionCalls(t, testBackend)
withTestClient2("fncall", t, func(c service.Client) {
mustHaveDebugCalls(t, c)
......@@ -1590,6 +1620,9 @@ func TestClientServerFunctionCall(t *testing.T) {
}
func TestClientServerFunctionCallBadPos(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
protest.MustSupportFunctionCalls(t, testBackend)
if goversion.VersionAfterOrEqual(runtime.Version(), 1, 12) {
t.Skip("this is a safe point for Go 1.12")
......@@ -1617,6 +1650,9 @@ func TestClientServerFunctionCallBadPos(t *testing.T) {
}
func TestClientServerFunctionCallPanic(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
protest.MustSupportFunctionCalls(t, testBackend)
withTestClient2("fncall", t, func(c service.Client) {
mustHaveDebugCalls(t, c)
......@@ -1643,6 +1679,9 @@ func TestClientServerFunctionCallPanic(t *testing.T) {
}
func TestClientServerFunctionCallStacktrace(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
protest.MustSupportFunctionCalls(t, testBackend)
withTestClient2("fncall", t, func(c service.Client) {
mustHaveDebugCalls(t, c)
......@@ -1715,6 +1754,9 @@ func (c *brokenRPCClient) call(method string, args, reply interface{}) error {
}
func TestUnknownMethodCall(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
clientConn, _ := startServer("continuetestprog", t)
client := &brokenRPCClient{jsonrpc.NewClient(clientConn)}
client.call("SetApiVersion", api.SetAPIVersionIn{2}, &api.SetAPIVersionOut{})
......
......@@ -1126,6 +1126,9 @@ type testCaseCallFunction struct {
}
func TestCallFunction(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
protest.MustSupportFunctionCalls(t, testBackend)
var testcases = []testCaseCallFunction{
......@@ -1409,6 +1412,9 @@ func assertCurrentLocationFunction(p proc.Process, t *testing.T, fnname string)
}
func TestPluginVariables(t *testing.T) {
if runtime.GOARCH == "arm64" {
t.Skip("test is not valid on ARM64")
}
pluginFixtures := protest.WithPlugins(t, protest.AllNonOptimized, "plugin1/", "plugin2/")
withTestProcessArgs("plugintest2", t, ".", []string{pluginFixtures[0].Path, pluginFixtures[1].Path}, protest.AllNonOptimized, func(p proc.Process, fixture protest.Fixture) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册