From 02b74a786354db961f3e057f671d60fad9a17515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= Date: Mon, 16 Feb 2026 12:30:17 +0100 Subject: efi_selftest: test specific LoadImage() case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é Cc: Heinrich Schuchardt Cc: Ilias Apalodimas Cc: Tom Rini --- lib/efi_selftest/efi_selftest_loadimage.c | 7 +++++++ 1 file changed, 7 insertions(+) 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; } -- cgit v1.2.3