mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 01:27:16 +08:00
test: fix tests on arm64
* remove skip-code of some arm64 tests, which implemented. * fix errors in testsuits for arm64
This commit is contained in:
@ -191,9 +191,6 @@ 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 {
|
||||
@ -728,7 +725,7 @@ func Test1ClientServer_SetVariable(t *testing.T) {
|
||||
|
||||
func Test1ClientServer_FullStacktrace(t *testing.T) {
|
||||
if runtime.GOARCH == "arm64" {
|
||||
t.Skip("test is not valid on ARM64")
|
||||
t.Skip("arm64 do not support Stacktrace for now")
|
||||
}
|
||||
withTestClient1("goroutinestackprog", t, func(c *rpc1.RPCClient) {
|
||||
_, err := c.CreateBreakpoint(&api.Breakpoint{FunctionName: "main.stacktraceme", Line: -1})
|
||||
@ -803,7 +800,7 @@ func Test1ClientServer_FullStacktrace(t *testing.T) {
|
||||
|
||||
func Test1Issue355(t *testing.T) {
|
||||
if runtime.GOARCH == "arm64" {
|
||||
t.Skip("test is not valid on ARM64")
|
||||
t.Skip("arm64 do not support Stacktrace for now")
|
||||
}
|
||||
// After the target process has terminated should return an error but not crash
|
||||
withTestClient1("continuetestprog", t, func(c *rpc1.RPCClient) {
|
||||
@ -863,9 +860,6 @@ 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
|
||||
@ -909,7 +903,7 @@ func Test1Disasm(t *testing.T) {
|
||||
// look for static call to afunction() on line 29
|
||||
found := false
|
||||
for i := range d3 {
|
||||
if d3[i].Loc.Line == 29 && strings.HasPrefix(d3[i].Text, "call") && d3[i].DestLoc != nil && d3[i].DestLoc.Function != nil && d3[i].DestLoc.Function.Name() == "main.afunction" {
|
||||
if d3[i].Loc.Line == 29 && (strings.HasPrefix(d3[i].Text, "call") || strings.HasPrefix(d3[i].Text, "CALL")) && d3[i].DestLoc != nil && d3[i].DestLoc.Function != nil && d3[i].DestLoc.Function.Name() == "main.afunction" {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
@ -954,7 +948,7 @@ func Test1Disasm(t *testing.T) {
|
||||
t.Fatal("Calling StepInstruction() repeatedly did not find the call instruction")
|
||||
}
|
||||
|
||||
if strings.HasPrefix(curinstr.Text, "call") {
|
||||
if strings.HasPrefix(curinstr.Text, "call") || strings.HasPrefix(curinstr.Text, "CALL") {
|
||||
t.Logf("call: %v", curinstr)
|
||||
if curinstr.DestLoc == nil || curinstr.DestLoc.Function == nil {
|
||||
t.Fatalf("Call instruction does not have destination: %v", curinstr)
|
||||
|
||||
Reference in New Issue
Block a user