mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
test: add first autoboot unit tests
This adds tests for the crypt-based and plain SHA256-based password hashing algorithms in the autoboot flow. Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
33198740ac
commit
25c8b9f298
11 changed files with 166 additions and 1 deletions
|
@ -83,6 +83,17 @@ int console_record_readline(char *str, int maxlen);
|
|||
* @return available bytes (0 if empty)
|
||||
*/
|
||||
int console_record_avail(void);
|
||||
|
||||
/**
|
||||
* console_in_puts() - Write a string to the console input buffer
|
||||
*
|
||||
* This writes the given string to the console_in buffer which will then be
|
||||
* returned if a function calls e.g. `getc()`
|
||||
*
|
||||
* @str: the string to write
|
||||
* @return the number of bytes added
|
||||
*/
|
||||
int console_in_puts(const char *str);
|
||||
#else
|
||||
static inline int console_record_init(void)
|
||||
{
|
||||
|
@ -114,6 +125,12 @@ static inline int console_record_avail(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int console_in_puts(const char *str)
|
||||
{
|
||||
/* There is never anything written */
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* !CONFIG_CONSOLE_RECORD */
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue