]> git.dujemihanovic.xyz Git - u-boot.git/commit
test: Fail when an empty line is expected but not present
authorSimon Glass <sjg@chromium.org>
Thu, 22 Aug 2024 13:57:47 +0000 (07:57 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 27 Aug 2024 00:51:48 +0000 (18:51 -0600)
commit88ae69f3b7efaa8de5c9d5d50081d6bf83e77ae9
treecc444f6574edb3606eb081be33251cd634a95c2b
parentab84ffccd6c2a28a04feed8f17206a68e3adb928
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 <sjg@chromium.org>
Fixes: 400175b0a7d ("test: Add a way to check each line of console...")
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
common/console.c
include/console.h
test/boot/bootflow.c
test/ut.c