Add a test using its own executor (until the Kani library includes one)#1658
Merged
danielsn merged 5 commits intomodel-checking:mainfrom Sep 17, 2022
Merged
Add a test using its own executor (until the Kani library includes one)#1658danielsn merged 5 commits intomodel-checking:mainfrom
danielsn merged 5 commits intomodel-checking:mainfrom
Conversation
4 tasks
danielsn
reviewed
Sep 9, 2022
| } | ||
|
|
||
| /// Adds a future to the scheduler's task list, returning a JoinHandle | ||
| pub fn spawn<F: Future<Output = ()> + Sync + 'static>(&mut self, fut: F) -> JoinHandle { |
Contributor
There was a problem hiding this comment.
What happens if you spawn more than MAX_TASKS
Contributor
Author
There was a problem hiding this comment.
I'll add such a test to the libary PR, but since the number of tasks is always two in the test case in this file, I don't think this warrants the additional complexity.
danielsn
reviewed
Sep 9, 2022
|
|
||
| #[kani::proof] | ||
| #[kani::unwind(4)] | ||
| fn deterministic_schedule() { |
danielsn
reviewed
Sep 9, 2022
| } | ||
|
|
||
| #[kani::proof] | ||
| #[kani::unwind(4)] |
Contributor
Author
There was a problem hiding this comment.
About 15 seconds on my machine.
danielsn
approved these changes
Sep 9, 2022
Contributor
|
Approved modulo comments |
Contributor
Author
|
@danielsn Can you merge this please? |
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.
This adds a test involving an executor written by the user. Long term, we want such an executor to be in the standard library but this is not currently possible because of linking issues.
Related issues:
Related: #1504
Testing:
How is this change tested? It's an added test
Is this a refactor change? No
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.