summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/py/tests/test_eficonfig/test_eficonfig.py6
-rw-r--r--test/py/tests/test_optee_rpmb.py20
2 files changed, 23 insertions, 3 deletions
diff --git a/test/py/tests/test_eficonfig/test_eficonfig.py b/test/py/tests/test_eficonfig/test_eficonfig.py
index b0a6cc47df2..1d8e033f75d 100644
--- a/test/py/tests/test_eficonfig/test_eficonfig.py
+++ b/test/py/tests/test_eficonfig/test_eficonfig.py
@@ -224,7 +224,7 @@ def test_efi_eficonfig(u_boot_console, efi_eficonfig_data):
# Change the Boot Order
press_up_down_enter_and_wait(0, 2, True, None)
- # Check the curren BootOrder
+ # Check the current BootOrder
for i in ('test 2', 'test 1', 'host 0:1', 'Save', 'Quit'):
u_boot_console.p.expect([i])
# move 'test 2' to the second entry
@@ -269,7 +269,7 @@ def test_efi_eficonfig(u_boot_console, efi_eficonfig_data):
u_boot_console.run_command('eficonfig', wait_for_prompt=False)
# Select 'Edit Boot Option'
press_up_down_enter_and_wait(0, 1, True, None)
- # Check the curren BootOrder
+ # Check the current BootOrder
for i in ('test 1', 'Quit'):
u_boot_console.p.expect([i])
press_up_down_enter_and_wait(0, 0, True, None)
@@ -326,7 +326,7 @@ def test_efi_eficonfig(u_boot_console, efi_eficonfig_data):
# Select 'Delete Boot Option'
press_up_down_enter_and_wait(0, 3, True, None)
- # Check the curren BootOrder
+ # Check the current BootOrder
for i in ('test 3', 'Quit'):
u_boot_console.p.expect([i])
diff --git a/test/py/tests/test_optee_rpmb.py b/test/py/tests/test_optee_rpmb.py
new file mode 100644
index 00000000000..8a081b5c494
--- /dev/null
+++ b/test/py/tests/test_optee_rpmb.py
@@ -0,0 +1,20 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Tests for OP-TEE RPMB read/write support
+
+"""
+This tests optee_rpmb cmd in U-Boot
+"""
+
+import pytest
+import u_boot_utils as util
+
+@pytest.mark.buildconfigspec('cmd_optee_rpmb')
+def test_optee_rpmb_read_write(u_boot_console):
+ """Test OP-TEE RPMB cmd read/write
+ """
+ response = u_boot_console.run_command('optee_rpmb write_pvalue test_variable test_value')
+ assert response == 'Wrote 11 bytes'
+
+ response = u_boot_console.run_command('optee_rpmb read_pvalue test_variable 11')
+ assert response == 'Read 11 bytes, value = test_value' \ No newline at end of file