[PATCH v2 11/32] test: Add ut_assert_nextline_empty() empty line helper

Marek Vasut marek.vasut+renesas at mailbox.org
Thu Mar 2 04:08:24 CET 2023


Add helper macro to test for empty lines, which is an inobvious
wrapper around ut_assert_nextline("%s", "") .

Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
Reviewed-by: Simon Glass <sjg at chromium.org>
---
Cc: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Tom Rini <trini at konsulko.com>
---
V2: Add RB from Simon
---
 include/test/ut.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/test/ut.h b/include/test/ut.h
index 4d00b4eeca1..2b0dab32f68 100644
--- a/include/test/ut.h
+++ b/include/test/ut.h
@@ -334,6 +334,10 @@ int ut_check_console_dump(struct unit_test_state *uts, int total_bytes);
 		return CMD_RET_FAILURE;					\
 	}								\
 
+/* Assert that the next console output line is empty */
+#define ut_assert_nextline_empty()					\
+	ut_assert_nextline("%s", "")
+
 /**
  * ut_check_free() - Return the number of bytes free in the malloc() pool
  *
-- 
2.39.2



More information about the U-Boot mailing list