From 7f331e0e1735449380299654dc915fb5c8fe84ab Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Sat, 25 Jan 2020 03:10:04 +1100 Subject: [PATCH] test: adjust tests for riscv64 This disables some tests that are unsupported on riscv64 and adds support for risc64 to test/nosplit. Updates #27532, #36739 and #36765 Change-Id: I0a57797a05bc80236709fc240c0a0efb0ee0d16b Reviewed-on: https://go-review.googlesource.com/c/go/+/216263 Reviewed-by: Brad Fitzpatrick --- test/fixedbugs/issue10607.go | 5 ++++- test/inline_sync.go | 5 ++++- test/nosplit.go | 3 +++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/test/fixedbugs/issue10607.go b/test/fixedbugs/issue10607.go index 8831547da8..6f4717d820 100644 --- a/test/fixedbugs/issue10607.go +++ b/test/fixedbugs/issue10607.go @@ -1,4 +1,4 @@ -// +build linux,!ppc64 +// +build linux,!ppc64,!riscv64 // run // Copyright 2015 The Go Authors. All rights reserved. @@ -8,6 +8,9 @@ // Test that a -B option is passed through when using both internal // and external linking mode. +// TODO(jsing): Re-enable on riscv64 when it has support for external +// linking - see golang.org/issue/36739 + package main import ( diff --git a/test/inline_sync.go b/test/inline_sync.go index 30b436af41..c37cb136f7 100644 --- a/test/inline_sync.go +++ b/test/inline_sync.go @@ -1,4 +1,4 @@ -// +build !nacl,!386,!wasm,!arm,!gcflags_noopt +// +build !nacl,!386,!wasm,!arm,!riscv64,!gcflags_noopt // errorcheck -0 -m // Copyright 2019 The Go Authors. All rights reserved. @@ -14,6 +14,9 @@ // of the sync fast paths. This test should be re-enabled once the problem // is solved. +// TODO(jsing): Re-enable on riscv64 when it has atomic intrinsics - see +// golang.org/issue/36765 + package foo import ( diff --git a/test/nosplit.go b/test/nosplit.go index 3b7e605999..ad19d8a2b5 100644 --- a/test/nosplit.go +++ b/test/nosplit.go @@ -283,6 +283,9 @@ TestCases: case "amd64": ptrSize = 8 fmt.Fprintf(&buf, "#define REGISTER AX\n") + case "riscv64": + ptrSize = 8 + fmt.Fprintf(&buf, "#define REGISTER A0\n") case "s390x": ptrSize = 8 fmt.Fprintf(&buf, "#define REGISTER R10\n") -- 2.50.0