From 5b90e0782fe35520a9c191c3a1327f3d53eab13b Mon Sep 17 00:00:00 2001 From: Babis Chalios Date: Mon, 2 Sep 2024 11:33:55 +0200 Subject: [PATCH] fix(test): increase timeout of kani tests Some changes that we did in the VirtIO queue in this PR: https://github.com/firecracker-microvm/firecracker/pull/4726 pushed kani proofs close to the time limit we set in the CI. This commit just increases the timeout from 30 to 40 minutes. (cherry picked from commit b8ca08e3c9c5dcb0e69c56be55f49b0fa7020f5a) Signed-off-by: Babis Chalios --- tests/integration_tests/test_kani.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/integration_tests/test_kani.py b/tests/integration_tests/test_kani.py index 896c0596b02..f8774aaa410 100644 --- a/tests/integration_tests/test_kani.py +++ b/tests/integration_tests/test_kani.py @@ -1,7 +1,7 @@ # Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ -Proofs ensuring memory safety properites, user-defined assertions, +Proofs ensuring memory safety properties, user-defined assertions, absence of panics and some types of unexpected behavior (e.g., arithmetic overflows). """ import os @@ -14,7 +14,9 @@ PLATFORM = platform.machine() -@pytest.mark.timeout(1800) +# The `check_output` timeout will always fire before this one, but we need to +# set a timeout here to override the default pytest timeout of 180s. +@pytest.mark.timeout(2420) @pytest.mark.skipif(PLATFORM != "x86_64", reason="Kani proofs run only on x86_64.") @pytest.mark.skipif( os.environ.get("BUILDKITE") != "true", @@ -31,7 +33,8 @@ def test_kani(results_dir): # --output-format terse is required by -j # --enable-unstable is needed to enable `-Z` flags _, stdout, _ = utils.check_output( - "cargo kani --enable-unstable -Z stubbing -Z function-contracts --restrict-vtable -j --output-format terse" + "cargo kani --enable-unstable -Z stubbing -Z function-contracts --restrict-vtable -j --output-format terse", + timeout=2400, ) (results_dir / "kani_log").write_text(stdout, encoding="utf-8")