Skip to content

Handling of expect_fail in the regression is broken #1538

Closed

Description

@celinval

I tried adding the following code to our test suite:

#[kani::proof]
fn check_obvious() {
    kani::expect_fail(true, "this won't fail");
}

using the following command line invocation:

./scripts/kani-regression.sh

with Kani version:

I expected to see this happen: Regression should fail since it has a kani::expect_fail() statement that does not fail.

Instead, this happened: Regression passed.

My suggestion is to actually deprecate kani::expect_fail() and have a proper kani::cover() implementation. In this case, kani itself should fail if a cover statement is unreachable or unsatisfied.

Note that a bunch of out tests depend on this mechanism to work properly and it is possible that we have regressions not being detected today. One example of this happening was #1533.

Activity

  1. added
    [C] Bug
    on Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [C] Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions