summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent StehlĂ© <[email protected]>2026-02-16 12:30:17 +0100
committerHeinrich Schuchardt <[email protected]>2026-02-27 12:14:56 +0100
commit02b74a786354db961f3e057f671d60fad9a17515 (patch)
treef48f46300431fe6d6682a8e0b3a18245a6bd9df6
parent3768968b1ea7abd587df1fcc3f9a528203fccb13 (diff)
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Ă© <[email protected]> Cc: Heinrich Schuchardt <[email protected]> Cc: Ilias Apalodimas <[email protected]> Cc: Tom Rini <[email protected]>
-rw-r--r--lib/efi_selftest/efi_selftest_loadimage.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/efi_selftest/efi_selftest_loadimage.c b/lib/efi_selftest/efi_selftest_loadimage.c
index 967eaa58c69..0e8fc6216f0 100644
--- a/lib/efi_selftest/efi_selftest_loadimage.c
+++ b/lib/efi_selftest/efi_selftest_loadimage.c
@@ -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;
}