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

treewide: add check for NRF_MODEM_LIB_ON_INIT return #20471

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

MirkoCovizzi
Copy link
Contributor

Adds missing checks for the return value passed by NRF_MODEM_LIB_ON_INIT.

@MirkoCovizzi MirkoCovizzi self-assigned this Feb 18, 2025
@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 Feb 18, 2025
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Feb 18, 2025

CI Information

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

Inputs:

Sources:

sdk-nrf: PR head: 7745d746fe26c8373d7b380ce613d70995a6c7e4

more details

sdk-nrf:

PR head: 7745d746fe26c8373d7b380ce613d70995a6c7e4
merge base: f71d7c1dfcd3ff90aa3f38cdeebdd62af08fd44d
target head (main): 4ba9b34a6f327498e36d332240172eb5f4f2e8ab
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 (14)
applications
│  ├── asset_tracker_v2
│  │  ├── src
│  │  │  ├── modules
│  │  │  │  │ modem_module.c
lib
│  ├── modem_antenna
│  │  │ modem_antenna.c
│  ├── modem_battery
│  │  │ modem_battery.c
│  ├── nrf_modem_lib
│  │  │ cfun_hooks.c
│  ├── pdn
│  │  │ pdn.c
modules
│  ├── memfault-firmware-sdk
│  │  ├── memfault_integration.c
│  │  │ memfault_lte_coredump.c
samples
│  ├── cellular
│  │  ├── lwm2m_carrier
│  │  │  ├── src
│  │  │  │  │ main.c
│  │  ├── modem_shell
│  │  │  ├── src
│  │  │  │  ├── cloud
│  │  │  │  │  │ cloud_lwm2m.c
│  ├── dect
│  │  ├── dect_phy
│  │  │  ├── dect_shell
│  │  │  │  ├── src
│  │  │  │  │  ├── dect
│  │  │  │  │  │  │ dect_phy_ctrl.c
│  ├── net
│  │  ├── mqtt
│  │  │  ├── src
│  │  │  │  ├── modules
│  │  │  │  │  ├── transport
│  │  │  │  │  │  ├── credentials_provision
│  │  │  │  │  │  │  │ credentials_provision.c
subsys
│  ├── net
│  │  ├── lib
│  │  │  ├── lwm2m_client_utils
│  │  │  │  ├── lwm2m
│  │  │  │  │  │ lwm2m_rai.c
│  │  │  ├── nrf_provisioning
│  │  │  │  ├── src
│  │  │  │  │  │ nrf_provisioning.c
│  │  │  ├── tls_credentials
│  │  │  │  │ tls_credentials_nrf_modem.c

Outputs:

Toolchain

Version: 0f22b642ed
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:0f22b642ed_bece0367df

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

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister
    • sdk-nrf test count: 448
  • ✅ Integration tests
    • ✅ test-fw-nrfconnect-nrf-iot_cloud
    • ✅ test-fw-nrfconnect-nrf-iot_serial_lte_modem
    • ✅ test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • ✅ test-fw-nrfconnect-nrf-iot_samples
    • ✅ test-fw-nrfconnect-nrf-iot_lwm2m
    • ✅ test-fw-nrfconnect-nrf-iot_thingy91
    • ✅ test-fw-nrfconnect-nrf-iot_mosh
Disabled integration tests
    • desktop52_verification
    • doc-internal
    • test_ble_nrf_config
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_mesh
    • test-fw-nrfconnect-ble_samples
    • test-fw-nrfconnect-boot
    • test-fw-nrfconnect-chip
    • test-fw-nrfconnect-fem
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_positioning
    • test-fw-nrfconnect-nrf_crypto
    • test-fw-nrfconnect-proprietary_esb
    • test-fw-nrfconnect-ps
    • test-fw-nrfconnect-rpc
    • test-fw-nrfconnect-rs
    • test-fw-nrfconnect-tfm
    • test-fw-nrfconnect-thread
    • test-fw-nrfconnect-zigbee
    • test-low-level
    • test-sdk-audio
    • test-sdk-dfu
    • test-sdk-find-my
    • test-sdk-mcuboot
    • test-sdk-pmic-samples
    • test-sdk-sidewalk
    • test-sdk-wifi
    • test-secdom-samples-public

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.

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

Copy link
Contributor

@jtguggedal jtguggedal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be convenient with error logging in the application-level callbacks

@MirkoCovizzi
Copy link
Contributor Author

Could be convenient with error logging in the application-level callbacks

Do you mean logging the returned value inside the callback?

@jtguggedal
Copy link
Contributor

Could be convenient with error logging in the application-level callbacks

Do you mean logging the returned value inside the callback?

Yeah, and just to indicate to the user that initialization failed and the app won't work as expected

@tokangas
Copy link
Contributor

Do you mean logging the returned value inside the callback?

Yeah, and just to indicate to the user that initialization failed and the app won't work as expected

And probably only in apps, not in libraries?

@MirkoCovizzi
Copy link
Contributor Author

MirkoCovizzi commented Feb 19, 2025

Do you mean logging the returned value inside the callback?

Yeah, and just to indicate to the user that initialization failed and the app won't work as expected

And probably only in apps, not in libraries?

I would argue it makes sense in libraries too, some of them do it already. Any specific reason for not doing it in libraries in your opinion?

@jtguggedal
Copy link
Contributor

Do you mean logging the returned value inside the callback?

Yeah, and just to indicate to the user that initialization failed and the app won't work as expected

And probably only in apps, not in libraries?

I would argue it makes sense in libraries too, some of them do it already. Any specific reason for not doing it in libraries in your opinion?

Just that it could lead to duplicate logs if the app also reports the error. But that's not really a big problem, so I agree with you that library logging is also good

@MirkoCovizzi
Copy link
Contributor Author

Do you mean logging the returned value inside the callback?

Yeah, and just to indicate to the user that initialization failed and the app won't work as expected

And probably only in apps, not in libraries?

I would argue it makes sense in libraries too, some of them do it already. Any specific reason for not doing it in libraries in your opinion?

Just that it could lead to duplicate logs if the app also reports the error. But that's not really a big problem, so I agree with you that library logging is also good

I thought about that, but some applications (ex. customer) might not necessarily do it. I will add it then, thanks everyone.

@MirkoCovizzi MirkoCovizzi force-pushed the on-init branch 2 times, most recently from acba6f0 to 695616c Compare February 19, 2025 09:31
Adds missing checks for the return value passed by
`NRF_MODEM_LIB_ON_INIT`.

Signed-off-by: Mirko Covizzi <[email protected]>
@MirkoCovizzi MirkoCovizzi removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Feb 19, 2025
@rlubos rlubos merged commit 396c16d into nrfconnect:main Feb 19, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.