]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/link: fix TestConsistentGoKindAndRuntimeType
authorAlessandro Arzilli <alessandro.arzilli@gmail.com>
Tue, 30 Jan 2024 16:28:35 +0000 (17:28 +0100)
committerCherry Mui <cherryyz@google.com>
Tue, 30 Jan 2024 20:32:26 +0000 (20:32 +0000)
Fixes TestConsistentGoKindAndRuntimeType broken by b89ad46, go.dev/cl/558275

Change-Id: Ia07a1bae3c74a1196f1d3f97136dc24a0b795fb7
Reviewed-on: https://go-review.googlesource.com/c/go/+/559575
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/cmd/link/internal/ld/dwarf_test.go

index e431427249db071a850a136afc3307458448b981..9c581953d5747567e9680ffaff12020dd67db06a 100644 (file)
@@ -2052,6 +2052,10 @@ func TestConsistentGoKindAndRuntimeType(t *testing.T) {
                if !hasRT || rtt == 0 {
                        continue
                }
+               // ... except unsafe.Pointer...
+               if name, _ := die.Val(intdwarf.DW_AT_name).(string); name == "unsafe.Pointer" {
+                       continue
+               }
                typesChecked++
                // ... we want to see a meaningful DW_AT_go_kind value.
                if val, ok := die.Val(intdwarf.DW_AT_go_kind).(int64); !ok || val == 0 {