Igor Opaniuk | b87e16c | 2024-04-04 15:19:50 +0200 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0+ |
| 2 | # |
| 3 | # Tests for OP-TEE RPMB read/write support |
| 4 | |
| 5 | """ |
| 6 | This tests optee_rpmb cmd in U-Boot |
| 7 | """ |
| 8 | |
| 9 | import pytest |
| 10 | import u_boot_utils as util |
| 11 | |
| 12 | @pytest.mark.buildconfigspec('cmd_optee_rpmb') |
| 13 | def 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' |