Skip to content

[nrf fromtree] tests: net: socket: tls: Improve tests interoperability#4028

Merged
rlubos merged 2 commits into
nrfconnect:mainfrom
rlubos:ncs/tests/optimize-tls-socket-tests-configuration
May 5, 2026
Merged

[nrf fromtree] tests: net: socket: tls: Improve tests interoperability#4028
rlubos merged 2 commits into
nrfconnect:mainfrom
rlubos:ncs/tests/optimize-tls-socket-tests-configuration

Conversation

@rlubos
Copy link
Copy Markdown
Contributor

@rlubos rlubos commented Apr 28, 2026

Update TLS tests configuration and runtime socket configuration to improve tests reliability regardless of platform used:

  • Disable unneeded ciphersuite to reduce the number of mbed TLS features enabled an thus overall image size
  • Make sure tests always use the same ciphersuite, regardless of extra mbed TLS features enabled (that was the case with TFM which enabled some extra mbed TLS features by default)

Ref: NCSDK-39085

rlubos pushed a commit to NordicBuilder/sdk-nrf that referenced this pull request Apr 28, 2026
Automatically created by action-manifest-pr GH action from PR:
nrfconnect/sdk-zephyr#4028

Signed-off-by: Nordic Builder <pylon@nordicsemi.no>
rlubos pushed a commit to NordicBuilder/sdk-nrf that referenced this pull request Apr 28, 2026
Automatically created by action-manifest-pr GH action from PR:
nrfconnect/sdk-zephyr#4028

Signed-off-by: Nordic Builder <pylon@nordicsemi.no>
rlubos pushed a commit to NordicBuilder/sdk-nrf that referenced this pull request Apr 28, 2026
Automatically created by action-manifest-pr GH action from PR:
nrfconnect/sdk-zephyr#4028

Signed-off-by: Nordic Builder <pylon@nordicsemi.no>
rlubos pushed a commit to NordicBuilder/sdk-nrf that referenced this pull request Apr 28, 2026
Automatically created by action-manifest-pr GH action from PR:
nrfconnect/sdk-zephyr#4028

Signed-off-by: Nordic Builder <pylon@nordicsemi.no>
@rlubos rlubos force-pushed the ncs/tests/optimize-tls-socket-tests-configuration branch from a0adb3e to fc66327 Compare May 4, 2026 07:10
@rlubos rlubos changed the title [nrf fromlist] tests: net: socket: tls: Improve tests interoperability [nrf fromtree] tests: net: socket: tls: Improve tests interoperability May 4, 2026
NordicBuilder added a commit to NordicBuilder/sdk-nrf that referenced this pull request May 4, 2026
Automatically created by action-manifest-pr GH action from PR:
nrfconnect/sdk-zephyr#4028

Signed-off-by: Nordic Builder <pylon@nordicsemi.no>
@rlubos rlubos added this to the ncs-3.4.0 milestone May 4, 2026
rlubos added 2 commits May 5, 2026 09:36
All handshakes within the test suite are PSK-based, therefore it's only
needed to enable MBEDTLS_CIPHERSUITE_TLS_PSK_WITH_AES_256_CBC_SHA384,
MBEDTLS_CIPHERSUITE_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 is not needed
or used in tests so it only increases the overall image size.

For the few tests verifying the certificate validation, it's enough to
enable X509 certificate parsing and a few dependencies.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit 9f299be)
Specify what cipher suite to use for TLS/DTLS at runtime for consistent
results. Otherwise, in case additional mbed TLS features are enabled
(for instance with TFM enabled), different cipher suite may be chosen
for TLS/DTLS by mbed TLS, affecting the tests outcome.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit 9a2b669)
@rlubos rlubos force-pushed the ncs/tests/optimize-tls-socket-tests-configuration branch from fc66327 to 04b2fd7 Compare May 5, 2026 07:36
NordicBuilder added a commit to NordicBuilder/sdk-nrf that referenced this pull request May 5, 2026
Automatically created by action-manifest-pr GH action from PR:
nrfconnect/sdk-zephyr#4028

Signed-off-by: Nordic Builder <pylon@nordicsemi.no>
Copy link
Copy Markdown

@shanthanordic shanthanordic left a comment

Choose a reason for hiding this comment

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

approved for scope

@rlubos rlubos merged commit 05f2699 into nrfconnect:main May 5, 2026
11 checks passed
NordicBuilder added a commit to NordicBuilder/sdk-nrf that referenced this pull request May 5, 2026
Automatically created by action-manifest-pr GH action from PR:
nrfconnect/sdk-zephyr#4028

Signed-off-by: Nordic Builder <pylon@nordicsemi.no>
@rlubos rlubos deleted the ncs/tests/optimize-tls-socket-tests-configuration branch May 5, 2026 12:03
rlubos pushed a commit to nrfconnect/sdk-nrf that referenced this pull request May 5, 2026
Automatically created by action-manifest-pr GH action from PR:
nrfconnect/sdk-zephyr#4028

Signed-off-by: Nordic Builder <pylon@nordicsemi.no>
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.

3 participants