diff options
| author | Simon Glass <[email protected]> | 2024-08-22 07:57:47 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-08-26 18:51:48 -0600 |
| commit | 88ae69f3b7efaa8de5c9d5d50081d6bf83e77ae9 (patch) | |
| tree | cc444f6574edb3606eb081be33251cd634a95c2b /include | |
| parent | ab84ffccd6c2a28a04feed8f17206a68e3adb928 (diff) | |
test: Fail when an empty line is expected but not present
The existing implementation of ut_assert_nextline_empty() cannot
distinguish between an empty line and no line at all. It can in fact be
called at the end of the recorded output and will happily return
success.
Adjust the logic so that this condition is detected. Show a failure
message in this case.
Fix the one test which falls foul of this fix.
Signed-off-by: Simon Glass <[email protected]>
Fixes: 400175b0a7d ("test: Add a way to check each line of console...")
Reviewed-by: Mattijs Korpershoek <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/console.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/console.h b/include/console.h index 2617e160073..6b6d0f9de73 100644 --- a/include/console.h +++ b/include/console.h @@ -73,7 +73,7 @@ int console_record_reset_enable(void); * @str: Place to put string * @maxlen: Maximum length of @str including nul terminator * Return: length of string returned, or -ENOSPC if the console buffer was - * overflowed by the output + * overflowed by the output, or -ENOENT if there was nothing to read */ int console_record_readline(char *str, int maxlen); |
