• Hana Kim's avatar
    runtime/pprof: fix incorrect assumption in TestMapping · 88b442f5
    Hana Kim authored
    TestMapping assumed that there was only one mapping entry corresponding
    to /exe/main, but that is not always true.
    This CL changes the test logic to examine whether all referenced mappings
    are symbolized. Based on the result, the test determines whether the
    corresponding mapping entries' HasFunctions fields to be true or false.
    
    I initially attempted to create two mappings for referenced locations
    (one for symbolized and another for unsymbolized) as described in the
    TODO in proto.go as part of fixing this bug. But that change requires
    non-trivial modification in the upstream profile package so I decided
    to just fix the test for now.
    
    Fixes #25891
    
    Change-Id: Id27a5b07bb5b59e133755a0f863bf56c0a4f7f2b
    Reviewed-on: https://go-review.googlesource.com/119455
    Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    88b442f5
proto_test.go 10.2 KB