generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 128
Fast fail feature - Stops verification process as soon as one failure is observed - Use case : CI speed up #3879
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
Merged
zhassan-aws
merged 12 commits into
model-checking:main
from
rajath-mk:fast-fail-feature
Feb 11, 2025
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
6340423
Add fail-fast flag --> Integration pending, added fail fast functiona…
rajath-mk ac18579
updated test case --> n harnesses with fixed number of threads (4), o…
rajath-mk 88e6bed
indexed failure fetch, using custom errorImpl
rajath-mk c5f8097
minimize computation by passing result directly
rajath-mk d22d8be
removed redundant compile time flags, added check for flag.
rajath-mk 0991f57
Added testcase. fixed minor comments.
rajath-mk e1dd014
formatting fix
rajath-mk 586c230
Update kani-driver/src/args/mod.rs
rajath-mk bf4e9ea
better naming conventions
rajath-mk 52936f2
Merge branch 'fast-fail-feature' of https://github.com/rajath-mk/kani…
rajath-mk dea738f
fix linter warnings/errors
rajath-mk 636b28d
Merge branch 'main' into fast-fail-feature
rajath-mk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
1 change: 1 addition & 0 deletions
1
tests/ui/multiple-harnesses/stop_at_single_fail/fail_fast_test.expected
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Complete - 0 successfully verified harnesses, 1 failures, 1 total. |
26 changes: 26 additions & 0 deletions
26
tests/ui/multiple-harnesses/stop_at_single_fail/fail_fast_test.rs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| // Copyright Kani Contributors | ||
| // SPDX-License-Identifier: Apache-2.0 OR MIT | ||
| // kani-flags: --fail-fast | ||
| //! Ensure that the verification process stops as soon as one of the harnesses fails. | ||
|
|
||
rajath-mk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| mod tests { | ||
| #[kani::proof] | ||
| fn test_01_fail() { | ||
| assert!(false, "First failure"); | ||
| } | ||
|
|
||
| #[kani::proof] | ||
| fn test_02_fail() { | ||
| assert!(false, "Second failure"); | ||
| } | ||
|
|
||
| #[kani::proof] | ||
| fn test_03_fail() { | ||
| assert!(false, "Third failure"); | ||
| } | ||
|
|
||
| #[kani::proof] | ||
| fn test_04_fail() { | ||
| assert!(false, "Fourth failure"); | ||
| } | ||
| } | ||
1 change: 1 addition & 0 deletions
1
tests/ui/multiple-harnesses/stop_at_single_fail/fail_fast_test_parallel.expected
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Complete - 0 successfully verified harnesses, 1 failures, 1 total. |
57 changes: 57 additions & 0 deletions
57
tests/ui/multiple-harnesses/stop_at_single_fail/fail_fast_test_parallel.rs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| // Copyright Kani Contributors | ||
| // SPDX-License-Identifier: Apache-2.0 OR MIT | ||
| // kani-flags: --fail-fast -Z unstable-options --jobs 4 --output-format=terse | ||
| //! Ensure that the verification process stops as soon as one of the harnesses fails. | ||
| //! This test runs on 4 parallel threads. Stops verification as soon as a harness on any of the threads fails. | ||
|
|
||
| mod tests { | ||
| #[kani::proof] | ||
| fn test_01_fail() { | ||
| assert!(false, "First failure"); | ||
| } | ||
|
|
||
| #[kani::proof] | ||
| fn test_02_fail() { | ||
| assert!(false, "Second failure"); | ||
| } | ||
|
|
||
| #[kani::proof] | ||
| fn test_03_fail() { | ||
| assert!(false, "Third failure"); | ||
| } | ||
|
|
||
| #[kani::proof] | ||
| fn test_04_fail() { | ||
| assert!(false, "Fourth failure"); | ||
| } | ||
|
|
||
| #[kani::proof] | ||
| fn test_05_fail() { | ||
| assert!(false, "Fifth failure"); | ||
| } | ||
|
|
||
| #[kani::proof] | ||
| fn test_06_fail() { | ||
| assert!(false, "Sixth failure"); | ||
| } | ||
|
|
||
| #[kani::proof] | ||
| fn test_07_fail() { | ||
| assert!(false, "Seventh failure"); | ||
| } | ||
|
|
||
| #[kani::proof] | ||
| fn test_08_fail() { | ||
| assert!(false, "Eighth failure"); | ||
| } | ||
|
|
||
| #[kani::proof] | ||
| fn test_09_fail() { | ||
| assert!(false, "Ninth failure"); | ||
| } | ||
|
|
||
| #[kani::proof] | ||
| fn test_10_fail() { | ||
| assert!(false, "Tenth failure"); | ||
| } | ||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.