Commit a75bfb05 authored by Iskander Sharipov's avatar Iskander Sharipov Committed by Brad Fitzpatrick

cmd/internal/obj/x86: fix oclass tests for Hsolaris

Use objabi.Hlinux for now.

Fixes #32028

Change-Id: If9745f72c0ee4444ea2a2faa50813d2e1ac2bf97
Reviewed-on: https://go-review.googlesource.com/c/go/+/177077Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
parent 6081a9f7
...@@ -6,6 +6,7 @@ package x86 ...@@ -6,6 +6,7 @@ package x86
import ( import (
"cmd/internal/obj" "cmd/internal/obj"
"cmd/internal/objabi"
"testing" "testing"
) )
...@@ -208,13 +209,17 @@ func TestOclass(t *testing.T) { ...@@ -208,13 +209,17 @@ func TestOclass(t *testing.T) {
} }
} }
t.Run("AMD64", func(t *testing.T) { // TODO(quasilyte): test edge cases for Hsolaris, etc?
t.Run("linux/AMD64", func(t *testing.T) {
ctxtAMD64 := obj.Linknew(&Linkamd64) ctxtAMD64 := obj.Linknew(&Linkamd64)
ctxtAMD64.Headtype = objabi.Hlinux // See #32028
runTest(t, ctxtAMD64, oclassTestsAMD64) runTest(t, ctxtAMD64, oclassTestsAMD64)
}) })
t.Run("386", func(t *testing.T) { t.Run("linux/386", func(t *testing.T) {
ctxt386 := obj.Linknew(&Link386) ctxt386 := obj.Linknew(&Link386)
ctxt386.Headtype = objabi.Hlinux // See #32028
runTest(t, ctxt386, oclassTests386) runTest(t, ctxt386, oclassTests386)
}) })
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment