Commit Graph

34 Commits (28bf0604883d0d7e81c87ec6e6c9ef8eb700e1e7)

Author SHA1 Message Date
Daniele Lacamera 076cd1d6c4 Fix for unit test failing 2025-03-04 18:20:46 +01:00
Daniele Lacamera 10cdc5408a Add env variable to unit test 2024-11-28 11:06:16 +01:00
David Garske aec2809212 Cleanups after hybrid signing PR. 2024-10-31 11:23:52 +01:00
Daniele Lacamera cc447ea879 Support for hybrid authentication (2 ciphers) 2024-10-30 13:17:06 +01:00
Daniele Lacamera 865e3ee6c3 Fixed wrong check due to fail_if refactoring 2024-09-06 16:55:57 +02:00
Daniele Lacamera 29729988a8 Removed deprecate libcheck API 2024-09-06 13:51:14 +02:00
Daniele Lacamera a1a7601314 Unit tests: cleanup warnings 2024-09-06 11:36:16 +02:00
Daniele Lacamera 6737d7e7ad Refactoring of PKCS11 store module + unit tests 2024-09-05 18:53:03 +02:00
David Garske b5a5b28f19 Fix unit test and new `WOLFBOOT_USE_PCI`. 2024-08-14 18:06:12 +02:00
Daniele Lacamera d2811b2538
Unit test for update_ram.c (#488)
* Initial draft with two test cases

* Added more unit tests. Found OOB access.

* Fix potential OOB access with too-large update img

* NO_FORK disabled by default

* Cover more corner cases

* Added unit tests for update_ram.c

Fixed fallback in partition election
2024-08-13 09:36:33 -07:00
Daniele Lacamera 3ff7059dc5
Unit tests for update_flash.c (#487)
* Initial draft with two test cases

* Added more unit tests. Found OOB access.

* Fix potential OOB access with too-large update img

* NO_FORK disabled by default

* Cover more corner cases
2024-08-13 06:25:49 -07:00
Daniele Lacamera 2588aa7611 Unit test: make flash mocking generic
Avoid duplicated test code for mocking the flash
2024-08-12 11:00:13 +02:00
Daniele Lacamera c61d516e81 Added copyright notices to unit test files 2024-08-07 17:18:30 +02:00
Daniele Lacamera 58a2e089a8 Added unit tests for delta.c 2024-08-07 16:45:17 +02:00
Daniele Lacamera 8b73250324 Set trailer on BOOT partition when storing the enc key 2024-07-17 17:00:11 +02:00
Daniele Lacamera e586087422 Added unit test NVM + ENCRYPTION, fix offset 2024-07-17 13:42:28 +02:00
Daniele Lacamera 04111a67b4 Added unit tests for FLAGS_HOME + fix NVM election
Taking into account the additional offset for PART_UPDATE_FLAGS at the
end of each flags sector when comparing two redundant flag sectors in
NVM_FLASH_WRITEONCE + FLAGS_HOME
2024-07-17 11:28:40 +02:00
Daniele Lacamera 2ec2bcdf79 Fixed flag comparison selecting most recent flags 2024-07-17 08:55:14 +02:00
Daniele Lacamera 8f0c090b69 Unit tests for memory blob parsers 2024-07-16 17:37:01 +02:00
Daniele Lacamera 80fa66fe44 Added more tests 2024-07-16 17:13:05 +02:00
Daniele Lacamera dd4bd8e91a Added new unit tests for NVM_FLASH_WRITEONCE 2024-07-16 16:06:54 +02:00
Daniele Lacamera fce6149cf8 Update license GPL2 -> GPL3 2024-04-16 16:46:15 +02:00
Daniele Lacamera 23894d31c6 Adjust mock in unit tests: fixed image_type field 2023-11-17 15:15:18 +01:00
Daniele Lacamera da43c99993 Added more unit tests. Added 'make cov'.
Fixed checks for invalid partition id
2023-10-13 14:30:45 +02:00
Marco Oliverio 4ebd48fcd8 unit-tests: add pci config read/write unit test 2023-08-25 18:43:50 +02:00
David Garske b9949b0a0c For the hal_flash API's make the change to uintptr_t to support 64-bit explicit using `ARCH_64BIT` or known 64-bit architectures. 2023-08-07 20:54:18 +02:00
David Garske 7190392245 Simulator fixes and support for using MacOS:
* Added simulator support for Mac.
* Fix for simulator to properly assemble wolfboot.bin + signedtestapp + update + swap.
* Fixes for handling 64-bit assigned mmap virtual addresses. Added hal_flash_write and hal_flash_erase support for 64-bit address using uintptr_t. Enabled if platform is 64-bit and `FORCE_32BIT` is not defined
* Fix simulator conflict with src/libwolfboot.o object in test-app.
* Cleanup test-app linker flags.
2023-08-07 20:54:18 +02:00
Daniele Lacamera cd7e4e10fc Fixed after reviewer's comments 2023-03-14 16:12:40 +01:00
Daniele Lacamera c36819ad0b Run 4 unit tests made out of unit-extflash.c
- clear text test of ext_flash_check r/w/erase
- Aes128
- Aes256
- ChaCha
2023-03-14 08:57:15 +01:00
Daniele Lacamera 0b06efd347 Added unit test for encrypted external flash 2023-03-14 08:57:14 +01:00
David Garske d38de3b432 Update copyright year 2021-07-19 07:50:02 -07:00
David Garske c30d675e38 Fix for building on Mac. Added README.md. 2020-08-13 13:02:59 -07:00
Daniele Lacamera 5ad13dbac0 unit-parser.c: Added (c) and short description 2020-08-13 14:01:18 +02:00
Daniele Lacamera 4d93c68542 Added unit test for wolfBoot_find_header 2020-08-13 13:57:32 +02:00