On Sat, Jul 22, 2017 at 11:08 AM, Uros Bizjak <ubiz...@gmail.com> wrote:
>> This patch to the gotools Makefile adds tests to `make check`.  We now
>> test the runtime package using the newly built go tool, and test that
>> cgo works by running the misc/cgo/test and misc/cgo/testcarchive
>> tests.  Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.
>> Committed to mainline.
>
> There is now only one remaining gotools testsuite failure on alpha:
>
> FAIL: TestBreakpoint
>         crash_test.go:106: testprog Breakpoint exit status: exit status 2
>         crash_test.go:310: output:
>                 SIGTRAP: trace trap
>                 PC=2199039253124 m=0 sigcode=0
>
>                 goroutine 1 [running]:
>
>                 goroutine 3 [runnable]:
>                 created by runtime.SetFinalizer
>
> /space/homedirs/uros/gcc-svn/trunk/libgo/go/runtime/mfinal.go:355
> +1280
>
>
>
>                 want output containing: runtime.Breakpoint
>
> I would like to debug this one failure only. Is there a way to run
> only one gotools test? Can you perhaps give a hint where to look in
> the source?

The test is TestBreakpoint in libgo/go/runtime/crash_test.go.  It is
testing that if it runs a program that calls `runtime.Breakpoint`,
then `runtime.Breakpoint` will appear in the stack trace that the
program emits.

It does this by building a test program.  The easy way to do this
yourself is to run `make install` in your GCC build directory, set
LD_LIBRARY_PATH if needed to include the newly installed libgo.so, and
then do

cd SRCDIR/libgo/go/runtime/testdata/testprog
go build    # run the `go` program installed from gotools, building
./testprog; you can use `go build -o /tmp/x` if you like
./testprog Breakpoint

On my x86_64 system that prints the appended, which includes the
desired `runtime.Breakpoint` string.  On your system it fails to print
a stack trace, but I don't know why.

Ian



SIGILL: illegal instruction
PC=140647499814795 m=0 sigcode=2

goroutine 1 [running]:

:0
runtime.Breakpoint
        ../../../gccgo3/libgo/go/runtime/proc.go:2812
main.Breakpoint
        
/home/iant/gofrontend3/libgo/go/runtime/testdata/testprog/deadlock.go:145
main.main
        /home/iant/gofrontend3/libgo/go/runtime/testdata/testprog/main.go:34

:0

rax    0x40687c
rbx    0xc4200307e0
rcx    0x746e
rdx    0xc42003c388
rdi    0x7ffca81b3697
rsi    0x40d910
rbp    0x7feb0ac87eb0
rsp    0x7feb0ac87ea8
r8     0x17
r9     0x3
r10    0x7feb0ac87c70
r11    0x7feb0c43d780
r12    0xc42006e220
r13    0x40e6e0
r14    0x7feb0caf34c0
r15    0x0
rip    0x7feb0c43d78b
rflags 0x10202
cs     0x33
fs     0x0
gs     0x0

Reply via email to