Skip to content

Commit

Permalink
test: adjust tests for riscv64
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
4a6f656c committed Jan 25, 2020
1 parent 69660ed commit 7f331e0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion test/fixedbugs/issue10607.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build linux,!ppc64
// +build linux,!ppc64,!riscv64
// run

// Copyright 2015 The Go Authors. All rights reserved.
Expand All @@ -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 (
Expand Down
5 changes: 4 additions & 1 deletion test/inline_sync.go
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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 (
Expand Down
3 changes: 3 additions & 0 deletions test/nosplit.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 7f331e0

Please sign in to comment.