]> git.baikalelectronics.ru Git - uboot.git/commitdiff
efi_selftest: add hii set keyboard layout test case
authorVincent Stehlé <vincent.stehle@arm.com>
Fri, 6 Jan 2023 09:46:41 +0000 (10:46 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 13 Jan 2023 08:09:07 +0000 (09:09 +0100)
Add a test for the case when the HII database protocol
set_keyboard_layout() function is called with a NULL key_guid argument.

Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
lib/efi_selftest/efi_selftest_hii.c

index eaf3b0995d4ed5f58842ac760a6bd5c5ceb75f04..f4b55889e290b52e87abc5239f8fca11cfabc623 100644 (file)
@@ -564,7 +564,19 @@ out:
  */
 static int test_hii_database_set_keyboard_layout(void)
 {
+       efi_status_t ret;
+
        PRINT_TESTNAME;
+
+       /* Invalid key guid. */
+       ret = hii_database_protocol->set_keyboard_layout(
+                       hii_database_protocol, NULL);
+       if (ret != EFI_INVALID_PARAMETER) {
+               efi_st_error("set_keyboard_layout returned %u not invalid\n",
+                            (unsigned int)ret);
+               return EFI_ST_FAILURE;
+       }
+
        /* set_keyboard_layout() not implemented yet */
        return EFI_ST_SUCCESS;
 }