From a75bfb05b30bdc1e3400024d1d29612349280174 Mon Sep 17 00:00:00 2001 From: Iskander Sharipov Date: Tue, 14 May 2019 17:46:55 +0300 Subject: [PATCH] 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/+/177077 Reviewed-by: Cherry Zhang --- src/cmd/internal/obj/x86/asm_test.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/cmd/internal/obj/x86/asm_test.go b/src/cmd/internal/obj/x86/asm_test.go index d1499dea7e..36c8fce675 100644 --- a/src/cmd/internal/obj/x86/asm_test.go +++ b/src/cmd/internal/obj/x86/asm_test.go @@ -6,6 +6,7 @@ package x86 import ( "cmd/internal/obj" + "cmd/internal/objabi" "testing" ) @@ -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.Headtype = objabi.Hlinux // See #32028 runTest(t, ctxtAMD64, oclassTestsAMD64) }) - t.Run("386", func(t *testing.T) { + t.Run("linux/386", func(t *testing.T) { ctxt386 := obj.Linknew(&Link386) + ctxt386.Headtype = objabi.Hlinux // See #32028 runTest(t, ctxt386, oclassTests386) }) } -- 2.50.0