Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nrf_rpc: enable zcbor stop_on_error flag for decoding #17209

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

Damian-Nordic
Copy link
Contributor

  1. The zcbor's stop_on_error flag, which defaults to false, makes the decoder stop decoding any subsequent items after a decoding error occurs, meaning that all subsequent decoding attempts fail early until the error is cleared with zcbor_pop_error() function.

This flag is already set for the encoder yet it was omitted for the decoder although some nRF RPC decoder functions seem to rely the flag being set as they only check the decoding result after trying to decode all the command or response arguments.

  1. Fix a function for checking if the next data item is null. The function would fail the decoding if the next item was another CBOR simple type, such as a bool constant.

@github-actions github-actions bot added manifest changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. labels Sep 5, 2024
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Sep 5, 2024

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff
nrfxlib nrfconnect/sdk-nrfxlib@a21499e nrfconnect/sdk-nrfxlib@56a4bd3 (main) nrfconnect/[email protected]

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@NordicBuilder
Copy link
Contributor

NordicBuilder commented Sep 5, 2024

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 11

Inputs:

Sources:

sdk-nrf: PR head: 731453886624f5805642965fd13563dee875d672
nrfxlib: PR head: 56a4bd3100123a8dd2049968d54cfc4014ca8eb8

more details

sdk-nrf:

PR head: 731453886624f5805642965fd13563dee875d672
merge base: ab2f82ad5ced6fc744acaa9b8dafa7ead4f12fbd
target head (main): 1f768eccaccb1d971edb482385173a124cd83b4b
Diff

nrfxlib:

PR head: 56a4bd3100123a8dd2049968d54cfc4014ca8eb8
merge base: a21499e8ac4bbf00e41879ade74dc95a26f7edb9
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (10)
nrfxlib
│  ├── nrf_rpc
│  │  ├── CHANGELOG.rst
│  │  │ nrf_rpc_cbor.c
subsys
│  ├── net
│  │  ├── openthread
│  │  │  ├── rpc
│  │  │  │  ├── common
│  │  │  │  │  │ ot_rpc_common.c
│  ├── nrf_rpc
│  │  │ nrf_rpc_serialize.c
tests
│  ├── subsys
│  │  ├── net
│  │  │  ├── openthread
│  │  │  │  ├── rpc
│  │  │  │  │  ├── server
│  │  │  │  │  │  ├── prj.conf
│  │  │  │  │  │  ├── src
│  │  │  │  │  │  │  │ cmsng_suite.c
│  │  ├── nfc
│  │  │  ├── rpc
│  │  │  │  ├── server
│  │  │  │  │  ├── prj.conf
│  │  │  │  │  ├── src
│  │  │  │  │  │  ├── t2t_suite.c
│  │  │  │  │  │  │ t4t_suite.c
west.yml

Outputs:

Toolchain

Version: 2aae60c2f9
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:2aae60c2f9_81ed5a52d6

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister - Skipped: Skipping Build & Test as it succeeded in a previous run: 8
  • ✅ Integration tests
    • ✅ test_ble_nrf_config - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-ble_samples - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-nrf-iot_cloud - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-rpc - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-rs - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-fem - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-thread - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-sdk-dfu - Skipped: Job was skipped as it succeeded in a previous run
    • ✅ test-fw-nrfconnect-ps - Skipped: Job was skipped as it succeeded in a previous run
Disabled integration tests
    • desktop52_verification
    • doc-internal
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_mesh
    • test-fw-nrfconnect-boot
    • test-fw-nrfconnect-chip
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • test-fw-nrfconnect-nrf-iot_lwm2m
    • test-fw-nrfconnect-nrf-iot_mosh
    • test-fw-nrfconnect-nrf-iot_nrf_provisioning
    • test-fw-nrfconnect-nrf-iot_positioning
    • test-fw-nrfconnect-nrf-iot_samples
    • test-fw-nrfconnect-nrf-iot_serial_lte_modem
    • test-fw-nrfconnect-nrf-iot_thingy91
    • test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • test-fw-nrfconnect-nrf_crypto
    • test-fw-nrfconnect-proprietary_esb
    • test-fw-nrfconnect-tfm
    • test-fw-nrfconnect-zigbee
    • test-low-level
    • test-sdk-audio
    • test-sdk-find-my
    • test-sdk-mcuboot
    • test-sdk-pmic-samples
    • test-sdk-sidewalk
    • test-sdk-wifi

Note: This message is automatically posted and updated by the CI

@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds.

Note: This comment is automatically posted by the Documentation Publishing GitHub Action.

@Damian-Nordic Damian-Nordic force-pushed the nrf_rpc_stop branch 2 times, most recently from e137997 to 7863e10 Compare September 9, 2024 08:25
@Damian-Nordic Damian-Nordic removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Sep 9, 2024
@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Sep 9, 2024
@Damian-Nordic Damian-Nordic force-pushed the nrf_rpc_stop branch 2 times, most recently from d018434 to 3f37a2b Compare September 10, 2024 17:22
@NordicBuilder NordicBuilder removed the DNM label Sep 10, 2024
1. The zcbor's stop_on_error flag, which defaults to false,
makes the decoder stop decoding any subsequent items after
a decoding error occurs, meaning that all subsequent
decoding attempts fail early until the error is cleared
with zcbor_pop_error() function.

This flag is already set for the encoder yet it was
omitted for the decoder although some nRF RPC decoder
functions seem to rely the flag being set as they only
check the decoding result after trying to decode all
the command or response arguments.

2. Fix a function for checking if the next data item is
null. The function would fail the decoding if the next
item was another CBOR simple type, such as a bool constant.

Signed-off-by: Damian Krolik <[email protected]>
@Damian-Nordic Damian-Nordic removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Sep 11, 2024
@rlubos rlubos merged commit 9c00610 into nrfconnect:main Sep 11, 2024
14 checks passed
@Damian-Nordic Damian-Nordic deleted the nrf_rpc_stop branch September 11, 2024 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants