Skip to content

Commit 109f4a2

Browse files
roypatzulinx86
authored andcommitted
kani: Upgrade to 0.53.0
The kani::ensures attribute now requires a closure instead of just an expression. Signed-off-by: Patrick Roy <[email protected]>
1 parent 0dcc352 commit 109f4a2

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/vmm/src/rate_limiter/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const NANOSEC_IN_ONE_MILLISEC: u64 = 1_000_000;
2828
// Euclid's two-thousand-year-old algorithm for finding the greatest common divisor.
2929
#[cfg_attr(kani, kani::requires(x > 0 && y > 0))]
3030
#[cfg_attr(kani, kani::ensures(
31-
result != 0
31+
|&result| result != 0
3232
&& x % result == 0
3333
&& y % result == 0
3434
))]

tests/integration_tests/test_kani.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ def test_kani(results_dir):
2424
"""
2525
Test all Kani proof harnesses.
2626
"""
27-
# --enable-stubbing is required to enable the stubbing feature
27+
# -Z stubbing is required to enable the stubbing feature
28+
# -Z function-contracts is required to enable the function contracts feature
2829
# --restrict-vtable is required for some virtio queue proofs, which go out of memory otherwise
2930
# -j enables kani harnesses to be verified in parallel (required to keep CI time low)
3031
# --output-format terse is required by -j
31-
# --enable-unstable is needed for each of the above
32+
# --enable-unstable is needed to enable `-Z` flags
3233
_, stdout, _ = utils.check_output(
3334
"cargo kani --enable-unstable -Z stubbing -Z function-contracts --restrict-vtable -j --output-format terse"
3435
)

0 commit comments

Comments
 (0)