[Concept,03/16] test: expo: Use expo_enter_mode() in textline render test

Message ID 20260122041155.174721-4-sjg@u-boot.org
State New
Headers
Series expo: Add multiline editing support for textedit |

Commit Message

Simon Glass Jan. 22, 2026, 4:11 a.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

The expo_render_textline test renders text-input objects without calling
expo_enter_mode(). This leaves manual_sync disabled, allowing the
video idle function to run and show cursors unexpectedly during rendering.

Add expo_enter_mode() at the start of the test and expo_exit_mode() at
the end to enable manual sync mode, preventing idle cursor updates from
interfering with the framebuffer comparisons.

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---

 test/boot/expo.c | 2 ++
 1 file changed, 2 insertions(+)
  

Patch

diff --git a/test/boot/expo.c b/test/boot/expo.c
index f94927eb6b7..2ace10994b6 100644
--- a/test/boot/expo.c
+++ b/test/boot/expo.c
@@ -1433,6 +1433,7 @@  static int expo_render_textline(struct unit_test_state *uts)
 
 	ut_assertok(create_test_expo(uts, &exp, &scn, &menu, &buf, &logo_copy));
 	dev = exp->display;
+	expo_enter_mode(exp);
 
 	id = scene_textline(scn, "textline", OBJ_TEXTLINE, 20, &tline);
 	ut_assert(id > 0);
@@ -1528,6 +1529,7 @@  static int expo_render_textline(struct unit_test_state *uts)
 	abuf_uninit(&buf);
 	abuf_uninit(&logo_copy);
 
+	expo_exit_mode(exp);
 	expo_destroy(exp);
 
 	return 0;