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

Kani cannot verify bolero harness after concrete test has been added #2475

Closed
celinval opened this issue May 25, 2023 · 0 comments · Fixed by #2476
Closed

Kani cannot verify bolero harness after concrete test has been added #2475

celinval opened this issue May 25, 2023 · 0 comments · Fixed by #2476
Assignees
Labels
[C] Bug This is a bug. Something isn't working.

Comments

@celinval
Copy link
Contributor

celinval commented May 25, 2023

I tried this code:

#[cfg(test)]
mod bolero_harness {
    #[test]
    #[cfg_attr(kani, kani::proof)]
    fn dummy_harness() {
        bolero::check!()
            .with_type()
            .cloned()
            .for_each(|(a, b): (u8, u8)| assert!(a < b || a > b));
    }
}

using the following command line sequence:

cargo kani --tests -Z concrete-playback --concrete-playback=inplace
cargo kani --tests

with Kani version:

I expected to see this happen: Both commands should succeed

Instead, this happened: The second command failed due to a compilation error

error[E0425]: cannot find function `concrete_playback_run` in crate `kani`
  --> src/lib.rs:
   |
   |         kani::concrete_playback_run(concrete_vals, fuzz_add);
   |               ^^^^^^^^^^^^^^^^^^^^^ not found in `kani`

The problem is that the harness uses a function that is only included when we execute concrete playback. We should still implement that function in verification mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C] Bug This is a bug. Something isn't working.
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants