Test Category | Specification Version |
---|---|
Crypto | Crypto API 1.2.1 |
Storage (PS and ITS) | Storage API 1.0.0 |
Attestation | Attestation API 1.0.2 |
Release version | Release tag | Crypto API | Storage API | Attestation API |
---|---|---|---|---|
REL v1.8 | v25.02_API1.8_CRYPTO_1.2.1 | 1.2.1 | 1.0.0 | 1.0.2 |
REL v1.7 | v24.10_API1.7_CRYPTO_PAKE | 1.1.0 1.2 (PAKE Extension) | 1.1.0 | 1.0.2 |
REL v1.6 | v24.03_API1.6_CRYPTO_1.1.0 | 1.1.0 | 1.0.0 | 1.0.2 |
REL v1.5 | v23.06_API1.5_ADAC_EAC | 1.0.1 | 1.0.0 | 1.0.2 |
REL v1.4 | v22.01_API1.4_ADAC_BETA | 1.0.1 | 1.0.0 | 1.0.2 |
REL v1.3 | v21.10_API1.3_ADAC_ALPHA-1 | 1.0.0 | 1.0.0 | 1.0.2 |
REL v1.2 | v21.07_API1.2_ADAC_ALPHA | 1.0.0 | 1.0.0 | 1.0.2 |
REL v1.1 | v20.11_API1.1 | 1.0-Beta3 | 1.0.0 | 1.0.0 |
REL v1.0 | v20.03_API1.0 | 1.0-Beta3 | 1.0.0 | 1.0.0 |
v0.9 | v19.06_API0.9 | 1.0-Beta2 | 1.0-Beta2 | 1.0-Beta0 |
v0.8 | v19.02_API0.8 | 1.0-Beta1 | 1.0-Beta0 | 1.0-Beta0 |
The mapping of the rules in the specification to the test cases and the steps followed in the tests are mentioned in the Scenario Documents that is present in the docs/ folder.
Scenario Documents | |
---|---|
Crypto | psa_crypto_testlist.md |
Storage (PS and ITS) | psa_storage_testlist.md |
Attestation | psa_attestation_testlist.md |
Follow the instructions in the subsequent sections to get a copy of the source code on your local machine and build the tests. Make sure you have all required software installed as explained in the Software Requirements Document.
Refer to the PSA Certified APIs Test Suite Porting Guide document for porting steps.
To build the test suite for your target platform, execute the following commands:
cd api-tests mkdir <build_dir> cd <build_dir> cmake ../ -G"<generator_name>" -DTARGET=<platform_name> -DCPU_ARCH=<cpu_architecture_version> -DSUITE=<suite_name> -DPSA_INCLUDE_PATHS="<include_path1>;<include_path2>;...;<include_pathn>" cmake --build .
Options information:
-DPSA_INCLUDE_PATHS=`readlink -f <relative_include_path>`
-DTOOLCHAIN=<tool_chain> Compiler toolchain to be used for test suite compilation. Supported values are GNUARM (GNU Arm Embedded), ARMCLANG (ARM Compiler 6.x) , HOST_GCC and GCC_LINUX . Default is GNUARM.
-DVERBOSITY=<verbosity_level>. Print verbosity level. Default is 3. Supported print levels are 1(INFO & above), 2(DEBUG & above), 3(TEST & above), 4(WARN & ERROR) and 5(ERROR).
-DBUILD=<BUILD_DIR> : To select the build directory to keep output files. Default is BUILD/ inside current directory.
-DWATCHDOG_AVAILABLE=<0|1>: Test harness may require to access watchdog timer to recover system hang. 0 means skip watchdog programming in the test suite and 1 means program the watchdog. Default is 1. Note, watchdog must be available for the tests which check the API behaviour on the system reset.
-DSUITE_TEST_RANGE="<test_start_number>;<test_end_number>" is to select range of tests for build. All tests under -DSUITE are considered by default if not specified.
-DTFM_PROFILE=<profile_small/profile_medium> is to work with TFM defined Profile Small/Medium definitions. Supported values are profile_small and profile_medium. Default profile is profile_large.
-DSPEC_VERSION=<spec_version> is test suite specification version. Which will build for given specified spec_version. Supported values for CRYPTO test suite are 1.0-BETA1, 1.0-BETA2, 1.0-BETA3 , 1.0.0, 1.0.1, 1.1.0, for INITIAL_ATTESTATION test suite are 1.0-BETA0, 1.0.0, 1.0.1, 1.0.2, for STORAGE, INTERNAL_TRUSTED_STORAGE, PROTECTED_STORAGE test suite are 1.0-BETA2, 1.0 . Default is empty.
If -DSPEC_VERSION option is not given it will build for latest version of testsuite. For every spec version corresponds test list will be in spec_version_testsuite.db file in api-tests/dev_apis/test_suite_name/ folder.
-DCOMPILER_NAME=<compiler_name> Name to be used for selecting a compiler. It defaults to gcc.
Note: -DCOMPILER_NAME only applicable for linux i.e. -DTOOLCHAIN=GCC_LINUX and DTARGET=tgt_dev_apis_linux.
-DPSA_TARGET_QCBOR=< path > for pre-fetched cbor folder, this is option used where no network connectivity is possible during the build.
-DINITIAL_ATTESTATION_PROFILE_FORMAT=<initial_attestation_profile_format> is to select Initial Attestation token profile format. Supported values are 1 and 2. Default profile is 1.
-DTESTS_COVERAGE=<tests_coverage_value> is used to skip known failure tests by selecting value PASS. Supported values are ALL and PASS. ALL value will include all the tests and PASS value will skip the known failure tests and will include pass tests. Default is ALL.
-DBESPOKE_SUITE_TESTS=<testsuite_db_file> should be placed in target specific directory, if this option is enabled, the mentioned database file will be picked up for compilation. if not default location database file will be used. This option is enabled only for CRYPTO suite at the moment.
-DBESPOKE_SUITE_TESTS='testsuite.db' The build system will look for the file in the target location (target=tgt_dev_apis_tfm_an521) : api-tests/platform/targets/tgt_dev_apis_tfm_an521/testsuite.db
To compile Crypto tests for tgt_dev_apis_tfm_an521 platform, execute the following commands:
cd api-tests mkdir BUILD cd BUILD cmake ../ -G"Unix Makefiles" -DTARGET=tgt_dev_apis_tfm_an521 -DCPU_ARCH=armv8m_ml -DSUITE=CRYPTO -DPSA_INCLUDE_PATHS="<include_path1>;<include_path2>;...;<include_pathn>" cmake --build .
Building the test suite generates the following NSPE binaries:
The following steps describe the execution flow before the test execution:
For details on test suite integration, refer to the Integrating the test suite with the SUT section of Validation Methodology.
The API test suite may run at higher privilege level. An attacker can utilize these tests as a means to elevate privilege which can potentially reveal the platform secure attests. To prevent such security vulnerabilities into the production system, it is strongly recommended that the API test suite is run on development platforms. If it is run on production system, make sure system is scrubbed after running the test suite.
Arm PSA test suite is distributed under Apache v2.0 License.
Copyright (c) 2018-2025, Arm Limited and Contributors. All rights reserved.