proc/test: fix TestStepCallPtr on linux/386 (#2193)
The test needs to set a breakpoint on main.CallFn after the prologue, on linux/386 this function does not have any instruction after the prologue on the function header line because it doesn't need to allocate space for local variables. Change the fixture so that this isn't a problem. This bug results on the test failing a small percentage of the time. Co-authored-by: a <a@kra>
This commit is contained in:
parent
a2550b4809
commit
a31631b5f9
@ -2,12 +2,12 @@ package main
|
||||
|
||||
var n = 0
|
||||
|
||||
func CallFn2() {
|
||||
func CallFn2(x int) {
|
||||
n++
|
||||
}
|
||||
|
||||
func CallFn(fn func()) {
|
||||
fn()
|
||||
func CallFn(x int, fn func(x int)) {
|
||||
fn(x + 1)
|
||||
}
|
||||
|
||||
func CallEface(eface interface{}) {
|
||||
@ -17,6 +17,6 @@ func CallEface(eface interface{}) {
|
||||
}
|
||||
|
||||
func main() {
|
||||
CallFn(CallFn2)
|
||||
CallFn(0, CallFn2)
|
||||
CallEface(n)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user