summaryrefslogtreecommitdiff
path: root/tests/vb2_misc_tests.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vb2_misc_tests.c')
-rw-r--r--tests/vb2_misc_tests.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/vb2_misc_tests.c b/tests/vb2_misc_tests.c
index 0f89ee51..c64552c2 100644
--- a/tests/vb2_misc_tests.c
+++ b/tests/vb2_misc_tests.c
@@ -866,6 +866,24 @@ static void phone_recovery_enabled_tests(void)
" ui disabled");
}
+static void diagnostic_ui_enabled_tests(void)
+{
+ reset_common_data();
+ vb2api_secdata_kernel_create(ctx);
+ vb2_secdata_kernel_init(ctx);
+ TEST_EQ(vb2api_diagnostic_ui_enabled(ctx), 1,
+ "diagnostic UI enabled");
+
+ reset_common_data();
+ vb2api_secdata_kernel_create(ctx);
+ vb2_secdata_kernel_init(ctx);
+ vb2_secdata_kernel_set(
+ ctx, VB2_SECDATA_KERNEL_FLAGS,
+ VB2_SECDATA_KERNEL_FLAG_DIAGNOSTIC_UI_DISABLED);
+ TEST_EQ(vb2api_diagnostic_ui_enabled(ctx), 0,
+ "diagnostic UI disabled");
+}
+
static void dev_default_boot_tests(void)
{
/* No default boot */
@@ -1048,6 +1066,7 @@ int main(int argc, char* argv[])
clear_recovery_tests();
get_recovery_reason_tests();
phone_recovery_enabled_tests();
+ diagnostic_ui_enabled_tests();
dev_default_boot_tests();
dev_boot_allowed_tests();
use_dev_screen_short_delay_tests();