README.rst
1.. _tfm_regression_test:
2
3TF-M Regression Test Sample
4###########################
5
6Overview
7********
8
9Run both the Secure and Non-secure TF-M Regression tests using the Zephyr build system.
10
11The build system will replace the Zephyr application with the Non-Secure TF-M test application,
12while the Secure tests will be included in the TF-M build itself.
13
14The TF-M regression tests are implemented in the tf-m-tests repo: https://git.trustedfirmware.org/TF-M/tf-m-tests.git/
15
16This sample is available for platforms that are supported in the trusted-firmware-m repo: https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git/
17See sample.yaml for a list of supported platforms.
18
19Building and Running
20********************
21
22Tests for both the secure and non-secure domain are enabled by default, controlled via the CONFIG_TFM_REGRESSION_S and CONFIG_TFM_REGRESSION_NS configs.
23
24On Target
25=========
26
27Refer to :ref:`tfm_ipc` for detailed instructions.
28
29On QEMU:
30========
31
32Refer to :ref:`tfm_ipc` for detailed instructions.
33Following is an example based on ``west build``
34
35 .. code-block:: bash
36
37 $ west build samples/tfm_integration/tfm_regression_test/ -p -b mps2_an521_ns -t run
38
39Sample Output
40=============
41
42 .. code-block:: console
43
44 Non-Secure system starting...
45
46 #### Execute test suites for the Secure area ####
47
48 [...]
49
50 Running Test Suite PS reliability tests (TFM_PS_TEST_3XXX)...
51 > Executing 'TFM_PS_TEST_3001'
52 Description: 'repetitive sets and gets in/from an asset'
53 > Iteration 15 of 15
54 TEST: TFM_PS_TEST_3001 - PASSED!
55 > Executing 'TFM_PS_TEST_3002'
56 Description: 'repetitive sets, gets and removes'
57 > Iteration 15 of 15
58 TEST: TFM_PS_TEST_3002 - PASSED!
59 TESTSUITE PASSED!
60
61 [...]
62
63 *** Secure test suites summary ***
64 Test suite 'PSA protected storage S interface tests (TFM_PS_TEST_2XXX)' has PASSED
65 Test suite 'PS reliability tests (TFM_PS_TEST_3XXX)' has PASSED
66 Test suite 'PS rollback protection tests (TFM_PS_TEST_4XXX)' has PASSED
67 Test suite 'PSA internal trusted storage S interface tests (TFM_ITS_TEST_2XXX)' has PASSED
68 Test suite 'ITS reliability tests (TFM_ITS_TEST_3XXX)' has PASSED
69 Test suite 'Crypto secure interface tests (TFM_CRYPTO_TEST_5XXX)' has PASSED
70 Test suite 'Initial Attestation Service secure interface tests(TFM_ATTEST_TEST_1XXX)' has PASSED
71 Test suite 'Platform Service Secure interface tests(TFM_PLATFORM_TEST_1XXX)' has PASSED
72 Test suite 'IPC secure interface test (TFM_IPC_TEST_1XXX)' has PASSED
73
74 *** End of Secure test suites ***
75
76 #### Execute test suites for the Non-secure area ####
77
78 [...]
79
80 Running Test Suite Core non-secure positive tests (TFM_CORE_TEST_1XXX)...
81 > Executing 'TFM_CORE_TEST_1001'
82 Description: 'Test service request from NS thread mode'
83 TEST: TFM_CORE_TEST_1001 - PASSED!
84 > Executing 'TFM_CORE_TEST_1003'
85 Description: 'Test the success of service init'
86 TEST: TFM_CORE_TEST_1003 - PASSED!
87 > Executing 'TFM_CORE_TEST_1007'
88 Description: 'Test secure service buffer accesses'
89 TEST: TFM_CORE_TEST_1007 - PASSED!
90 > Executing 'TFM_CORE_TEST_1008'
91 Description: 'Test secure service to service call'
92 TEST: TFM_CORE_TEST_1008 - PASSED!
93 > Executing 'TFM_CORE_TEST_1010'
94 Description: 'Test secure service to service call with buffer handling'
95 TEST: TFM_CORE_TEST_1010 - PASSED!
96 > Executing 'TFM_CORE_TEST_1015'
97 Description: 'Test service parameter sanitization'
98 TEST: TFM_CORE_TEST_1015 - PASSED!
99 > Executing 'TFM_CORE_TEST_1016'
100 Description: 'Test outvec write'
101 TEST: TFM_CORE_TEST_1016 - PASSED!
102 TESTSUITE PASSED!
103
104 [...]
105
106 *** Non-secure test suites summary ***
107 Test suite 'PSA protected storage NS interface tests (TFM_PS_TEST_1XXX)' has PASSED
108 Test suite 'PSA internal trusted storage NS interface tests (TFM_ITS_TEST_1XXX)' has PASSED
109 Test suite 'Crypto non-secure interface test (TFM_CRYPTO_TEST_6XXX)' has PASSED
110 Test suite 'Platform Service Non-Secure interface tests(TFM_PLATFORM_TEST_2XXX)' has PASSED
111 Test suite 'Initial Attestation Service non-secure interface tests(TFM_ATTEST_TEST_2XXX)' has PASSED
112 Test suite 'QCBOR regression test(TFM_QCBOR_TEST_7XXX)' has PASSED
113 Test suite 'T_COSE regression test(TFM_T_COSE_TEST_8XXX)' has PASSED
114 Test suite 'Core non-secure positive tests (TFM_CORE_TEST_1XXX)' has PASSED
115 Test suite 'IPC non-secure interface test (TFM_IPC_TEST_1XXX)' has PASSED
116
117 *** End of Non-secure test suites ***
118