README.rst
1.. _tfm_psa_test:
2
3TF-M Platform Security Architecture Test Sample
4###############################################
5
6Overview
7********
8
9Run PSA test suites tests with Zephyr and TFM.
10
11The PSA tests are implemented in the psa-arch-tests repo: https://github.com/ARM-software/psa-arch-tests
12
13This sample is supported for platforms that have a port in psa-arch-tests.
14See sample.yaml for a list of supported platforms.
15
16Building and Running
17********************
18
19You must choose a suite via the CONFIG_TFM_PSA_TEST_* configs.
20
21On Target
22=========
23
24Refer to :ref:`tfm_ipc` for detailed instructions.
25
26On QEMU:
27========
28
29Refer to :ref:`tfm_ipc` for detailed instructions.
30Following is an example based on ``west build``
31
32 .. code-block:: bash
33
34 $ west build samples/tfm_integration/tfm_psa_test/ -p -b mps2_an521_ns -t run -- -DCONFIG_TFM_PSA_TEST_STORAGE=y
35
36Sample Output
37=============
38
39 .. code-block:: console
40
41 *** Booting Zephyr OS build zephyr-v2.5.0-456-g06f4da459a99 ***
42
43 ***** PSA Architecture Test Suite - Version 1.0 *****
44
45 Running.. Storage Suite
46 ******************************************
47
48 TEST: 401 | DESCRIPTION: UID not found check
49 [Info] Executing tests from non-secure
50
51 [Info] Executing ITS tests
52 [Check 1] Call get API for UID 6 which is not set
53 [Check 2] Call get_info API for UID 6 which is not set
54 [Check 3] Call remove API for UID 6 which is not set
55 [Check 4] Call get API for UID 6 which is removed
56 [Check 5] Call get_info API for UID 6 which is removed
57 [Check 6] Call remove API for UID 6 which is removed
58 Set storage for UID 6
59 [Check 7] Call get API for different UID 5
60 [Check 8] Call get_info API for different UID 5
61 [Check 9] Call remove API for different UID 5
62
63 [Info] Executing PS tests
64 [Check 1] Call get API for UID 6 which is not set
65 [Check 2] Call get_info API for UID 6 which is not set
66 [Check 3] Call remove API for UID 6 which is not set
67 [Check 4] Call get API for UID 6 which is removed
68 [Check 5] Call get_info API for UID 6 which is removed
69 [Check 6] Call remove API for UID 6 which is removed
70 Set storage for UID 6
71 [Check 7] Call get API for different UID 5
72 [Check 8] Call get_info API for different UID 5
73 [Check 9] Call remove API for different UID 5
74
75 TEST RESULT: PASSED
76
77 ******************************************
78
79 [...]
80
81 TEST: 417 | DESCRIPTION: Storage assest capacity modification check
82 [Info] Executing tests from non-secure
83
84 [Info] Executing PS tests
85 Test Case skipped as Optional PS APIs not are supported.
86
87 TEST RESULT: SKIPPED (Skip Code=0x0000002B)
88
89 ******************************************
90
91 ************ Storage Suite Report **********
92 TOTAL TESTS : 17
93 TOTAL PASSED : 11
94 TOTAL SIM ERROR : 0
95 TOTAL FAILED : 0
96 TOTAL SKIPPED : 6
97 ******************************************
98
99 Entering standby..
100