efi_selftest: test specific LoadImage() case

Add a test calling the LoadImage() UEFI function with both its SourceBuffer
and DevicePath input arguments equal to NULL.

This test can be run on the sandbox with the following command:

  ./u-boot -T -c "setenv efi_selftest load image from file; \
                  bootefi selftest"

Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Tom Rini <trini@konsulko.com>
This commit is contained in:
Vincent Stehlé
2026-02-16 12:30:17 +01:00
committed by Heinrich Schuchardt
parent 3768968b1e
commit 02b74a7863

View File

@@ -562,6 +562,13 @@ static int execute(void)
return EFI_ST_FAILURE;
}
ret = boottime->load_image(false, handle_image, NULL, NULL, 0,
&handle);
if (ret != EFI_NOT_FOUND) {
efi_st_error("Unexpected load_image return value\n");
return EFI_ST_FAILURE;
}
return EFI_ST_SUCCESS;
}