Repository navigation
ci: run the Rust unit tests natively and under Miri - #128
Merged
Merged
Conversation
Cover the heap invariant, lazy sort keys and pending pushes in LazyHeap, and links, the free list cap and edge cases in LinkedList. Each type also gets a random-operations test against a simple std model. None of this code calls into libpython, so all of it runs under Miri.
cargo test on stable, and cargo miri test on nightly to check the unsafe code in hashbrown, LinkedList and LazyHeap for undefined behaviour and leaks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #126.
LazyHeapandLinkedListget unit tests (11 new): the heap invariant, lazy sort keys and pending pushes; links, the free-list cap and edge cases; plus a random-operations test against a std model for each.Rust Testworkflow with two jobs:cargo teston stable andcargo +nightly miri test. Miri covershashbrown,LinkedListandLazyHeap, since they don't call into libpython.All 18 tests pass natively and under Miri. Fork run: https://github.com/greenclaw/cachebox/actions/runs/41207192640. The jobs take about 20–30 s and 1.5 min and run in parallel with
Python Test.Miri runs on nightly, so a nightly regression could turn the job red without a change on our side. If that becomes annoying,
continue-on-error: trueon the job keeps it visible without blocking.