From e776ebaf01f3f3d86c1ab62bd6e36676c10cd806 Mon Sep 17 00:00:00 2001 From: Dave Thaler Date: Mon, 21 Nov 2022 13:12:28 -0800 Subject: [PATCH] Make prime conformance test fail verification Fixes #416 There may be a better fix that makes the test pass, but for now the fix implied by Jorge resolves the issue of an incorrect computation. Signed-off-by: Dave Thaler --- src/crab/fwd_analyzer.cpp | 4 +++- src/test/test_conformance.cpp | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/crab/fwd_analyzer.cpp b/src/crab/fwd_analyzer.cpp index ef2972a33..df6d11467 100644 --- a/src/crab/fwd_analyzer.cpp +++ b/src/crab/fwd_analyzer.cpp @@ -181,7 +181,9 @@ void interleaved_fwd_fixpoint_iterator_t::operator()(std::shared_ptr(c) || (std::get(c) != head)) + std::visit(*this, *component); } ebpf_domain_t new_pre = join_all_prevs(head); if (new_pre <= pre) { diff --git a/src/test/test_conformance.cpp b/src/test/test_conformance.cpp index 7b1403af2..653d32872 100644 --- a/src/test/test_conformance.cpp +++ b/src/test/test_conformance.cpp @@ -13,7 +13,7 @@ void test_conformance(std::string filename, bpf_conformance_test_result_t expect std::filesystem::path plugin_path = test_path.remove_filename().append("conformance_check" + extension.string()).string(); std::map> result = - bpf_conformance(test_files, plugin_path, {}); + bpf_conformance(test_files, plugin_path, {}, {}, {}, bpf_conformance_test_CPU_version_t::v3, {}, true); for (auto file : test_files) { auto& [file_result, reason] = result[file]; REQUIRE(file_result == expected_result); @@ -161,7 +161,7 @@ TEST_CONFORMANCE("mul64-imm.data") TEST_CONFORMANCE("mul64-reg.data") TEST_CONFORMANCE("neg.data") TEST_CONFORMANCE("neg64.data") -TEST_CONFORMANCE_FAIL("prime.data") +TEST_CONFORMANCE_VERIFICATION_FAILED("prime.data") TEST_CONFORMANCE("rsh-reg.data") TEST_CONFORMANCE("rsh32.data") TEST_CONFORMANCE_VERIFICATION_FAILED("stack.data")