Fix native build infrastructure for encryption tests #20
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.
Summary
Fixes native build failures in the encryption test suite that were blocking validation.
Issues Fixed
Issue #1: Missing stdio.h header ✅
printf() was not declared in this scope#include <cstdio>to test_encryption.cppIssue #2: Undefined ICACHE_RAM_ATTR for native builds ✅
expected initializer before 'DecryptMsg'#include "targets.h"to encryption.hTest Results
Native build now succeeds:
The 2 failing tests are expected:
test_single_packet_loss_desynctest_burst_packet_loss_exceeds_resyncThese demonstrate the counter synchronization vulnerability before fixes are applied.
Files Changed
src/test/test_encryption/test_encryption.cpp(+1 line)src/include/encryption.h(+2 lines)src/include/targets.h(+5 lines)Total: 3 files, 8 insertions, 1 deletion
Verification
Result: All compilation errors resolved, tests run successfully.
Impact
Developer
2025-12-02