Skip to content

test: run riscv-qemu tests with both cores and tasks schedulers - #5897

Open
rdon-key wants to merge 1 commit into
tinygo-org:devfrom
rdon-key:ci/riscv-qemu-schedulers
Open

rdon-key wants to merge 1 commit into
tinygo-org:devfrom
rdon-key:ci/riscv-qemu-schedulers

Conversation

@rdon-key

Copy link
Copy Markdown
Contributor

Fixes #5896.

Extend TestBuild/EmulatedRISCV to run with both the cores and tasks schedulers.

Previously, only the default cores scheduler was tested.

Changes

  • Run EmulatedRISCV tests separately with cores and tasks.
  • Update the goroutines.go test exclusion to use the effective scheduler, respecting options.Scheduler when explicitly specified.
  • Preserve the existing scheduler-specific test exclusions.

Testing

Tested on Windows 11 with QEMU 11.1.0 and LLVM 22.1.4.

make test GOTESTPKGS=. \
  GOTESTFLAGS="-run '^TestBuild/EmulatedRISCV' -count=1 -v"

All tests passed with both schedulers.

  • cores: PASS
  • tasks: PASS (including goroutines.go)
  • Total execution time: 43 seconds

@dgryski dgryski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In principle this is fine but our CI servers are already pretty overloaded. I'd like to hear from @deadprogram first before approving this.

@jakebailey

Copy link
Copy Markdown
Member

I thought it was just macOS that was overloaded? I think adding more parallel Linux jobs does generally work?

@deadprogram

Copy link
Copy Markdown
Member

I thought it was just macOS that was overloaded? I think adding more parallel Linux jobs does generally work?

macOS is the most overloaded, but nearly all runners get queued these days. We are getting too much done! 😛

@deadprogram deadprogram left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this @rdon-key! I ran the tests on my local machine and looked it over. The following is edited from an automated review:

  1. Since this branch was made, dev added a coreassign.go test with a skip that still uses spec.Scheduler. The branch merges cleanly, but after the merge TestBuild/EmulatedRISCV/tasks/coreassign.go fails because the skip sees cores from the target spec:

    -second AssignCore panics: true
    +second AssignCore panics: false
    

    Please rebase on dev and change that check to use the new scheduler variable too:

    if name == "coreassign.go" && scheduler != "cores" {

    With that change, all of TestBuild/EmulatedRISCV passes for me with both schedulers.

What do you think of this?

@rdon-key
rdon-key force-pushed the ci/riscv-qemu-schedulers branch from ce924e8 to 22d7300 Compare October 18, 2026 02:50
@rdon-key

Copy link
Copy Markdown
Contributor Author

Thanks for catching this, Ron.

You're right, I missed the new coreassign.go test added to dev.
I've rebased onto dev and updated the coreassign.go skip condition to use the effective scheduler.
I reran TestBuild/EmulatedRISCV locally. All tests passed with both cores and tasks, including coreassign.go under cores.

Thanks for testing this on your side as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: test both cores and tasks schedulers on riscv-qemu

4 participants