mirror of https://github.com/wolfSSL/wolfBoot.git
wolfBoot_start() in hal/library.c ended its exit: path with an unconditional 'return 0;', so a rejected image (bad header, hash or signature) still made the test-lib process exit 0. main() propagates wolfBoot_start()'s return value, so the failure was only visible in the printed "Failure" message, which the test-library workflow had to grep for (TODO referencing PR #625). Return ret, which carries the wolfBoot_verify_*() error on every path that reaches exit: with a failure. The success path never returns: do_boot() jumps to the firmware. The test-library workflow drops the status-rewriting workaround and asserts the non-zero exit code directly, keeping the "Failure" message check as a diagnostic. Verification: - Built: make test-lib (host, library.config, ED25519/SHA256). - Tested: local repro of the workflow flow: corrupt the last byte of a signed image; before the fix the process exited 0 while printing "Failure -1", after the fix it exits 255; a valid image still exits 0 with "Firmware Valid". - Pitfalls: 'return ret' only changes the error paths; do_boot() does not return on success. - Style: the cstyle-check.sh FMT flag on hal/library.c is present on the pre-change file as well (not introduced here). - Message: F-9749: prefix, no co-author trailers. |
||
|---|---|---|
| .. | ||
| build-keytools-windows.yml | ||
| dualbank-emulator-tests.yml | ||
| footprint.yml | ||
| test-build-aarch64.yml | ||
| test-build-cmake-dot-config.yml | ||
| test-build-cmake-mac.yml | ||
| test-build-cmake-presets.yml | ||
| test-build-cmake-script.yml | ||
| test-build-cmake-windows.yml | ||
| test-build-cmake.yml | ||
| test-build-kontron-vx3060-s2.yml | ||
| test-build-lms.yml | ||
| test-build-mcux-sdk-manifests.yml | ||
| test-build-mcux-sdk.yml | ||
| test-build-msdk.yml | ||
| test-build-pic32cx.yml | ||
| test-build-pico-sdk.yml | ||
| test-build-powerpc.yml | ||
| test-build-psoc6.yml | ||
| test-build-renesas-rx.yml | ||
| test-build-riscv.yml | ||
| test-build-sim-tpm.yml | ||
| test-build-stm32cube.yml | ||
| test-build.yml | ||
| test-configs.yml | ||
| test-cppcheck.yml | ||
| test-cryptocb-simulator.yml | ||
| test-custom-tlv-simulator.yml | ||
| test-elf-scattered.yml | ||
| test-external-library-paths.yml | ||
| test-filesystem.yml | ||
| test-hooks-simulator.yml | ||
| test-keytools-msys2.yml | ||
| test-keytools.yml | ||
| test-library.yml | ||
| test-parse-tools.yml | ||
| test-powerfail-simulator.yml | ||
| test-raspi3-encrypted.yml | ||
| test-renode-fastmath-smallstack.yml | ||
| test-renode-fastmath.yml | ||
| test-renode-noasm-smallstack.yml | ||
| test-renode-noasm.yml | ||
| test-renode-nrf52.yml | ||
| test-renode-sha3.yml | ||
| test-renode-sha384.yml | ||
| test-renode-smallstack.yml | ||
| test-sbom.yml | ||
| test-sim-self-update.yml | ||
| test-sunnyday-simulator.yml | ||
| test-tpm.yml | ||
| test-units.yml | ||
| test-vscode.yml | ||
| test-wolfhsm-simulator.yml | ||
| test-x86-fsp-qemu.yml | ||
| trustzone-emulator-tests.yml | ||