Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use atomic for global counter used for parallel testing #1932

Merged
merged 2 commits into from
Apr 16, 2024

Conversation

mvertes
Copy link
Contributor

@mvertes mvertes commented Apr 15, 2024

This allows go test -race to pass ongnovm/pkg/gnolang when run in parallel mode with CPU > 1.
As we use lockless atomic instructions there should be no overhead.

Contributors' checklist...
  • [*] Added new tests, or not needed, or not feasible
  • [*] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • [*] Updated the official documentation or not needed
  • [*] No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

This allows `go test -race` to pass on`gnovm/pkg/gnolang`
when run in parallel mode with CPU > 1.
As we use lockless atomic instructions there should be no overhead.
@github-actions github-actions bot added the 📦 🤖 gnovm Issues or PRs gnovm related label Apr 15, 2024
Copy link

codecov bot commented Apr 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.08%. Comparing base (54bd960) to head (b6fb904).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1932      +/-   ##
==========================================
+ Coverage   45.07%   45.08%   +0.01%     
==========================================
  Files         464      464              
  Lines       68008    68000       -8     
==========================================
+ Hits        30652    30659       +7     
+ Misses      34781    34769      -12     
+ Partials     2575     2572       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mvertes mvertes merged commit b63e5ed into gnolang:master Apr 16, 2024
195 checks passed
@mvertes mvertes deleted the fix/atomic-global-counter branch April 16, 2024 15:33
omarsy pushed a commit to TERITORI/gno that referenced this pull request Apr 16, 2024
…#1932)

This allows `go test -race` to pass on`gnovm/pkg/gnolang` when run in
parallel mode with CPU > 1.
As we use lockless atomic instructions there should be no overhead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🤖 gnovm Issues or PRs gnovm related
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants