From: Heinrich Schuchardt Date: Wed, 10 Mar 2021 21:29:54 +0100 Subject: [PATCH 4/4 v6] Test the ESRT creation within an existing pytest. In-Reply-To: <20210308112935.5782-5-jose.marinho@arm.com> References: <20210308112935.5782-1-jose.marinho@arm.com> <20210308112935.5782-5-jose.marinho@arm.com> Message-ID: <9fe567e7-03ea-a459-1df4-8f73997d43a2@gmx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 3/8/21 12:29 PM, Jose Marinho wrote: > This commit slightly extends test_efi_capsule_fw3. > > In order to run the test the following must be added to > sandbox_defconfig: > +CONFIG_CMD_SF=y > +CONFIG_CMD_MEMORY=y > +CONFIG_CMD_FAT=y > +CONFIG_DFU=y > > The ESRT is printed in the u-boot shell by calling efidebug esrt. > The test ensures that, after the capsule is installed, the ESRT > contains entries with the GUIDs: > - EFI_FIRMWARE_IMAGE_TYPE_UBOOT_FIT_GUID; > - EFI_FIRMWARE_IMAGE_TYPE_UBOOT_RAW_GUID; > > test invocation: > sudo ./test/py/test.py --bd sandbox -k capsule_fw3 -l --build > > CC: Heinrich Schuchardt > CC: Sughosh Ganu > CC: AKASHI Takahiro > CC: Ilias Apalodimas > CC: Andre Przywara > CC: Alexander Graf > CC: nd at arm.com > Signed-off-by: Jose Marinho Reviewed-by: Heinrich Schuchardt > --- > test/py/tests/test_efi_capsule/test_capsule_firmware.py | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/test/py/tests/test_efi_capsule/test_capsule_firmware.py b/test/py/tests/test_efi_capsule/test_capsule_firmware.py > index f006fa95d6..24101e8915 100644 > --- a/test/py/tests/test_efi_capsule/test_capsule_firmware.py > +++ b/test/py/tests/test_efi_capsule/test_capsule_firmware.py > @@ -229,6 +229,14 @@ class TestEfiCapsuleFirmwareFit(object): > output = u_boot_console.run_command( > 'env print -e -all Capsule0000') > > + output = u_boot_console.run_command_list(['efidebug capsule esrt']) > + > + # ensure that EFI_FIRMWARE_IMAGE_TYPE_UBOOT_FIT_GUID is in the ESRT. > + assert 'AE13FF2D-9AD4-4E25-9AC8-6D80B3B22147' in ''.join(output) > + > + # ensure that EFI_FIRMWARE_IMAGE_TYPE_UBOOT_RAW_GUID is in the ESRT. > + assert 'E2BB9C06-70E9-4B14-97A3-5A7913176E3F' in ''.join(output) > + > output = u_boot_console.run_command_list([ > 'host bind 0 %s' % disk_img, > 'fatls host 0:1 %s' % CAPSULE_INSTALL_DIR]) >