]> git.ipfire.org Git - thirdparty/u-boot.git/blame - test/py/tests/test_optee_rpmb.py
test: py: add optee_rpmb tests
[thirdparty/u-boot.git] / test / py / tests / test_optee_rpmb.py
CommitLineData
f5d14bea
IO
1# SPDX-License-Identifier: GPL-2.0+
2#
3# Tests for OP-TEE RPMB read/write support
4
5"""
6This tests optee_rpmb cmd in U-Boot
7"""
8
9import pytest
10import u_boot_utils as util
11
12@pytest.mark.buildconfigspec('cmd_optee_rpmb')
13def test_optee_rpmb_read_write(u_boot_console):
14 """Test OP-TEE RPMB cmd read/write
15 """
16 response = u_boot_console.run_command('optee_rpmb write_pvalue test_variable test_value')
17 assert response == 'Wrote 11 bytes'
18
19 response = u_boot_console.run_command('optee_rpmb read_pvalue test_variable 11')
20 assert response == 'Read 11 bytes, value = test_value'