efi_selftest: correct efi_selftest_manageprotocols
[oweals/u-boot.git] / lib / efi_selftest / efi_selftest_manageprotocols.c
index f20f1528d471e9989e556d26e010cfaea0eee6f3..44b8da3ba5d628337b32b56e9808fd3b303a1e6f 100644 (file)
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * efi_selftest_manageprotocols
  *
  * Copyright (c) 2017 Heinrich Schuchardt <xypron.glpk@gmx.de>
  *
- * SPDX-License-Identifier:     GPL-2.0+
- *
  * This unit test checks the following protocol services:
  * InstallProtocolInterface, UninstallProtocolInterface,
  * InstallMultipleProtocolsInterfaces, UninstallMultipleProtocolsInterfaces,
@@ -194,7 +193,7 @@ static int execute(void)
                                                &guid3, &interface3,
                                                NULL);
        if (ret == EFI_SUCCESS) {
-               efi_st_todo("UninstallMultipleProtocolInterfaces did not catch error\n");
+               efi_st_error("UninstallMultipleProtocolInterfaces did not catch error\n");
                return EFI_ST_FAILURE;
        }
 
@@ -273,8 +272,8 @@ static int execute(void)
                                                &guid2, &interface2,
                                                NULL);
        if (ret != EFI_SUCCESS) {
-               efi_st_todo("UninstallMultipleProtocolInterfaces failed\n");
-               /* This test is known to fail due to missing implementation */
+               efi_st_error("UninstallMultipleProtocolInterfaces failed\n");
+               return EFI_ST_FAILURE;
        }
        /*
         * Check that the protocols are really uninstalled.
@@ -287,8 +286,8 @@ static int execute(void)
                return EFI_ST_FAILURE;
        }
        if (count != 1) {
-               efi_st_todo("UninstallMultipleProtocolInterfaces failed to uninstall protocols\n");
-               /* This test is known to fail due to missing implementation */
+               efi_st_error("UninstallMultipleProtocolInterfaces failed to uninstall protocols\n");
+               return EFI_ST_FAILURE;
        }
        ret = find_in_buffer(handle1, count, buffer);
        if (ret != EFI_SUCCESS) {
@@ -327,19 +326,19 @@ static int execute(void)
        ret = boottime->uninstall_protocol_interface(handle1, &guid1,
                                                     &interface1);
        if (ret != EFI_SUCCESS) {
-               efi_st_todo("UninstallProtocolInterface failed\n");
-               /* This test is known to fail due to missing implementation */
+               efi_st_error("UninstallProtocolInterface failed\n");
+               return EFI_ST_FAILURE;
        }
        ret = boottime->handle_protocol(handle1, &guid1, (void **)&interface);
        if (ret == EFI_SUCCESS) {
-               efi_st_todo("UninstallProtocolInterface failed\n");
-               /* This test is known to fail due to missing implementation */
+               efi_st_error("UninstallProtocolInterface failed\n");
+               return EFI_ST_FAILURE;
        }
        ret = boottime->uninstall_protocol_interface(handle1, &guid3,
-                                                    &interface1);
+                                                    &interface3);
        if (ret != EFI_SUCCESS) {
-               efi_st_todo("UninstallProtocolInterface failed\n");
-               /* This test is known to fail due to missing implementation */
+               efi_st_error("UninstallProtocolInterface failed\n");
+               return EFI_ST_FAILURE;
        }
 
        return EFI_ST_SUCCESS;