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

Atomic unit tests #898

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

wesselfr
Copy link

This PR is aimed to adding unit-tests for the atomics added in #877
In addition, this PR is also adding atomic flags.

@wesselfr wesselfr requested a review from eddyb as a code owner August 11, 2022 09:05
@wesselfr wesselfr mentioned this pull request Aug 11, 2022
Copy link
Contributor

@eddyb eddyb left a comment

Choose a reason for hiding this comment

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

LGTM, modulo the Kernel capabilities and double-checking the generic_const_exprs feature-gate.

tests/ui/arch/atomics/atomic_xor.rs Outdated Show resolved Hide resolved
Comment on lines +15 to +16
// Ensure kernel capabilities.
unsafe { asm!("OpCapability Kernel") };
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have other tests that do this? My understanding was that we've given up on Kernel support (could be wrong though).

Copy link
Author

Choose a reason for hiding this comment

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

Kernel capability is required for the atomic flag operations. Other test that require specific capabilities are the atomic floats, which I've omitted for the reason that the capability is vendor specific (Nvidia only if I'm correct). The same can be done for the atomic flags tests if required

@wesselfr wesselfr requested a review from oisyn as a code owner August 15, 2022 10:03
@oisyn oisyn mentioned this pull request Nov 16, 2022
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.

None yet

2 participants