aboutsummaryrefslogtreecommitdiff
path: root/test/py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-12-20 17:12:04 -0500
committerTom Rini <trini@konsulko.com>2021-12-20 17:12:04 -0500
commit4afab30caea3211032710c4298a8839d3254e7f7 (patch)
tree8318afb8810966aca9fe356dde316c155b7a33ce /test/py
parente9d7888da845638f135046d53c25492a8c54e664 (diff)
parent734ad933766f0dbbeafe1b27211686940a5e6d16 (diff)
downloadu-boot-4afab30caea3211032710c4298a8839d3254e7f7.zip
u-boot-4afab30caea3211032710c4298a8839d3254e7f7.tar.gz
u-boot-4afab30caea3211032710c4298a8839d3254e7f7.tar.bz2
Merge tag 'v2022.01-rc4' into nextWIP/20Dec2021-next
Prepare v2022.01-rc4
Diffstat (limited to 'test/py')
-rw-r--r--test/py/tests/test_efi_selftest.py20
-rw-r--r--test/py/tests/test_tpm2.py1
2 files changed, 21 insertions, 0 deletions
diff --git a/test/py/tests/test_efi_selftest.py b/test/py/tests/test_efi_selftest.py
index 0161a6e..a48cd32 100644
--- a/test/py/tests/test_efi_selftest.py
+++ b/test/py/tests/test_efi_selftest.py
@@ -210,3 +210,23 @@ def test_efi_selftest_text_input_ex(u_boot_console):
if m != 0:
raise Exception('Failures occurred during the EFI selftest')
u_boot_console.restart_uboot()
+
+@pytest.mark.buildconfigspec('cmd_bootefi_selftest')
+@pytest.mark.buildconfigspec('efi_tcg2_protocol')
+def test_efi_selftest_tcg2(u_boot_console):
+ """Test the EFI_TCG2 PROTOCOL
+
+ :param u_boot_console: U-Boot console
+
+ This function executes the 'tcg2' unit test.
+ """
+ u_boot_console.restart_uboot()
+ u_boot_console.run_command(cmd='setenv efi_selftest list')
+ output = u_boot_console.run_command('bootefi selftest')
+ assert '\'tcg2\'' in output
+ u_boot_console.run_command(cmd='setenv efi_selftest tcg2')
+ u_boot_console.run_command(cmd='bootefi selftest', wait_for_prompt=False)
+ m = u_boot_console.p.expect(['Summary: 0 failures', 'Press any key'])
+ if m != 0:
+ raise Exception('Failures occurred during the EFI selftest')
+ u_boot_console.restart_uboot()
diff --git a/test/py/tests/test_tpm2.py b/test/py/tests/test_tpm2.py
index 7c89f5f..d2ad6f9 100644
--- a/test/py/tests/test_tpm2.py
+++ b/test/py/tests/test_tpm2.py
@@ -186,6 +186,7 @@ def test_tpm2_change_auth(u_boot_console):
u_boot_console.run_command('tpm2 clear TPM2_RH_PLATFORM')
assert output.endswith('0')
+@pytest.mark.buildconfigspec('sandbox')
@pytest.mark.buildconfigspec('cmd_tpm_v2')
def test_tpm2_get_capability(u_boot_console):
"""Execute a TPM_GetCapability command.