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

Unit testing of firmware #278

Open
dehanj opened this issue Oct 17, 2024 · 0 comments
Open

Unit testing of firmware #278

dehanj opened this issue Oct 17, 2024 · 0 comments

Comments

@dehanj
Copy link
Member

dehanj commented Oct 17, 2024

Unit testing is quite useful in the right circumstances, especially to automate testing of certain functions.
Such as testing allowed address ranges, to make sure the right function is achieved.

The goal is not to unit test every function of firmware, but a selected portion to make sure the intended outcome of that function is not broken and being able to test edge-cases and so forth.

For our use case there is multiple openings, but being able to easily mock functions/hardware dependencies is required.
Potentially the tests can be run in QEMU, to run on the right architecture, but it is at least desirable that it can run in CI.

A short list of requirements: open source; maintained; mocking.

Possible frameworks to use is:
Cmocka - https://cmocka.org/
Unity - https://www.throwtheswitch.org/unity (and its moca)
GoogleTest - https://github.com/google/googletest
Check - https://libcheck.github.io/check/

The list above is sorted in order of which seems most interesting at the top.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant