Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix powerfail test to actually trigger, previously #341

Merged
merged 1 commit into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hal/sim.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ int hal_flash_erase(uintptr_t address, int len)
{
/* implicit cast abide compiler warning */
fprintf(stderr, "hal_flash_erase addr %p len %d\n", (void*)address, len);
if (address == erasefail_address) {
if (address == erasefail_address + WOLFBOOT_PARTITION_BOOT_ADDRESS) {
fprintf(stderr, "POWER FAILURE\n");
/* Corrupt page */
memset((void*)address, 0xEE, len);
Expand Down
2 changes: 0 additions & 2 deletions tools/scripts/sim-update-powerfail-resume.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ fi
./wolfboot.elf powerfail 15000 get_version 2>/dev/null
./wolfboot.elf powerfail 18000 get_version 2>/dev/null
./wolfboot.elf powerfail 1a000 get_version 2>/dev/null
./wolfboot.elf get_version 2>/dev/null

V=`./wolfboot.elf get_version 2>/dev/null`
if [ "x$V" != "x2" ]; then
Expand All @@ -19,7 +18,6 @@ fi
./wolfboot.elf powerfail 11000 get_version 2>/dev/null
./wolfboot.elf powerfail 14000 get_version 2>/dev/null
./wolfboot.elf powerfail 1e000 get_version 2>/dev/null
./wolfboot.elf get_version 2>/dev/null

V=`./wolfboot.elf get_version 2>/dev/null`
if [ "x$V" != "x1" ]; then
Expand Down
Loading