aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorIgor Opaniuk <igor.opaniuk@gmail.com>2024-04-04 15:19:50 +0200
committerIlias Apalodimas <ilias.apalodimas@linaro.org>2024-04-18 16:04:48 +0300
commitf5d14bea8faac0ded5f366b437801a229b165bb6 (patch)
tree5f69cfaf6f06550432e2d42b604ef7666f869c74 /test
parentdfac18e944f23bf64ce3638aa8d57f9e0c0e6c26 (diff)
downloadu-boot-f5d14bea8faac0ded5f366b437801a229b165bb6.zip
u-boot-f5d14bea8faac0ded5f366b437801a229b165bb6.tar.gz
u-boot-f5d14bea8faac0ded5f366b437801a229b165bb6.tar.bz2
test: py: add optee_rpmb tests
Add read/write tests for optee_rpmb cmd. Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'test')
-rw-r--r--test/py/tests/test_optee_rpmb.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/py/tests/test_optee_rpmb.py b/test/py/tests/test_optee_rpmb.py
new file mode 100644
index 0000000..8a081b5
--- /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