Attention is currently required from: Dinesh Gehlot, Eran Mitrani, Intel coreboot Reviewers, Jakub "Kuba" Czapiga, Jayvik Desai, Julius Werner, Jérémy Compostella, Kapil Porwal, Nick Vaccaro, Tarun.
Subrata Banik has posted comments on this change by Subrata Banik. ( https://review.coreboot.org/c/coreboot/+/86283?usp=email )
Change subject: lib: Refactor ux_locales_get_text API ......................................................................
Patch Set 8:
(1 comment)
File src/include/ux_locales.h:
https://review.coreboot.org/c/coreboot/+/86283/comment/98cab73c_6199d60b?usp... : PS5, Line 23: const char *ux_locales_get_text(const char *name, const char *fallback_text);
Well, then change the test, of course. Tests do not have a purpose by themselves, they only exist to validate the underlying coreboot code. If the code changes, you can remove or rewrite the tests that checked cases which cannot exist anymore. If we now only have an API that takes an enum ID, the tests only need to check the behavior when passing those IDs (including edge cases like passing an illegal ID, or passing a valid ID but the resulting CBFS filename not existing).
The test tries to check multiple things at once, and we can only change things when we're ready.
1. Passing a valid ID without a supported language ID should return NULL. 2. Passing a valid ID with a different language ID should return the same message w/ language ID on it.
I need more time to understand how to keep similar tests after using enum IDs. Should we handle them separately in a CL and make the necessary adjustments? This CL just ensures that unit tests don't fail due to recent refactoring of ux-locales.
I'd prefer to keep all required unit tests and add more based on enum IDs to test `ux_locales_get_text_by_id`, because `ux_locales_get_text` is an important helper function for `ux_locales_get_text_by_id`.
WDYT ?