diff --git a/test/boot/bootflow.c b/test/boot/bootflow.c
index e1e50319740..9aab3ea807a 100644
--- a/test/boot/bootflow.c
+++ b/test/boot/bootflow.c
@@ -1393,8 +1393,8 @@ BOOTSTD_TEST(bootflow_android_image_v2, UTF_CONSOLE | UTF_DM | UTF_SCAN_FDT);
 /* Test EFI bootmeth */
 static int bootflow_efi(struct unit_test_state *uts)
 {
-	struct efil_hdr *hdr = bloblist_find(BLOBLISTT_EFI_LOG, 0);
 	static const char *order[] = {"mmc1", "usb", NULL};
+	struct efil_hdr *hdr;
 	struct efil_rec_hdr *rec_hdr;
 	struct bootstd_priv *std;
 	struct udevice *bootstd;
@@ -1402,6 +1402,10 @@ static int bootflow_efi(struct unit_test_state *uts)
 	struct udevice *usb;
 	int i;
 
+	/* clear stale entries left by previous tests */
+	if (IS_ENABLED(CONFIG_EFI_LOG))
+		efi_log_reset();
+
 	ut_assertok(uclass_first_device_err(UCLASS_BOOTSTD, &bootstd));
 	std = dev_get_priv(bootstd);
 	old_order = std->bootdev_order;
@@ -1470,6 +1474,7 @@ static int bootflow_efi(struct unit_test_state *uts)
 	ut_assert(!device_active(usb));
 
 	/* check memory allocations are as expected */
+	hdr = bloblist_find(BLOBLISTT_EFI_LOG, 0);
 	if (!hdr)
 		return 0;
 
