diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e58fe14..e2d51615 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -124,3 +124,19 @@ jobs: with: config: .github/memory_statistics_config.json check_against: docs/doxygen/include/size_table.md + proof_ci: + runs-on: cbmc_ubuntu-latest_64-core + steps: + - name: Set up CBMC runner + uses: FreeRTOS/CI-CD-Github-Actions/set_up_cbmc_runner@main + with: + kissat_tag: latest + cbmc_version: "5.73.0" + - run: | + git submodule update --init --recursive --checkout + sudo apt-get update + sudo apt-get install --yes --no-install-recommends gcc-multilib build-essential + - name: Run CBMC + uses: FreeRTOS/CI-CD-Github-Actions/run_cbmc@main + with: + proofs_dir: test/cbmc/proofs diff --git a/test/cbmc/proofs/HTTPClient_AddHeader/Makefile b/test/cbmc/proofs/HTTPClient_AddHeader/Makefile index 7394ec1f..a9bd0f8b 100644 --- a/test/cbmc/proofs/HTTPClient_AddHeader/Makefile +++ b/test/cbmc/proofs/HTTPClient_AddHeader/Makefile @@ -58,4 +58,6 @@ PROOF_SOURCES += $(SRCDIR)/test/cbmc/stubs/httpHeaderStrncpy.c PROJECT_SOURCES += $(SRCDIR)/source/core_http_client.c +EXTERNAL_SAT_SOLVER := kissat + include ../Makefile.common diff --git a/test/cbmc/proofs/HTTPClient_AddRangeHeader/Makefile b/test/cbmc/proofs/HTTPClient_AddRangeHeader/Makefile index 71fcf7c5..20bfa6a9 100644 --- a/test/cbmc/proofs/HTTPClient_AddRangeHeader/Makefile +++ b/test/cbmc/proofs/HTTPClient_AddRangeHeader/Makefile @@ -48,4 +48,6 @@ PROOF_SOURCES += $(SRCDIR)/test/cbmc/stubs/httpHeaderStrncpy.c PROJECT_SOURCES += $(SRCDIR)/source/core_http_client.c +EXTERNAL_SAT_SOLVER := kissat + include ../Makefile.common diff --git a/test/cbmc/proofs/HTTPClient_InitializeRequestHeaders/Makefile b/test/cbmc/proofs/HTTPClient_InitializeRequestHeaders/Makefile index e8c8208d..509eeb59 100644 --- a/test/cbmc/proofs/HTTPClient_InitializeRequestHeaders/Makefile +++ b/test/cbmc/proofs/HTTPClient_InitializeRequestHeaders/Makefile @@ -57,4 +57,6 @@ PROOF_SOURCES += $(SRCDIR)/test/cbmc/stubs/httpHeaderStrncpy.c PROJECT_SOURCES += $(SRCDIR)/source/core_http_client.c +EXTERNAL_SAT_SOLVER := kissat + include ../Makefile.common diff --git a/test/cbmc/proofs/HTTPClient_InitializeRequestHeaders/cbmc-proof.txt b/test/cbmc/proofs/HTTPClient_InitializeRequestHeaders/cbmc-proof.txt deleted file mode 100644 index 6ed46f12..00000000 --- a/test/cbmc/proofs/HTTPClient_InitializeRequestHeaders/cbmc-proof.txt +++ /dev/null @@ -1 +0,0 @@ -# This file marks this directory as containing a CBMC proof. diff --git a/test/cbmc/proofs/HTTPClient_ReadHeader/Makefile b/test/cbmc/proofs/HTTPClient_ReadHeader/Makefile index f96dbc4e..f5155dc7 100644 --- a/test/cbmc/proofs/HTTPClient_ReadHeader/Makefile +++ b/test/cbmc/proofs/HTTPClient_ReadHeader/Makefile @@ -44,4 +44,6 @@ PROOF_SOURCES += $(SRCDIR)/test/cbmc/stubs/HTTPClient_ReadHeader_llhttp_execute. PROJECT_SOURCES += $(SRCDIR)/source/core_http_client.c +EXTERNAL_SAT_SOLVER := kissat + include ../Makefile.common diff --git a/test/cbmc/proofs/HTTPClient_Send/Makefile b/test/cbmc/proofs/HTTPClient_Send/Makefile index 49273bde..931729ad 100644 --- a/test/cbmc/proofs/HTTPClient_Send/Makefile +++ b/test/cbmc/proofs/HTTPClient_Send/Makefile @@ -74,4 +74,6 @@ PROOF_SOURCES += $(SRCDIR)/test/cbmc/stubs/httpHeaderStrncpy.c PROJECT_SOURCES += $(SRCDIR)/source/core_http_client.c +EXTERNAL_SAT_SOLVER := kissat + include ../Makefile.common diff --git a/test/cbmc/proofs/HTTPClient_strerror/Makefile b/test/cbmc/proofs/HTTPClient_strerror/Makefile index 05dfe5b5..ea3c41e3 100644 --- a/test/cbmc/proofs/HTTPClient_strerror/Makefile +++ b/test/cbmc/proofs/HTTPClient_strerror/Makefile @@ -33,4 +33,6 @@ PROOF_SOURCES += $(PROOFDIR)/$(HARNESS_FILE).c PROJECT_SOURCES += $(SRCDIR)/source/core_http_client.c +EXTERNAL_SAT_SOLVER := kissat + include ../Makefile.common diff --git a/test/cbmc/proofs/findHeaderFieldParserCallback/Makefile b/test/cbmc/proofs/findHeaderFieldParserCallback/Makefile index d6a98ee0..57d26c84 100644 --- a/test/cbmc/proofs/findHeaderFieldParserCallback/Makefile +++ b/test/cbmc/proofs/findHeaderFieldParserCallback/Makefile @@ -20,4 +20,6 @@ PROOF_SOURCES += $(SRCDIR)/test/cbmc/sources/http_cbmc_state.c PROJECT_SOURCES += $(SRCDIR)/source/core_http_client.c +EXTERNAL_SAT_SOLVER := kissat + include ../Makefile.common diff --git a/test/cbmc/proofs/findHeaderOnHeaderCompleteCallback/Makefile b/test/cbmc/proofs/findHeaderOnHeaderCompleteCallback/Makefile index 8df45dad..f39923a9 100644 --- a/test/cbmc/proofs/findHeaderOnHeaderCompleteCallback/Makefile +++ b/test/cbmc/proofs/findHeaderOnHeaderCompleteCallback/Makefile @@ -16,4 +16,6 @@ PROOF_SOURCES += $(SRCDIR)/test/cbmc/sources/http_cbmc_state.c PROJECT_SOURCES += $(SRCDIR)/source/core_http_client.c +EXTERNAL_SAT_SOLVER := kissat + include ../Makefile.common diff --git a/test/cbmc/proofs/findHeaderValueParserCallback/Makefile b/test/cbmc/proofs/findHeaderValueParserCallback/Makefile index 53ca9f71..226b1f8e 100644 --- a/test/cbmc/proofs/findHeaderValueParserCallback/Makefile +++ b/test/cbmc/proofs/findHeaderValueParserCallback/Makefile @@ -16,4 +16,6 @@ PROOF_SOURCES += $(SRCDIR)/test/cbmc/sources/http_cbmc_state.c PROJECT_SOURCES += $(SRCDIR)/source/core_http_client.c +EXTERNAL_SAT_SOLVER := kissat + include ../Makefile.common diff --git a/test/cbmc/proofs/httpParserOnBodyCallback/Makefile b/test/cbmc/proofs/httpParserOnBodyCallback/Makefile index 77d96812..9e3f8697 100644 --- a/test/cbmc/proofs/httpParserOnBodyCallback/Makefile +++ b/test/cbmc/proofs/httpParserOnBodyCallback/Makefile @@ -18,4 +18,6 @@ PROOF_SOURCES += $(SRCDIR)/test/cbmc/stubs/memmove.c PROJECT_SOURCES += $(SRCDIR)/source/core_http_client.c +EXTERNAL_SAT_SOLVER := kissat + include ../Makefile.common diff --git a/test/cbmc/proofs/httpParserOnBodyCallback/cbmc-proof.txt b/test/cbmc/proofs/httpParserOnBodyCallback/cbmc-proof.txt deleted file mode 100644 index 6ed46f12..00000000 --- a/test/cbmc/proofs/httpParserOnBodyCallback/cbmc-proof.txt +++ /dev/null @@ -1 +0,0 @@ -# This file marks this directory as containing a CBMC proof. diff --git a/test/cbmc/proofs/httpParserOnHeaderFieldCallback/Makefile b/test/cbmc/proofs/httpParserOnHeaderFieldCallback/Makefile index e7c3635b..9ea2d735 100644 --- a/test/cbmc/proofs/httpParserOnHeaderFieldCallback/Makefile +++ b/test/cbmc/proofs/httpParserOnHeaderFieldCallback/Makefile @@ -17,4 +17,6 @@ PROOF_SOURCES += $(SRCDIR)/test/cbmc/stubs/callback_stubs.c PROJECT_SOURCES += $(SRCDIR)/source/core_http_client.c +EXTERNAL_SAT_SOLVER := kissat + include ../Makefile.common diff --git a/test/cbmc/proofs/httpParserOnHeaderValueCallback/Makefile b/test/cbmc/proofs/httpParserOnHeaderValueCallback/Makefile index 8cae4cf9..5af9f46c 100644 --- a/test/cbmc/proofs/httpParserOnHeaderValueCallback/Makefile +++ b/test/cbmc/proofs/httpParserOnHeaderValueCallback/Makefile @@ -16,4 +16,6 @@ PROOF_SOURCES += $(SRCDIR)/test/cbmc/sources/http_cbmc_state.c PROJECT_SOURCES += $(SRCDIR)/source/core_http_client.c +EXTERNAL_SAT_SOLVER := kissat + include ../Makefile.common diff --git a/test/cbmc/proofs/httpParserOnHeadersCompleteCallback/Makefile b/test/cbmc/proofs/httpParserOnHeadersCompleteCallback/Makefile index 8c42da25..cc5f3836 100644 --- a/test/cbmc/proofs/httpParserOnHeadersCompleteCallback/Makefile +++ b/test/cbmc/proofs/httpParserOnHeadersCompleteCallback/Makefile @@ -17,4 +17,6 @@ PROOF_SOURCES += $(SRCDIR)/test/cbmc/stubs/callback_stubs.c PROJECT_SOURCES += $(SRCDIR)/source/core_http_client.c +EXTERNAL_SAT_SOLVER := kissat + include ../Makefile.common diff --git a/test/cbmc/proofs/httpParserOnMessageBeginCallback/Makefile b/test/cbmc/proofs/httpParserOnMessageBeginCallback/Makefile index 4b9e17dc..4441f791 100644 --- a/test/cbmc/proofs/httpParserOnMessageBeginCallback/Makefile +++ b/test/cbmc/proofs/httpParserOnMessageBeginCallback/Makefile @@ -16,4 +16,6 @@ PROOF_SOURCES += $(SRCDIR)/test/cbmc/sources/http_cbmc_state.c PROJECT_SOURCES += $(SRCDIR)/source/core_http_client.c +EXTERNAL_SAT_SOLVER := kissat + include ../Makefile.common diff --git a/test/cbmc/proofs/httpParserOnMessageCompleteCallback/Makefile b/test/cbmc/proofs/httpParserOnMessageCompleteCallback/Makefile index cd3074e3..dc76ba48 100644 --- a/test/cbmc/proofs/httpParserOnMessageCompleteCallback/Makefile +++ b/test/cbmc/proofs/httpParserOnMessageCompleteCallback/Makefile @@ -16,4 +16,6 @@ PROOF_SOURCES += $(SRCDIR)/test/cbmc/sources/http_cbmc_state.c PROJECT_SOURCES += $(SRCDIR)/source/core_http_client.c +EXTERNAL_SAT_SOLVER := kissat + include ../Makefile.common diff --git a/test/cbmc/proofs/httpParserOnStatusCallback/Makefile b/test/cbmc/proofs/httpParserOnStatusCallback/Makefile index da847919..f0454bf6 100644 --- a/test/cbmc/proofs/httpParserOnStatusCallback/Makefile +++ b/test/cbmc/proofs/httpParserOnStatusCallback/Makefile @@ -16,4 +16,6 @@ PROOF_SOURCES += $(SRCDIR)/test/cbmc/sources/http_cbmc_state.c PROJECT_SOURCES += $(SRCDIR)/source/core_http_client.c +EXTERNAL_SAT_SOLVER := kissat + include ../Makefile.common diff --git a/test/cbmc/proofs/lib/print_tool_versions.py b/test/cbmc/proofs/lib/print_tool_versions.py new file mode 100755 index 00000000..bdeb429e --- /dev/null +++ b/test/cbmc/proofs/lib/print_tool_versions.py @@ -0,0 +1,74 @@ +#!/usr/bin/env python3 +# +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: MIT-0 + + +import logging +import pathlib +import shutil +import subprocess + + +_TOOLS = [ + "cadical", + "cbmc", + "cbmc-viewer", + "cbmc-starter-kit-update", + "kissat", + "litani", +] + + +def _format_versions(table): + lines = [ + "
Tool Versions | |
{tool}: | ' + f'{v_str} |