Skip to content

Commit

Permalink
suit: Add tests for severable sequences
Browse files Browse the repository at this point in the history
Add a test that verifies installation of manifests with severable
sequences.
Update suit-processor revision to make it possible.

Ref: NCSDK-29653

Signed-off-by: Tomasz Chyrowicz <[email protected]>
  • Loading branch information
tomchy committed Nov 26, 2024
1 parent db3ad8c commit 73648e5
Show file tree
Hide file tree
Showing 11 changed files with 1,244 additions and 1 deletion.
12 changes: 12 additions & 0 deletions tests/subsys/suit/manifest_common/regenerate_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ declare -A dependency_envelopes=(
../orchestrator/manifest/src/manifest_valid_app_54.c"
["../orchestrator/manifest/sample_valid.yaml"]="
../orchestrator/manifest/src/manifest_valid_app.c"
["../orchestrator/manifest/sample_valid_severable_54.yaml"]="
../orchestrator/manifest/src/manifest_valid_app_severable_54.c"
["../orchestrator/manifest/sample_valid_severable.yaml"]="
../orchestrator/manifest/src/manifest_valid_app_severable.c"
)
declare -A root_envelopes=(
["../storage/manifest/manifest_root.yaml"]="
Expand All @@ -101,6 +105,10 @@ declare -A root_envelopes=(
../orchestrator/manifest/src/manifest_valid_54.c"
["../orchestrator/manifest/sample_valid_root.yaml"]="
../orchestrator/manifest/src/manifest_valid.c"
["../orchestrator/manifest/sample_valid_root_severable_54.yaml"]="
../orchestrator/manifest/src/manifest_valid_severable_54.c"
["../orchestrator/manifest/sample_valid_root_severable.yaml"]="
../orchestrator/manifest/src/manifest_valid_severable.c"
)
declare -A envelope_dependency_names=(
["../storage/manifest/manifest_app.yaml"]="app.suit"
Expand All @@ -114,6 +122,10 @@ declare -A envelope_dependency_names=(
["../orchestrator/manifest/sample_valid.yaml"]="sample_app_posix.suit"
["../orchestrator/manifest/sample_valid_root_54.yaml"]="sample_root.suit"
["../orchestrator/manifest/sample_valid_root.yaml"]="sample_root_posix.suit"
["../orchestrator/manifest/sample_valid_severable_54.yaml"]="sample_app_severable.suit"
["../orchestrator/manifest/sample_valid_severable.yaml"]="sample_app_severable_posix.suit"
["../orchestrator/manifest/sample_valid_root_severable_54.yaml"]="sample_root_severable.suit"
["../orchestrator/manifest/sample_valid_root_severable.yaml"]="sample_root_severable_posix.suit"
)


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
SUIT_Envelope_Tagged:
suit-authentication-wrapper:
SuitDigest:
suit-digest-algorithm-id: cose-alg-sha-256
suit-manifest:
suit-manifest-version: 1
suit-manifest-sequence-number: 1
suit-common:
suit-components:
- - CAND_MFST
- 0
- - INSTLD_MFST
- RFC4122_UUID:
namespace: nordicsemi.com
name: test_sample_app
suit-shared-sequence:
- suit-directive-set-component-index: 1
- suit-directive-override-parameters:
suit-parameter-vendor-identifier:
RFC4122_UUID: nordicsemi.com
suit-parameter-class-identifier:
RFC4122_UUID:
namespace: nordicsemi.com
name: test_sample_root

- suit-condition-vendor-identifier:
- suit-send-record-success
- suit-send-record-failure
- suit-send-sysinfo-success
- suit-send-sysinfo-failure
- suit-condition-class-identifier:
- suit-send-record-success
- suit-send-record-failure
- suit-send-sysinfo-success
- suit-send-sysinfo-failure
suit-dependencies:
# Key is the index of suit-components that describe the dependency manifest
"0": {}
"1": {}

suit-validate:
- suit-directive-set-component-index: 1
- suit-condition-dependency-integrity:
- suit-send-record-success
- suit-send-record-failure
- suit-send-sysinfo-success
- suit-send-sysinfo-failure
- suit-directive-process-dependency:
- suit-send-record-success
- suit-send-record-failure
- suit-send-sysinfo-success
- suit-send-sysinfo-failure

suit-invoke:
- suit-directive-set-component-index: 1
- suit-condition-dependency-integrity:
- suit-send-record-success
- suit-send-record-failure
- suit-send-sysinfo-success
- suit-send-sysinfo-failure
- suit-directive-process-dependency:
- suit-send-record-success
- suit-send-record-failure
- suit-send-sysinfo-success
- suit-send-sysinfo-failure

###
# All SUIT_Severable_Members_Choice
###
suit-payload-fetch:
suit-digest-algorithm-id: cose-alg-sha-256
suit-install:
suit-digest-algorithm-id: cose-alg-sha-256
suit-text:
suit-digest-algorithm-id: cose-alg-sha-256

###
# All severable-manifest-members-choice-extensions
###
suit-dependency-resolution:
suit-digest-algorithm-id: cose-alg-sha-256
suit-candidate-verification:
suit-digest-algorithm-id: cose-alg-sha-256

suit-manifest-component-id:
- INSTLD_MFST
- RFC4122_UUID:
namespace: nordicsemi.com
name: test_sample_root

###
# All SUIT_Severable_Manifest_Members
###
suit-payload-fetch:
- suit-directive-set-component-index: 0
- suit-directive-override-parameters:
suit-parameter-uri: '#app.suit'
suit-parameter-image-digest:
suit-digest-algorithm-id: cose-alg-sha-256
suit-digest-bytes:
envelope: sample_app_posix.suit
- suit-directive-fetch:
- suit-send-record-failure
- suit-condition-image-match:
- suit-send-record-success
- suit-send-record-failure
- suit-send-sysinfo-success
- suit-send-sysinfo-failure
- suit-condition-dependency-integrity:
- suit-send-record-success
- suit-send-record-failure
- suit-send-sysinfo-success
- suit-send-sysinfo-failure
- suit-directive-process-dependency:
- suit-send-record-success
- suit-send-record-failure
- suit-send-sysinfo-success
- suit-send-sysinfo-failure

suit-install:
- suit-directive-set-component-index: 0
- suit-directive-override-parameters:
suit-parameter-uri: '#app.suit'
suit-parameter-image-digest:
suit-digest-algorithm-id: cose-alg-sha-256
suit-digest-bytes:
envelope: sample_app_posix.suit
- suit-directive-fetch:
- suit-send-record-failure
- suit-condition-image-match:
- suit-send-record-success
- suit-send-record-failure
- suit-send-sysinfo-success
- suit-send-sysinfo-failure
- suit-condition-dependency-integrity:
- suit-send-record-success
- suit-send-record-failure
- suit-send-sysinfo-success
- suit-send-sysinfo-failure
- suit-directive-process-dependency:
- suit-send-record-success
- suit-send-record-failure
- suit-send-sysinfo-success
- suit-send-sysinfo-failure
# Manifest copied to I/APP s a result of sequence completion
# Manifest copied to I/ROOT s a result of sequence completion

suit-text:
en:
'["CAND_MFST", 0]':
suit-text-vendor-name: Nordic Semiconductor ASA
suit-text-model-name: test
suit-text-vendor-domain: nordicsemi.com
suit-text-model-info: The test root manifest
suit-text-component-description: Sample root manifest
suit-text-component-version: v1.0.0

###
# All SUIT_severable-members-extensions
###
suit-dependency-resolution:
- suit-directive-set-component-index: 0
- suit-directive-override-parameters:
suit-parameter-uri: '#app.suit'
suit-parameter-image-digest:
suit-digest-algorithm-id: cose-alg-sha-256
suit-digest-bytes:
envelope: sample_app_posix.suit
- suit-directive-fetch:
- suit-send-record-failure
- suit-condition-image-match:
- suit-send-record-success
- suit-send-record-failure
- suit-send-sysinfo-success
- suit-send-sysinfo-failure
- suit-condition-dependency-integrity:
- suit-send-record-success
- suit-send-record-failure
- suit-send-sysinfo-success
- suit-send-sysinfo-failure
- suit-directive-process-dependency:
- suit-send-record-success
- suit-send-record-failure
- suit-send-sysinfo-success
- suit-send-sysinfo-failure

suit-candidate-verification:
- suit-directive-set-component-index: 0
- suit-directive-override-parameters:
suit-parameter-uri: '#app.suit'
suit-parameter-image-digest:
suit-digest-algorithm-id: cose-alg-sha-256
suit-digest-bytes:
envelope: sample_app_posix.suit
- suit-directive-fetch:
- suit-send-record-failure
- suit-condition-image-match:
- suit-send-record-success
- suit-send-record-failure
- suit-send-sysinfo-success
- suit-send-sysinfo-failure
- suit-condition-dependency-integrity:
- suit-send-record-success
- suit-send-record-failure
- suit-send-sysinfo-success
- suit-send-sysinfo-failure
- suit-directive-process-dependency:
- suit-send-record-success
- suit-send-record-failure
- suit-send-sysinfo-success
- suit-send-sysinfo-failure

suit-integrated-dependencies:
'#app.suit': sample_app_severable_posix.suit
Loading

0 comments on commit 73648e5

Please sign in to comment.