diff options
| author | Simon Glass <[email protected]> | 2024-08-07 16:47:29 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-08-09 16:03:20 -0600 |
| commit | 637be2e53f66034ed7475d5981e4445a538a7639 (patch) | |
| tree | 02511a462efe62548760cc1a4e6af9337a7d5680 /include | |
| parent | 3848e97c5c74dcebe1694ff14df522badc0df9e4 (diff) | |
upl: Add basic tests
Add some unit tests to check that we can write a UPL handoff and read it
back.
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/test/suites.h | 1 | ||||
| -rw-r--r-- | include/upl.h | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/test/suites.h b/include/test/suites.h index 365d5f20dfe..2ceef577f7f 100644 --- a/include/test/suites.h +++ b/include/test/suites.h @@ -63,5 +63,6 @@ int do_ut_str(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_time(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_unicode(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); +int do_ut_upl(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); #endif /* __TEST_SUITES_H__ */ diff --git a/include/upl.h b/include/upl.h index df644c47344..2ec5ef1b5cf 100644 --- a/include/upl.h +++ b/include/upl.h @@ -309,6 +309,15 @@ int upl_create_handoff_tree(const struct upl *upl, oftree *treep); * Return: 0 on success, -ve on error */ int upl_read_handoff(struct upl *upl, oftree tree); + +/** + * upl_get_test_data() - Fill a UPL with some test data + * + * @uts: Test state (can be uninited) + * @upl: Returns test data + * Return: 0 on success, 1 on error + */ +int upl_get_test_data(struct unit_test_state *uts, struct upl *upl); #endif /* USE_HOSTCC */ #if CONFIG_IS_ENABLED(UPL) && defined(CONFIG_SPL_BUILD) |
