Skip to content

Commit db99e8a

Browse files
adonovangopherbot
authored andcommitted
gopls/internal/test/integration/misc: skip ASM assertions on risc64
It appears to be alone in using JAL instead of the CALL instruction. Fixes golang/go#67960 Change-Id: Ic7002caf418d0ffcf8592f1e255e6c8ea260909b Reviewed-on: https://go-review.googlesource.com/c/tools/+/592476 LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Alan Donovan <[email protected]> Reviewed-by: Robert Findley <[email protected]>
1 parent a852b25 commit db99e8a

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

gopls/internal/test/integration/misc/webserver_test.go

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -354,15 +354,21 @@ func g() {
354354
t.Log("showDocument(package doc) URL:", doc.URI)
355355

356356
// Get the report and do some minimal checks for sensible results.
357-
// Use only portable instructions below!
357+
//
358+
// Use only portable instructions below! Remember that
359+
// This is a test of plumbing, not compilation, so
360+
// it's better to skip the tests, rather than refine
361+
// them, on any architecture that gives us trouble.
358362
report := get(t, doc.URI)
359363
checkMatch(t, true, report, `TEXT.*example.com/a.f`)
360-
checkMatch(t, true, report, `CALL runtime.printlock`)
361-
checkMatch(t, true, report, `CALL runtime.printstring`)
362-
checkMatch(t, true, report, `CALL runtime.printunlock`)
363-
checkMatch(t, true, report, `CALL example.com/a.f.deferwrap1`)
364-
checkMatch(t, true, report, `RET`)
365-
checkMatch(t, true, report, `CALL runtime.morestack_noctxt`)
364+
if runtime.GOARCH != "risc64" { // RISC-V uses JAL instead of CALL
365+
checkMatch(t, true, report, `CALL runtime.printlock`)
366+
checkMatch(t, true, report, `CALL runtime.printstring`)
367+
checkMatch(t, true, report, `CALL runtime.printunlock`)
368+
checkMatch(t, true, report, `CALL example.com/a.f.deferwrap1`)
369+
checkMatch(t, true, report, `RET`)
370+
checkMatch(t, true, report, `CALL runtime.morestack_noctxt`)
371+
}
366372

367373
// Nested functions are also shown.
368374
checkMatch(t, true, report, `TEXT.*example.com/a.f.deferwrap1`)

0 commit comments

Comments
 (0)