Skip to content

Commit 652b40f

Browse files
tomi-fontrlubos
authored andcommitted
tests: zephyr: extend secure_storage test coverage
Extend the test scenarios found under tests/subsys/secure_storage/psa/its with configurations tailored to NCS. CONFIG_NRF_SECURITY and other relevant Kconfig options are enabled. The primary intent is to test the backward-compatible implementation, so all test scenarios except the ZMS one use it. Signed-off-by: Tomi Fontanilles <[email protected]>
1 parent 0e774df commit 652b40f

File tree

5 files changed

+84
-1
lines changed

5 files changed

+84
-1
lines changed

CODEOWNERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,7 @@
946946
/tests/subsys/pcd/ @nrfconnect/ncs-pluto
947947
/tests/subsys/sdfw_services/ @nrfconnect/ncs-aurora
948948
/tests/subsys/suit/ @nrfconnect/ncs-charon
949+
/tests/subsys/usb/negotiated_speed/ @nrfconnect/ncs-low-level-test
949950
/tests/tfm/ @nrfconnect/ncs-aegir @magnev
950951
/tests/unity/ @nordic-krch
951952
/tests/zephyr/boards/nrf/ @nrfconnect/ncs-low-level-test
@@ -969,7 +970,7 @@
969970
/tests/zephyr/drivers/uart/ @nrfconnect/ncs-low-level-test
970971
/tests/zephyr/drivers/watchdog/ @nrfconnect/ncs-low-level-test
971972
/tests/zephyr/kernel/timer/timer_behavior/ @nrfconnect/ncs-low-level-test
972-
/tests/subsys/usb/negotiated_speed/ @nrfconnect/ncs-low-level-test
973+
/tests/zephyr/subsys/secure_storage/ @nrfconnect/ncs-aegir
973974
/tests/zephyr/subsys/settings/performance/ @nrfconnect/ncs-pluto @rghaddab
974975

