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

test(s2n-quic-core): use a smaller length in the Kani test #2128

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions quic/s2n-quic-core/src/inet/checksum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,13 +401,18 @@ mod tests {
}
}

// Reduce the length to 4 for Kani until
// https://github.com/model-checking/kani/issues/3030 is fixed
#[cfg(any(kani, miri))]
const LEN: usize = if cfg!(kani) { 4 } else { 32 };
Copy link
Contributor Author

@zhassan-aws zhassan-aws Feb 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed that I inadvertently changed the length for MIRI as well from 16 to 32. Is that OK, or should I revert it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we'll see if the CI job times out :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


/// * Compares the implementation to a port of the C code defined in the RFC
/// * Ensures partial writes are correctly handled, even if they're not at a 16 bit boundary
#[test]
#[cfg_attr(kani, kani::proof, kani::unwind(17), kani::solver(kissat))]
#[cfg_attr(kani, kani::proof, kani::unwind(9), kani::solver(cadical))]
fn differential() {
#[cfg(any(kani, miri))]
type Bytes = crate::testing::InlineVec<u8, 16>;
type Bytes = crate::testing::InlineVec<u8, LEN>;
#[cfg(not(any(kani, miri)))]
type Bytes = Vec<u8>;

Expand Down
Loading