Skip to content

Commit

Permalink
add double fallback to update powerfail test since
Browse files Browse the repository at this point in the history
NVM_FLASH_WRITEONCE can powerfail after FLAGS_FINAL and TESTING partition states have been set
  • Loading branch information
jpbland1 authored and danielinux committed Oct 13, 2023
1 parent bfe85d6 commit f4ea778
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/test-powerfail-simulator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ jobs:
- name: Build wolfboot.elf
run: |
make && make test-sim-internal-flash-with-delta-update
make clean && make test-sim-internal-flash-with-delta-update
- name: Run sunny day update test (DELTA)
run: |
Expand Down
4 changes: 4 additions & 0 deletions tools/scripts/sim-update-powerfail-resume.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ fi
V=`./wolfboot.elf powerfail 3f000 get_version` 2>/dev/null
if [ "x$V" != "x2" ]; then
V=`./wolfboot.elf get_version 2>/dev/null`
# if we failed on the final boot state write we need to double fallback
if [ "x$V" == "x1" ]; then
V=`./wolfboot.elf get_version 2>/dev/null`
fi
fi

if [ "x$V" != "x2" ]; then
Expand Down

0 comments on commit f4ea778

Please sign in to comment.