975976
/tests/benchmarks/multicore/idle/*.rst @nrfconnect/ncs-si-bluebagel-doc

scripts/ci/tags.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,11 @@ ci_samples_crypto: &ci_crypto
224224
- nrf/samples/crypto/
225225
- nrf/subsys/nrf_security/
226226
- nrf/subsys/partition_manager/
227+
- nrf/subsys/secure_storage/
228+
- nrf/subsys/trusted_storage/
227229
- nrf/sysbuild/
228230
- nrf/tests/crypto/
231+
- nrf/tests/zephyr/subsys/secure_storage/
229232
- zephyr/cmake/
230233
- zephyr/drivers/entropy/
231234
- zephyr/drivers/serial/
@@ -1359,6 +1362,7 @@ ci_applications_protocols_serialization:
13591362
- nrf/subsys/net/openthread/
13601363
- nrf/subsys/nrf_rpc/
13611364
- nrf/subsys/nrf_security/
1365+
- nrf/subsys/secure_storage/
13621366
- nrf/subsys/trusted_storage/
13631367
- nrfxlib/crypto/
13641368
- nrfxlib/nrf_802154/
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
cmake_minimum_required(VERSION 3.20.0)
2+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
3+
project(app)
4+
5+
target_sources(app PRIVATE ${ZEPHYR_BASE}/tests/subsys/secure_storage/psa/its/src/main.c)
6+
7+
zephyr_sources_ifdef(CONFIG_SECURE_STORAGE_ITS_TRANSFORM_IMPLEMENTATION_CUSTOM
8+
${ZEPHYR_BASE}/tests/subsys/secure_storage/psa/its/src/custom_transform.c)
9+
10+
zephyr_sources_ifdef(CONFIG_SECURE_STORAGE_ITS_STORE_IMPLEMENTATION_CUSTOM
11+
${ZEPHYR_BASE}/tests/subsys/secure_storage/psa/its/src/custom_store.c)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CONFIG_ZTEST=y
2+
3+
CONFIG_SECURE_STORAGE_TRUSTED_STORAGE_COMPATIBILITY=y
4+
5+
CONFIG_NRF_SECURITY=y
6+
CONFIG_PSA_WANT_GENERATE_RANDOM=y
7+
8+
CONFIG_MPU_ALLOW_FLASH_WRITE=y
9+
CONFIG_HW_UNIQUE_KEY_WRITE_ON_CRYPTO_INIT=y
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
common:
2+
sysbuild: true
3+
tags:
4+
- sysbuild
5+
- psa
6+
- crypto
7+
- ci_tests_crypto
8+
platform_allow:
9+
- native_sim
10+
- nrf54l15dk/nrf54l15/cpuapp
11+
- nrf9151dk/nrf9151
12+
- nrf52840dk/nrf52840
13+
integration_platforms:
14+
- native_sim
15+
- nrf54l15dk/nrf54l15/cpuapp
16+
- nrf9151dk/nrf9151
17+
- nrf52840dk/nrf52840
18+
19+
tests:
20+
nrf.extended.secure_storage.psa.its.secure_storage.store.zms:
21+
filter: not CONFIG_SOC_NRF52840
22+
extra_args:
23+
- SB_CONFIG_PARTITION_MANAGER=n
24+
- EXTRA_DTC_OVERLAY_FILE=${ZEPHYR_BASE}/tests/subsys/secure_storage/psa/its/zms.overlay
25+
- EXTRA_CONF_FILE=\
26+
${ZEPHYR_BASE}/tests/subsys/secure_storage/psa/its/overlay-secure_storage.conf;\
27+
${ZEPHYR_BASE}/tests/subsys/secure_storage/psa/its/overlay-store_zms.conf;\
28+
${ZEPHYR_BASE}/tests/subsys/secure_storage/psa/its/overlay-transform_default.conf
29+
30+
nrf.extended.secure_storage.backward_compatibility.psa.its.secure_storage.store.settings:
31+
extra_args: "EXTRA_CONF_FILE=\
32+
${ZEPHYR_BASE}/tests/subsys/secure_storage/psa/its/overlay-secure_storage.conf;\
33+
${ZEPHYR_BASE}/tests/subsys/secure_storage/psa/its/overlay-transform_default.conf;\
34+
${ZEPHYR_BASE}/tests/subsys/secure_storage/psa/its/overlay-store_settings.conf"
35+
extra_configs:
36+
- CONFIG_NVS=n
37+
- CONFIG_ZMS=y
38+
39+
nrf.extended.secure_storage.backward_compatibility.psa.its.secure_storage.custom.transform:
40+
extra_args: "EXTRA_CONF_FILE=\
41+
${ZEPHYR_BASE}/tests/subsys/secure_storage/psa/its/overlay-secure_storage.conf;\
42+
${ZEPHYR_BASE}/tests/subsys/secure_storage/psa/its/overlay-transform_custom.conf;\
43+
${ZEPHYR_BASE}/tests/subsys/secure_storage/psa/its/overlay-store_settings.conf"
44+
extra_configs:
45+
- CONFIG_NVS=n
46+
- CONFIG_ZMS=y
47+
48+
nrf.extended.secure_storage.backward_compatibility.psa.its.secure_storage.custom.store:
49+
extra_args: "EXTRA_CONF_FILE=\
50+
${ZEPHYR_BASE}/tests/subsys/secure_storage/psa/its/overlay-secure_storage.conf;\
51+
${ZEPHYR_BASE}/tests/subsys/secure_storage/psa/its/overlay-transform_default.conf;\
52+
${ZEPHYR_BASE}/tests/subsys/secure_storage/psa/its/overlay-store_custom.conf"
53+
54+
nrf.extended.secure_storage.backward_compatibility.psa.its.secure_storage.custom.both:
55+
extra_args: "EXTRA_CONF_FILE=\
56+
${ZEPHYR_BASE}/tests/subsys/secure_storage/psa/its/overlay-secure_storage.conf;\
57+
${ZEPHYR_BASE}/tests/subsys/secure_storage/psa/its/overlay-transform_custom.conf;\
58+
${ZEPHYR_BASE}/tests/subsys/secure_storage/psa/its/overlay-store_custom.conf"

0 commit comments

Comments
 (0)