Part 1
요약·해설
PS·ITS·Crypto·Attestation·Platform·IPC와 Core suite의 양쪽 domain 결과를 설명합니다.
CONFIG_TFM_REGRESSION_S
CONFIG_TFM_REGRESSION_NS
tf-m-tests
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
17CAC8E41BB24EEA99222F7A0F8B46EDA2F41F0E9E4C01325C4469E3F97E47B7
.. _tfm_regression_test:
TF-M Regression Test Sample
###########################
Overview
********
Run both the Secure and Non-secure TF-M Regression tests using the Zephyr build system.
The build system will replace the Zephyr application with the Non-Secure TF-M test application,
while the Secure tests will be included in the TF-M build itself.
The TF-M regression tests are implemented in the tf-m-tests repo: https://git.trustedfirmware.org/TF-M/tf-m-tests.git/
This sample is available for platforms that are supported in the trusted-firmware-m repo: https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git/
See sample.yaml for a list of supported platforms.
Building and Running
********************
Tests 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.
On Target
=========
Refer to :ref:`tfm_ipc` for detailed instructions.
On QEMU:
========
Refer to :ref:`tfm_ipc` for detailed instructions.
Following is an example based on ``west build``
.. code-block:: bash
$ west build samples/tfm_integration/tfm_regression_test/ -p -b mps2/an521/cpu0/ns -t run
Sample Output
=============
.. code-block:: console
Non-Secure system starting...
#### Execute test suites for the Secure area ####
[...]
Running Test Suite PS reliability tests (TFM_PS_TEST_3XXX)...
> Executing 'TFM_PS_TEST_3001'
Description: 'repetitive sets and gets in/from an asset'
> Iteration 15 of 15
TEST: TFM_PS_TEST_3001 - PASSED!
> Executing 'TFM_PS_TEST_3002'
Description: 'repetitive sets, gets and removes'
> Iteration 15 of 15
TEST: TFM_PS_TEST_3002 - PASSED!
TESTSUITE PASSED!
[...]
*** Secure test suites summary ***
Test suite 'PSA protected storage S interface tests (TFM_PS_TEST_2XXX)' has PASSED
Test suite 'PS reliability tests (TFM_PS_TEST_3XXX)' has PASSED
Test suite 'PS rollback protection tests (TFM_PS_TEST_4XXX)' has PASSED
Test suite 'PSA internal trusted storage S interface tests (TFM_ITS_TEST_2XXX)' has PASSED
Test suite 'ITS reliability tests (TFM_ITS_TEST_3XXX)' has PASSED
Test suite 'Crypto secure interface tests (TFM_CRYPTO_TEST_5XXX)' has PASSED
Test suite 'Initial Attestation Service secure interface tests(TFM_ATTEST_TEST_1XXX)' has PASSED
Test suite 'Platform Service Secure interface tests(TFM_PLATFORM_TEST_1XXX)' has PASSED
Test suite 'IPC secure interface test (TFM_IPC_TEST_1XXX)' has PASSED
*** End of Secure test suites ***
#### Execute test suites for the Non-secure area ####
[...]
Running Test Suite Core non-secure positive tests (TFM_CORE_TEST_1XXX)...
> Executing 'TFM_CORE_TEST_1001'
Description: 'Test service request from NS thread mode'
TEST: TFM_CORE_TEST_1001 - PASSED!
> Executing 'TFM_CORE_TEST_1003'
Description: 'Test the success of service init'
TEST: TFM_CORE_TEST_1003 - PASSED!
> Executing 'TFM_CORE_TEST_1007'
Description: 'Test secure service buffer accesses'
TEST: TFM_CORE_TEST_1007 - PASSED!
> Executing 'TFM_CORE_TEST_1008'
Description: 'Test secure service to service call'
TEST: TFM_CORE_TEST_1008 - PASSED!
> Executing 'TFM_CORE_TEST_1010'
Description: 'Test secure service to service call with buffer handling'
TEST: TFM_CORE_TEST_1010 - PASSED!
> Executing 'TFM_CORE_TEST_1015'
Description: 'Test service parameter sanitization'
TEST: TFM_CORE_TEST_1015 - PASSED!
> Executing 'TFM_CORE_TEST_1016'
Description: 'Test outvec write'
TEST: TFM_CORE_TEST_1016 - PASSED!
TESTSUITE PASSED!
[...]
*** Non-secure test suites summary ***
Test suite 'PSA protected storage NS interface tests (TFM_PS_TEST_1XXX)' has PASSED
Test suite 'PSA internal trusted storage NS interface tests (TFM_ITS_TEST_1XXX)' has PASSED
Test suite 'Crypto non-secure interface test (TFM_CRYPTO_TEST_6XXX)' has PASSED
Test suite 'Platform Service Non-Secure interface tests(TFM_PLATFORM_TEST_2XXX)' has PASSED
Test suite 'Initial Attestation Service non-secure interface tests(TFM_ATTEST_TEST_2XXX)' has PASSED
Test suite 'QCBOR regression test(TFM_QCBOR_TEST_7XXX)' has PASSED
Test suite 'T_COSE regression test(TFM_T_COSE_TEST_8XXX)' has PASSED
Test suite 'Core non-secure positive tests (TFM_CORE_TEST_1XXX)' has PASSED
Test suite 'IPC non-secure interface test (TFM_IPC_TEST_1XXX)' has PASSED
*** End of Non-secure test suites ***
Part 3
한국어 전문 번역
개요
Zephyr build system으로 secure 영역과 non-secure 영역의 TF-M regression test를 모두 실행합니다.
Build system은 Zephyr application을 Non-Secure TF-M test application으로 바꾸고, Secure test는 TF-M build 자체에 포함합니다.
TF-M regression test는 tf-m-tests repository에 구현되어 있습니다. 이 sample은 trusted-firmware-m repository가 지원하는 platform에서 사용할 수 있으며, 목록은 sample.yaml에서 확인합니다.
빌드 및 실행
Secure domain과 non-secure domain test는 기본적으로 모두 활성화됩니다. 각각 CONFIG_TFM_REGRESSION_S와 CONFIG_TFM_REGRESSION_NS configuration으로 제어합니다.
실제 Target
자세한 build·flash instruction은 TF-M IPC sample을 참고합니다.
QEMU
자세한 instruction은 TF-M IPC sample을 참고합니다. 다음은 west build로 MPS2 AN521 non-secure target에서 실행하는 예입니다.
$ west build samples/tfm_integration/tfm_regression_test/ -p -b mps2/an521/cpu0/ns -t run
샘플 출력
먼저 secure 영역 suite를 실행합니다. Protected Storage의 반복 set/get/remove, rollback protection, Internal Trusted Storage, Crypto secure interface, Initial Attestation, Platform Service와 IPC secure interface test가 통과합니다.
그다음 non-secure 영역 suite를 실행합니다. Service request·initialization·buffer access·service-to-service call·parameter sanitization·outvec write를 확인하는 Core test와 PS·ITS·Crypto·Platform·Attestation·QCBOR·T_COSE·IPC non-secure interface test가 모두 통과합니다.
Non-Secure system starting...
#### Execute test suites for the Secure area ####
[...]
Running Test Suite PS reliability tests (TFM_PS_TEST_3XXX)...
> Executing 'TFM_PS_TEST_3001'
Description: 'repetitive sets and gets in/from an asset'
> Iteration 15 of 15
TEST: TFM_PS_TEST_3001 - PASSED!
> Executing 'TFM_PS_TEST_3002'
Description: 'repetitive sets, gets and removes'
> Iteration 15 of 15
TEST: TFM_PS_TEST_3002 - PASSED!
TESTSUITE PASSED!
[...]
*** Secure test suites summary ***
Test suite 'PSA protected storage S interface tests (TFM_PS_TEST_2XXX)' has PASSED
Test suite 'PS reliability tests (TFM_PS_TEST_3XXX)' has PASSED
Test suite 'PS rollback protection tests (TFM_PS_TEST_4XXX)' has PASSED
Test suite 'PSA internal trusted storage S interface tests (TFM_ITS_TEST_2XXX)' has PASSED
Test suite 'ITS reliability tests (TFM_ITS_TEST_3XXX)' has PASSED
Test suite 'Crypto secure interface tests (TFM_CRYPTO_TEST_5XXX)' has PASSED
Test suite 'Initial Attestation Service secure interface tests(TFM_ATTEST_TEST_1XXX)' has PASSED
Test suite 'Platform Service Secure interface tests(TFM_PLATFORM_TEST_1XXX)' has PASSED
Test suite 'IPC secure interface test (TFM_IPC_TEST_1XXX)' has PASSED
*** End of Secure test suites ***
#### Execute test suites for the Non-secure area ####
[...]
Running Test Suite Core non-secure positive tests (TFM_CORE_TEST_1XXX)...
> Executing 'TFM_CORE_TEST_1001'
Description: 'Test service request from NS thread mode'
TEST: TFM_CORE_TEST_1001 - PASSED!
> Executing 'TFM_CORE_TEST_1003'
Description: 'Test the success of service init'
TEST: TFM_CORE_TEST_1003 - PASSED!
> Executing 'TFM_CORE_TEST_1007'
Description: 'Test secure service buffer accesses'
TEST: TFM_CORE_TEST_1007 - PASSED!
> Executing 'TFM_CORE_TEST_1008'
Description: 'Test secure service to service call'
TEST: TFM_CORE_TEST_1008 - PASSED!
> Executing 'TFM_CORE_TEST_1010'
Description: 'Test secure service to service call with buffer handling'
TEST: TFM_CORE_TEST_1010 - PASSED!
> Executing 'TFM_CORE_TEST_1015'
Description: 'Test service parameter sanitization'
TEST: TFM_CORE_TEST_1015 - PASSED!
> Executing 'TFM_CORE_TEST_1016'
Description: 'Test outvec write'
TEST: TFM_CORE_TEST_1016 - PASSED!
TESTSUITE PASSED!
[...]
*** Non-secure test suites summary ***
Test suite 'PSA protected storage NS interface tests (TFM_PS_TEST_1XXX)' has PASSED
Test suite 'PSA internal trusted storage NS interface tests (TFM_ITS_TEST_1XXX)' has PASSED
Test suite 'Crypto non-secure interface test (TFM_CRYPTO_TEST_6XXX)' has PASSED
Test suite 'Platform Service Non-Secure interface tests(TFM_PLATFORM_TEST_2XXX)' has PASSED
Test suite 'Initial Attestation Service non-secure interface tests(TFM_ATTEST_TEST_2XXX)' has PASSED
Test suite 'QCBOR regression test(TFM_QCBOR_TEST_7XXX)' has PASSED
Test suite 'T_COSE regression test(TFM_T_COSE_TEST_8XXX)' has PASSED
Test suite 'Core non-secure positive tests (TFM_CORE_TEST_1XXX)' has PASSED
Test suite 'IPC non-secure interface test (TFM_IPC_TEST_1XXX)' has PASSED
*** End of Non-secure test suites ***
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.