cpu: add riscv64 hwprobe drift test

Add a test that checks the Linux/riscv64 riscv_hwprobe constants, syscall
number, and pair layout copied into x/sys/cpu stay in sync with the
generated x/sys/unix sources.

The cpu package cannot depend on unix in production, but test files can
import it. Compare the copied definitions directly with unix rather than
parsing source files.

Updates golang/go#61416

Co-authored-by: YuanSheng <yuansheng@isrc.iscas.ac.cn>
Change-Id: I01407445099424b429d2494b63c05ef1bba746ef
Reviewed-on: https://go-review.googlesource.com/c/sys/+/800020
Auto-Submit: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
1 file changed
tree: 37985e8845a022794d0bb2eacec7d9dfb392ee5d
  1. cpu/
  2. execabs/
  3. plan9/
  4. unix/
  5. windows/
  6. .gitattributes
  7. .gitignore
  8. codereview.cfg
  9. CONTRIBUTING.md
  10. go.mod
  11. LICENSE
  12. PATENTS
  13. README.md
README.md

sys

Go Reference

This repository holds supplemental Go packages for low-level interactions with the operating system.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://go.dev/doc/contribute.

The git repository is https://go.googlesource.com/sys.

The main issue tracker for the sys repository is located at https://go.dev/issues. Prefix your issue with “x/sys:” in the subject line, so it is easy to find.