diff --git a/.github/workflows/reusable-build-test-config.yml b/.github/workflows/reusable-build-test-config.yml index 9b2f692026..ea2901d3fe 100644 --- a/.github/workflows/reusable-build-test-config.yml +++ b/.github/workflows/reusable-build-test-config.yml @@ -295,7 +295,10 @@ jobs: - name: Run Rust tests if: ${{ !inputs.build_only }} working-directory: crates - run: cargo nextest run --workspace --all-features --locked --no-tests=warn + # `xrpl-wasm-vm-ffi` is left out on Windows: its tests link as an executable, and + # MSVC - unlike the Unix linkers - will not dead-strip the never-called cxx wrappers + # whose C++ shims only the CMake build defines. The other runners cover these tests. + run: cargo nextest run --workspace --all-features --locked --no-tests=warn ${{ runner.os == 'Windows' && '--exclude xrpl-wasm-vm-ffi' || '' }} - name: Run the separate tests if: ${{ !inputs.build_only }} diff --git a/src/libxrpl/tx/wasm/WasmVM.cpp b/src/libxrpl/tx/wasm/WasmVM.cpp index 5d148d8861..876a52b373 100644 --- a/src/libxrpl/tx/wasm/WasmVM.cpp +++ b/src/libxrpl/tx/wasm/WasmVM.cpp @@ -31,7 +31,9 @@ using CheckStatus = rs::wasm_vm::CheckStatus; // // Exhaustive over the status enum, with no `default`: the enum is generated from the // engine's `RunError`, so an outcome added there fails this switch under -Wswitch -Werror -// rather than quietly picking up a neighbour's TER. +// rather than quietly picking up a neighbour's TER. The return past the switch is for the +// compilers that will not call an exhaustive switch exhaustive; it sits after the switch, +// not in a `default`, so the coverage check above still holds. std::expected outcome(rs::wasm_vm::RunResult const& run) { @@ -73,7 +75,8 @@ outcome(rs::wasm_vm::RunResult const& run) case RunStatus::Panic: return std::unexpected{WasmTER{.ter = tecINTERNAL, .cost = std::nullopt}}; } - UNREACHABLE("Unexpected RunStatus value"); + UNREACHABLE("xrpl::outcome : unknown RunStatus"); + return std::unexpected{WasmTER{.ter = tecINTERNAL, .cost = std::nullopt}}; } // A screening verdict as a TER. @@ -106,7 +109,8 @@ verdict(CheckStatus status) case CheckStatus::Panic: return telFAILED_PROCESSING; } - UNREACHABLE("Unexpected CheckStatus value"); + UNREACHABLE("xrpl::verdict : unknown CheckStatus"); + return telFAILED_PROCESSING; } } // namespace