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 utils
11
12@pytest.mark.buildconfigspec('cmd_optee_rpmb')
13def test_optee_rpmb_read_write(ubman):
14    """Test OP-TEE RPMB cmd read/write
15    """
16    response = ubman.run_command('optee_rpmb write_pvalue test_variable test_value')
17    assert response == 'Wrote 11 bytes'
18
19    response = ubman.run_command('optee_rpmb read_pvalue test_variable 11')
20    assert response == 'Read 11 bytes, value = test_value'
21