diff options
author | Yu-Ping Wu <yupingso@chromium.org> | 2021-03-30 16:52:08 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-07 07:10:22 +0000 |
commit | 55ec0755959a1f130684e637dff29ea340dc41f8 (patch) | |
tree | c4b2b261128a8410d698fcb345f54e8269602af4 /tests | |
parent | b253426ec32837b27e97414aa9277c5916efc6c8 (diff) | |
download | vboot-55ec0755959a1f130684e637dff29ea340dc41f8.tar.gz |
vboot/ui: Remove VB2_SCREEN_BLANKstabilize-glibc-13901.Bstabilize-coil-13902.B
Remove the unused VB2_SCREEN_BLANK from vb2_screen enum.
BUG=none
TEST=emerge-asurada depthcharge
TEST=make runtests
BRANCH=none
Cq-Depend: chromium:2793450
Change-Id: I931f6ad804f6da3b710bef9d800c26960d20c3cb
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2793448
Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/vb2_ui_action_tests.c | 13 | ||||
-rw-r--r-- | tests/vb2_ui_utility_tests.c | 8 |
2 files changed, 7 insertions, 14 deletions
diff --git a/tests/vb2_ui_action_tests.c b/tests/vb2_ui_action_tests.c index 8e27548e..42546844 100644 --- a/tests/vb2_ui_action_tests.c +++ b/tests/vb2_ui_action_tests.c @@ -19,8 +19,9 @@ /* Mock screen index for testing screen utility functions. */ #define MOCK_NO_SCREEN 0xef00 -#define MOCK_SCREEN_BASE 0xef10 -#define MOCK_SCREEN_MENU 0xef11 +#define MOCK_SCREEN_BLANK 0xef10 +#define MOCK_SCREEN_BASE 0xef11 +#define MOCK_SCREEN_MENU 0xef12 #define MOCK_SCREEN_TARGET0 0xef20 #define MOCK_SCREEN_TARGET1 0xef21 #define MOCK_SCREEN_TARGET2 0xef22 @@ -127,7 +128,7 @@ static vb2_error_t mock_action_msleep(struct vb2_ui_context *ui) /* Mock screens */ struct vb2_screen_info mock_screen_temp; const struct vb2_screen_info mock_screen_blank = { - .id = VB2_SCREEN_BLANK, + .id = MOCK_SCREEN_BLANK, .name = "mock_screen_blank", }; const struct vb2_screen_info mock_screen_base = { @@ -393,7 +394,7 @@ const struct vb2_screen_info *vb2_get_screen_info(enum vb2_screen screen) mock_get_screen_info_called++; switch ((int)screen) { - case VB2_SCREEN_BLANK: + case MOCK_SCREEN_BLANK: return &mock_screen_blank; case MOCK_SCREEN_BASE: return &mock_screen_base; @@ -898,13 +899,13 @@ static void ui_loop_tests(void) reset_common_data(); mock_calls_until_shutdown = -1; mock_action_countdown_limit = 10; - TEST_EQ(ui_loop(ctx, VB2_SCREEN_BLANK, mock_action_countdown), + TEST_EQ(ui_loop(ctx, MOCK_SCREEN_BLANK, mock_action_countdown), VB2_SUCCESS, "global action"); TEST_EQ(mock_action_called, 10, " action called"); /* Global action can change screen */ reset_common_data(); - TEST_EQ(ui_loop(ctx, VB2_SCREEN_BLANK, mock_action_screen_change), + TEST_EQ(ui_loop(ctx, MOCK_SCREEN_BLANK, mock_action_screen_change), VB2_REQUEST_SHUTDOWN, "global action can change screen"); DISPLAYED_PASS(); DISPLAYED_EQ("change to mock_screen_base", MOCK_SCREEN_BASE, diff --git a/tests/vb2_ui_utility_tests.c b/tests/vb2_ui_utility_tests.c index 85a514cc..1a7b19ea 100644 --- a/tests/vb2_ui_utility_tests.c +++ b/tests/vb2_ui_utility_tests.c @@ -43,10 +43,6 @@ static vb2_error_t mock_action_base(struct vb2_ui_context *ui) } /* Mock screens */ -struct vb2_screen_info mock_screen_blank = { - .id = VB2_SCREEN_BLANK, - .name = "mock_screen_blank", -}; struct vb2_screen_info mock_screen_base = { .id = MOCK_SCREEN_BASE, .name = "mock_screen_base: menuless screen", @@ -125,8 +121,6 @@ static void reset_common_data(void) mock_action_called = 0; /* Reset init and action functions */ - mock_screen_blank.init = NULL; - mock_screen_blank.action = NULL; mock_screen_base.init = NULL; mock_screen_base.action = NULL; mock_screen_menu.init = NULL; @@ -157,8 +151,6 @@ uint32_t VbExIsShutdownRequested(void) const struct vb2_screen_info *vb2_get_screen_info(enum vb2_screen screen) { switch ((int)screen) { - case VB2_SCREEN_BLANK: - return &mock_screen_blank; case MOCK_SCREEN_BASE: return &mock_screen_base; case MOCK_SCREEN_MENU: |