Skip to content

Commit

Permalink
Fixed wrong check due to fail_if refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
danielinux committed Sep 6, 2024
1 parent 2972998 commit 865e3ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions tools/unit-tests/unit-mock-flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ static int erased_nvm_bank1 = 0;
static int erased_vault = 0;
const char *argv0;

#include <sys/stat.h>


/* Mocks */
void hal_init(void)
Expand Down
4 changes: 2 additions & 2 deletions tools/unit-tests/unit-parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 865e3ee

Please sign in to comment.