Igor Opaniuk | 905b173 | 2021-02-14 16:27:28 +0100 | [diff] [blame] | 1 | # Copyright (c) 2021 Foundries.io Ltd |
| 2 | # |
| 3 | # SPDX-License-Identifier: GPL-2.0+ |
| 4 | # |
| 5 | # SCP03 command test |
| 6 | |
| 7 | """ |
Michal Simek | 50fa118 | 2023-05-17 09:17:16 +0200 | [diff] [blame] | 8 | This tests SCP03 command in U-Boot. |
Igor Opaniuk | 905b173 | 2021-02-14 16:27:28 +0100 | [diff] [blame] | 9 | |
| 10 | For additional details check doc/usage/scp03.rst |
| 11 | """ |
| 12 | |
| 13 | import pytest |
Simon Glass | db0e453 | 2025-02-09 09:07:16 -0700 | [diff] [blame] | 14 | import utils |
Igor Opaniuk | 905b173 | 2021-02-14 16:27:28 +0100 | [diff] [blame] | 15 | |
| 16 | @pytest.mark.buildconfigspec('cmd_scp03') |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 17 | def test_scp03(ubman): |
Igor Opaniuk | 905b173 | 2021-02-14 16:27:28 +0100 | [diff] [blame] | 18 | """Enable and provision keys with SCP03 |
| 19 | """ |
| 20 | |
| 21 | success_str1 = "SCP03 is enabled" |
| 22 | success_str2 = "SCP03 is provisioned" |
| 23 | |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 24 | response = ubman.run_command('scp03 enable') |
Igor Opaniuk | 905b173 | 2021-02-14 16:27:28 +0100 | [diff] [blame] | 25 | assert success_str1 in response |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 26 | response = ubman.run_command('scp03 provision') |
Igor Opaniuk | 905b173 | 2021-02-14 16:27:28 +0100 | [diff] [blame] | 27 | assert success_str2 in response |