zephyr/tests/net/lib
Rene Beckmann cc33491265 net: mqtt-sn: Wait for register & subscribe to complete
From the MQTT-SN spec:

6.5 Topic Name Registration Procedure

...
At any point in time a client may have only one
REGISTER message outstanding, i.e. it has to wait
for a REGACK message before it can register another
topic name.
...

6.9 Client’s Topic Subscribe/Un-subscribe Procedure

...
As for the REGISTER procedure, a client may have only
one SUBSCRIBE or one UNSUBCRIBE transaction open at a time.
...

Until now, the library did not comply with these requirements.
An additional "waiting" state for topics was introduced:
REGISTER, SUBSCRIBE and UNSUBSCRIBE as an extra step before
switching to REGISTERING, SUBSCRIBING and UNSUBSCRIBING. The
library now makes sure that only one topic can be REGISTERING
and only one topic can be in either SUBSCRIBING or UNSUBSCRIBING.
Additionally, requesting to UNSUBSCRIBE is now denied if the topic
is not yet SUBSCRIBED, to avoid weird race conditions.

Also, added two tests that verify this behavior.

This fixes #84644

Signed-off-by: Rene Beckmann <rene.bckmnn@gmail.com>
2025-02-11 11:44:52 +00:00
..
coap tests: net: coap: Add test case for matching pending replies 2025-01-21 19:30:06 +01:00
coap_client samples, tests: remove usage of space-separated lists 2024-12-04 14:14:53 -05:00
coap_server/common
dns_addremove
dns_cache net: dns: Fix DNS caching bug 2025-02-05 23:49:17 +01:00
dns_dispatcher tests: net: dns_dispatcher: Add tests for dispatcher 2024-12-11 21:29:21 +01:00
dns_packet tests: net: dns: Add test for invalid DNS answer parsing 2024-11-28 20:52:20 +01:00
dns_resolve
dns_sd
http_header_fields net: lib http: Added tests for Content-Range to http parser. 2025-01-16 22:55:51 +01:00
http_server tests: net: http_server: core: Fix scheduling race 2025-02-04 11:55:17 +01:00
lwm2m net: lwm2m: Convert tickeless to use eventfd() 2024-12-24 13:54:39 +01:00
mdns_responder
mqtt/v3_1_1
mqtt_sn_client net: mqtt-sn: Wait for register & subscribe to complete 2025-02-11 11:44:52 +00:00
mqtt_sn_packet
prometheus tests: use net prefix for prometheus tests 2024-12-13 09:12:08 +01:00
tls_credentials yaml: use EXTRA_CONF_FILE in .yaml files 2024-10-17 09:45:25 +02:00
wifi_credentials tests: net: wifi_credentials: restrict to native_sim 2024-10-24 22:02:28 +01:00
wifi_credentials_backend_psa tests: net: wifi_credentials: restrict to native_sim 2024-10-24 22:02:28 +01:00
wifi_credentials_backend_settings tests: net: wifi_credentials: restrict to native_sim 2024-10-24 22:02:28 +01:00