From 865e3ee6c361ff0df281e5578b0c7efc1a0128f8 Mon Sep 17 00:00:00 2001 From: Daniele Lacamera Date: Fri, 6 Sep 2024 16:55:57 +0200 Subject: [PATCH] Fixed wrong check due to fail_if refactoring --- tools/unit-tests/unit-mock-flash.c | 2 ++ tools/unit-tests/unit-parser.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/unit-tests/unit-mock-flash.c b/tools/unit-tests/unit-mock-flash.c index 549630889..6be1dba0c 100644 --- a/tools/unit-tests/unit-mock-flash.c +++ b/tools/unit-tests/unit-mock-flash.c @@ -33,6 +33,8 @@ static int erased_nvm_bank1 = 0; static int erased_vault = 0; const char *argv0; +#include + /* Mocks */ void hal_init(void) diff --git a/tools/unit-tests/unit-parser.c b/tools/unit-tests/unit-parser.c index 5532f1084..776dc0967 100644 --- a/tools/unit-tests/unit-parser.c +++ b/tools/unit-tests/unit-parser.c @@ -236,8 +236,8 @@ START_TEST (test_parser_borders) ck_assert_msg(wolfBoot_find_header(bad_buff + 8, HDR_TIMESTAMP, &p) == 0, "Parser error: accessing version field out of bounds"); /* High memory access */ - ck_assert(!wolfBoot_find_header(((void *)(0 - 0xF8)), HDR_VERSION, &p) != 0); - ck_assert(!wolfBoot_find_header(((void *)(0 - 0x10)), HDR_VERSION, &p) != 0); + ck_assert(wolfBoot_find_header(((void *)(0 - 0xF8)), HDR_VERSION, &p) == 0); + ck_assert(wolfBoot_find_header(((void *)(0 - 0x10)), HDR_VERSION, &p) == 0); } END_TEST