-
Notifications
You must be signed in to change notification settings - Fork 163
Add missing test cases suggested by fenrir, fix two hal regressions #905
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
Open
danielinux
wants to merge
20
commits into
wolfSSL:master
Choose a base branch
from
danielinux:fenrir-fixes-2026-09-18
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
21c82fa
F-12883: nRF5340 uart_write CRLF dropped multiline tail data
danielinux bad0fa3
F-13635: isolate each diag_read_header content gate
danielinux f1aa75a
F-13633: test encrypt_key_is_valid erased-key rejection
danielinux bdfddc5
Add gpt_parse_header hdr_size bounds test (F-6759)
danielinux ba74601
F-13646: test HDR_CMDLINE sign/decode roundtrip
danielinux ef4d73d
Add header_required_size cross-branch regression test (F-13644)
danielinux 03ea0bb
F-13636: unit target for NSC update-partition bounds checks
danielinux dfe7150
F-13623: nRF5340 hal_flash_protect lock the full requested range
danielinux 59c47a8
F-13624: guard keygen-emitted keystore accessors against negative id
danielinux c62b509
F-9752: test interrupted per-sector swap resumes from BACKUP
danielinux 963bec3
F-6874: test whFlashH5 Erase/Verify/BlankCheck OOB bounds guards
danielinux cf56410
F-9752: guard swap-resume test out of EXT_ENCRYPTED targets
danielinux f80dde6
F-9753: accept the exact-fit update size in wolfBoot_update
danielinux 6cc8437
F-13643: test swap round-trip restores the original boot image
danielinux b0db2b7
F-13622: guard partition overlap with the bootloader write-protect re…
danielinux a2f7d8b
Fix nrf5340 link error + cypsoc6 partition-overlap false positive
danielinux f0b2665
Fix nrf5340 test-app link error: add nrf5340_uart.o to APP_OBJS
danielinux d45f344
Address Copilot review comments
danielinux 80af0bf
Fix CI: partition-guard extents, duplicate nrf5340 object, opt-out reach
danielinux ac519da
Address 3 Fenrir findings on PR 905
danielinux File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| /* nrf5340_uart.c | ||
| * | ||
| * CRLF line conversion for the nRF5340 debug UART, split out of | ||
| * hal/nrf5340.c so the newline handling can be unit-tested on the host | ||
| * without the nrfx register access the rest of that HAL needs. | ||
| * | ||
| * Copyright (C) 2026 wolfSSL Inc. | ||
| * | ||
| * This file is part of wolfBoot. | ||
| * | ||
| * wolfBoot is free software; you can redistribute it and/or modify | ||
| * it under the terms of the GNU General Public License as published by | ||
| * the Free Software Foundation; either version 3 of the License, or | ||
| * (at your option) any later version. | ||
| * | ||
| * wolfBoot is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU General Public License | ||
| * along with wolfBoot; if not, write to the Free Software | ||
| * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
| * 02110-1335, USA | ||
| */ | ||
|
|
||
| #ifdef DEBUG_UART | ||
|
|
||
| #include <string.h> | ||
|
|
||
| /* Emit buf[0..sz) via "sink" with every '\n' rendered as CRLF. */ | ||
| void nrf5340_uart_crlf(const char* buf, unsigned int sz, | ||
| void (*sink)(const char*, unsigned int)) | ||
| { | ||
| const char* line; | ||
| unsigned int lineSz; | ||
| do { | ||
| /* find '\n' */ | ||
| line = memchr(buf, '\n', sz); | ||
| if (line == NULL) { | ||
| sink(buf, sz); | ||
| break; | ||
| } | ||
| lineSz = (unsigned int)(line - buf); | ||
| if (lineSz > sz - 1) | ||
| lineSz = sz - 1; | ||
|
|
||
| sink(buf, lineSz); | ||
| sink("\r\n", 2); /* handle CRLF */ | ||
|
|
||
| buf = line + 1; /* advance past the emitted newline */ | ||
| sz -= lineSz + 1; | ||
| } while ((int)sz > 0); | ||
| } | ||
|
|
||
| #endif /* DEBUG_UART */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.