-
Notifications
You must be signed in to change notification settings - Fork 134
Add async/await examples from tokio's test to a new "slow" test suite #1332
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
Conversation
|
The tests have very few comments making it difficult to understand what they're doing. Can you add some comments, at least for the ones for which you have an idea what the purpose of the test is? |
|
The tests compile under Kani now, but they take a very long time. I stopped the first harness ( |
I saw you're using |
@adpaco-aws I will try this, but it's hard to know upfront what the necessary limit will be. Maybe I should try a smaller limit and successively increase it until it passes. |
Progress reportSuccessful verification: 5 harnesses ( Failed verification:
I will increase the unwinding bound for the ones with too low a bound. |
Progress report after raising the unwind bound for some testsSuccessful verification: 13 harnesses ( Failed verification:
|
celinval
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you publish a PR for the examples that are already working?
|
So the regresion tests pass now, but they take between 120 min (ubuntu-20.04) and 204 min (macos-11). It probably makes more sense to have those in a separate "slow" test suite. As an alternative, we could add them as a compile-only test suite, which should be faster. |
|
I'd support adding a "slow" test suite, and running it nightly. I'm not sure how many concurrent runners we get at the free tier. If its sufficient, we could also make it a "non-required" test so we would get information if it failed, but it wouldn't block work on PRs. |
|
I've added a new slow test suite as suggested. |
|
Another idea that @adpaco-aws mentioned is to run the slow tests after merging into main. But for now, I think the most important thing is to get the tests into main at all. |
danielsn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you have tracking issue comments for the disabled tests?
.github/workflows/slow-tests.yml
Outdated
| name: Kani's slow tests | ||
| on: | ||
| schedule: | ||
| - cron: "30 5 * * *" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment explaining what this means
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| use std::pin::Pin; | ||
| use std::task::{Context, Poll}; | ||
|
|
||
| #[cfg(disabled)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why disabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to disable them, but wanted to keep the code to allow them to be enabled later, so I added a #[cfg] attribute. Not sure what your question is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add a comment explaining why each test is disabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
danielsn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved modulo comments
|
CI seems to have failed due to network issues, retrying |
|
@danielsn I don't have rights to merge anymore. Can you merge it for me please? |
|
Results of the slow test suite can be seen here: https://github.com/model-checking/kani/actions/workflows/slow-tests.yml |
I went through the tokio's test suite and identified a couple of test cases that don't use a lot of I/O (or replace it with a mock) so that they seem like a reasonable target for Kani.
Description of changes:
No changes to how Kani works, this only adds tests that are ignored for now.
Testing:
How is this change tested? No change of functionality, just adding tests
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.