- Add pytest_unit_test_app.py with per-group test functions (each gets
a fresh QEMU boot to handle the single esp_matter::start() constraint)
- Add build_unit_test_app_qemu and pytest_unit_test_app_qemu CI jobs
- Disable WiFi and use QEMU virtual Ethernet in sdkconfig.defaults
- Register host_test and qemu pytest markers
- Document local QEMU test setup in README
esp_matter/data_model_provider: Add support to call ClusterPreAttributeChangeCallback from esp-matter data model provider.
See merge request app-frameworks/esp-matter!1420
cluster::destroy() freed the cluster memory and its children (attributes,
commands, events) but never removed the cluster from the parent endpoint's
linked list, leaving a dangling pointer. This caused use-after-free crashes
when creating a new cluster on the same endpoint after destroying one.
Fix: look up the parent endpoint via the endpoint_id stored in the cluster
struct and unlink before freeing, consistent with how attribute::destroy,
command::destroy and event::destroy handle their parent lists.
- The static memory analysis for c2 and h2 failed due to target job not found.
- The actual jobs were present but job failed due to pagination logic.
- Added the pagination logic to find the target jobs for static memory analysis.
- Removed the manual numberings that we added to the sections headings
and using the "sectnum" directive which auto assign the numbers to the
sections. This makes writing the docs easy.
- Added support for auto-sorting the delegate list with help of githook
keep-sorted
and refactoring
attribute::update and attribute::report were eating up the error code
returned by set_val and returning ESP_OK. This hide all the errors
reported by set_val.
attribute::update and attribute::report are identical with a simple
delta of whether to call the attribute callback or not. So, refactored
it into as helper function.
The three Thread-related clusters (Thread Network Diagnostics, Thread
Border Router Management, Thread Network Directory) default to enabled
regardless of whether OpenThread is present. On WiFi-only devices this
causes the clusters to be registered on the root node endpoint, but
read requests fail with CHIP_ERROR_NOT_IMPLEMENTED because
CHIP_DEVICE_CONFIG_ENABLE_THREAD is disabled, producing noisy DMG
errors like:
E chip[DMG]: Fail to retrieve data ... clusterId: 0x0000_0035 err = 2d
Add `depends on OPENTHREAD_ENABLED` so these clusters are only
available when the Thread stack is actually present.
When using the esp_matter data model (CONFIG_ESP_MATTER_ENABLE_DATA_MODEL=y),
attribute::get(endpoint_id, cluster_id, attribute_id) is called during endpoint
registration via emberAfExternalAttributeReadCallback. If the cluster doesn't
exist on the endpoint, the lookup returns NULL, which is then passed to the
two-argument get(cluster_t*, attribute_id) overload that logs at error level.
Add a NULL guard in the three-argument overload to return nullptr early,
consistent with how command::get(endpoint_id, cluster_id, command_id) already
handles this case.
Fixes#1692