aboutsummaryrefslogtreecommitdiff
path: root/test/py/tests/test_tpm2.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/py/tests/test_tpm2.py')
-rw-r--r--test/py/tests/test_tpm2.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/py/tests/test_tpm2.py b/test/py/tests/test_tpm2.py
index 1ade66a7ed..fce689cd99 100644
--- a/test/py/tests/test_tpm2.py
+++ b/test/py/tests/test_tpm2.py
@@ -272,6 +272,12 @@ def test_tpm2_pcr_extend(u_boot_console):
force_init(u_boot_console)
ram = u_boot_utils.find_ram_base(u_boot_console)
+ read_pcr = u_boot_console.run_command('tpm2 pcr_read 0 0x%x' % (ram + 0x20))
+ output = u_boot_console.run_command('echo $?')
+ assert output.endswith('0')
+ str = re.findall(r'\d+ known updates', read_pcr)[0]
+ updates = int(re.findall(r'\d+', str)[0])
+
u_boot_console.run_command('tpm2 pcr_extend 0 0x%x' % ram)
output = u_boot_console.run_command('echo $?')
assert output.endswith('0')