-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[ReadHandler] Removal of test flags #28421
[ReadHandler] Removal of test flags #28421
Conversation
PR #28421: Size comparison from f71a48f to d4201f6 Increases (5 builds for cc32xx, psoc6)
Decreases (57 builds for bl602, bl702, bl702l, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, psoc6, qpg, telink)
Full report (57 builds for bl602, bl702, bl702l, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, psoc6, qpg, telink)
|
…it for min/max instead of setting flags. Modified subscription times in the test to minimise the impact of waiting.
…ld wait for max to expire to ensure the run gets scheduled reliably
d4201f6
to
1f56ddb
Compare
PR #28421: Size comparison from e9f25fd to 1f56ddb Increases (5 builds for cc32xx, psoc6)
Decreases (59 builds for bl602, bl702, bl702l, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
Full report (60 builds for bl602, bl702, bl702l, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
… will run after maxInterval is expired
PR #28421: Size comparison from e9f25fd to 146cc01 Increases (11 builds for bl702, bl702l, cc32xx, linux, psoc6)
Decreases (57 builds for bl602, bl702, bl702l, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
Full report (60 builds for bl602, bl702, bl702l, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test should be using fake time, or otherwise finding a way not to CPU spin-loop.
Discussed offline that a refactor will come later
PR #28421: Size comparison from e9f25fd to 5c605c3 Increases (12 builds for bl702, bl702l, cc32xx, linux, psoc6, telink)
Decreases (57 builds for bl602, bl702, bl702l, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
Full report (60 builds for bl602, bl702, bl702l, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
{ | ||
break; | ||
} | ||
ctx.GetIOContext().DriveIO(); // at least one IO loop is guaranteed | ||
mockClock.AdvanceMonotonic(System::Clock::Milliseconds32(10)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the mock clock, why is spinning still needed? What's the difference between advancing by 10ms, and advancing once in one go? What exactly of the implementation is causing you to have to do that? Is the IO you expected not occurring?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's necessary here is the multiple DriveIO, I just realized it is indeed not essential to do the first loop. The second one however is only there in a sort of way to ensure enough async events are process and that they are processed in the right time.
In the "test subscribe urgent wildcard event", 3 driveIOs are needed: Timer expired, Engine Run, EventManagement (report gets received by the readclient).
For the other tests, it's also a mater of ensuring the multiple event for chunked report are handled before the timer expires so that the timer gets properly reschudeled at the right time.
I put the multiple Drive IOs on the first occurence and kept the loop on the second with some explanation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The usual approach is to have a DriveIOUntilIdle()
. Is there a way to implement this with existing DriveIO ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a comment about this from the previous designer about using DriveIOUntil, whic explained why he had to rely on loops in the first place as DriveIOUntil would be suceptible to scheduling issues.
In the meantime, it relies on the SystemClock to timeout, which won't work due to usage of a mock clock.
I can confirm I had the same problems when I tried to use it.
We also have DrainAndServiceIO but there again the function description states:
- ... This should run to completion
- in well-behaved logic (i.e there isn't an indefinite ping-pong of messages transmitted back
- and forth).
And there again I can confirm that in our case it doesn't work as we do have back and forth.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lpbeliveau-silabs back-and-forth should be OK for DrainAndServiceIO as long as it completes..... What actually fails if you use DrainAndServiceIO?
PR #28421: Size comparison from e9f25fd to e7fe784 Increases (12 builds for bl702, bl702l, cc32xx, linux, psoc6)
Decreases (56 builds for bl602, bl702, bl702l, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
Full report (60 builds for bl602, bl702, bl702l, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! This is much nicer.
Added the ability to transmit and display device name in the Matter SDK Re-run zap_convert_all.py (project-chip#28459) Add an API to get the list of running controllers from a controller factory. (project-chip#28461) Add utilities for converting CATValues to/from NSSet. (project-chip#28453) * Add utilities for converting CATValues to/from NSSet. * Address review comments. * Address more review comments. [esp32 m5-stack light] move freertos functions to flash instead of iram (project-chip#28455) * Move freertos functions out if iram. This is because linkage fails with out of IRAM. Following https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/performance/ram-usage.html#optimizing-iram-usage * Add newline at the end of the file --------- Co-authored-by: Andrei Litvin <[email protected]> virtual-device-app: Add LoadingFragment for commissioning establish started event (project-chip#28428) Signed-off-by: Jaehoon You <[email protected]> Add openiot clean steps (project-chip#28473) Co-authored-by: Andrei Litvin <[email protected]> [cloudbuild] switch to v2 of our build images. (project-chip#28476) Co-authored-by: Andrei Litvin <[email protected]> Update ZAP to pick up UI for multiple device types on an endpoint. (project-chip#28423) tv-casting-app: Implementing PASE related callbacks (project-chip#28342) * Linux tv-casting-app: Implementing AppDelegate * Android tv-casting-app: Implementing AppDelegate * iOS tv-casting-app: Implementing AppDelegate [TC-RVC-2.1] Fix PIXIT codes to match the test plan (project-chip#28481) * fix PIXIT codes to match tp * fix PIXIT Stop using controllerID for internal XPC bookkeeping. (project-chip#28480) We want to use controllerID for client-assigned controller IDs. Add functions to set Parent Endpoint and Composition Type for an Endpoint (project-chip#28410) * Added endpointCompositionType to the EmberAfDefinedEndpoint structure to be used to hold whether an endpoint is flat or tree composed - defaults to Flat to assume previous behaviour as default * Added functions to support setting and getting composition type and also to set an endpoints parent endpoint * updated Read handler for parts list to make its else branch for Flat composition and then added a further branch to handle Tree composition * Restyled by clang-format * Fixed mistake in return type of emberAfEndpointCompositionTypeForEndpoint * Removing debug logs * Restyled by clang-format * Moved new API funciotns to chip::app namespace and removed ember naming. Made endpoint struct use a proper bitmask as it was basically using an enum in a weird way * Moved Read for Parts List to use new function naming * Restyled by clang-format * Replaced EmberAfStatus with CHIP_ERROR * Restyled by clang-format --------- Co-authored-by: Restyled.io <[email protected]> Add macro to set alignment of sha256 context (project-chip#28426) Fix uninitialised values in KeySet and AttributePathExpandIterator (project-chip#28356) * Fix uninitialised value in KeySet * Fix uninitilised mGlobalAttributeEndIndex * Restyled by clang-format * Review proposed change initilize mGlobalAttributeEndIndex * Change initialize values in KeySet to initilize only start_time in EpochKey * Restyled by clang-format * Review proposed change initilize IPK keyset start_time --------- Co-authored-by: Restyled.io <[email protected]> Add a controller argument to the storage checker function. (project-chip#28488) Most of the changes are just reindenting. CASE: Send busy status report if we receive a sigma1 and we are in the middle of handshake (project-chip#28153) * CASE: Send busy status report if we receive a sigma1 and we are in the middle of handshake * Apply suggestions from code review Co-authored-by: Boris Zbarsky <[email protected]> * Addressing review comments * few more review comments * Addressed reviews and added the unit tests * Restyled by clang-format * Few more review comments * Apply suggestions from code review Co-authored-by: Tennessee Carmel-Veilleux <[email protected]> * Moved todo to better place --------- Co-authored-by: Boris Zbarsky <[email protected]> Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Tennessee Carmel-Veilleux <[email protected]> doc: chip_tool_guide: fix the order of arguments in (project-chip#28494) `pairing code` command chip-tool expects the node-id to be passed before payload. Signed-off-by: Marcin Kajor <[email protected]> add event For messages acks, Request ICD active mode when waiting on a ack (project-chip#28380) [ReadHandler] Removal of test flags (project-chip#28421) * Removed reportScheduler test flags and made TestReadInteractin.cpp wait for min/max instead of setting flags. Modified subscription times in the test to minimise the impact of waiting. * Restyled by clang-format * Added a driveAndServiceIO after waiting for max in test where we should wait for max to expire to ensure the run gets scheduled reliably * Moved ctx.GetIOContext().DriveIO(); after each tests to garantee this will run after maxInterval is expired * Implemented a mock clock in TestReadInteraction to reduce wait loops * Removed more loops and added comment on loop left in the code --------- Co-authored-by: Restyled.io <[email protected]> [Silabs] Add SIT ICD configurations to silabs lock example (project-chip#28474) * rename SED for ICD * Delete ICD subscription callback since default behavior is merged * Enable ICD default configuration for DL Update configs to support ICDs * Add ICDM attributes for SIT ICD config * generated files * update wordlist * update readme * update default config comments * add define block for ICD configs * fix esp * try to fix esp again * try to fix esp again Add an example room air conditioner configuration to chef devices (project-chip#28485) * Add an example room air conditioner configuration to chef devices * Remove unuseful cluster in ep 0 * fix ci bug * Revert "fix ci bug" This reverts commit e31432e. [docker] Use gcc 10 in chip build (project-chip#28478) * Switch to gcc10 instead of gcc9 for chip build base * Bump up version file * Add -Dtests=false --------- Co-authored-by: Andrei Litvin <[email protected]> Reduce type character size of SceneTableImpl types (project-chip#28448) virtual-device-app: Add control module for virtual device's detail view (project-chip#28486) Signed-off-by: Jaehoon You <[email protected]> Signed-off-by: Charles Kim <[email protected]> Add `__test__ = False` to hooks (project-chip#28477) Improve Silabs Matter shell functionality/stability (project-chip#28475) * Re-worked matter shell to allow for copy/paste, fix varying platform functionality, and increase stability * Update src/lib/shell/MainLoopSilabs.cpp Co-authored-by: mkardous-silabs <[email protected]> * Added further clarification in comments --------- Co-authored-by: mkardous-silabs <[email protected]> fix define (project-chip#28502) Update python logic for executing work in chip main loop (project-chip#28449) * Add python main loop work method * Fix typo and restyle * Fix typo * Code review updates * Comment update * Restyle --------- Co-authored-by: Andrei Litvin <[email protected]> Fix crash when an error happens during a BLE scan on darwin. (project-chip#28505) If we happened to do a BLE scan after doing a BLE connect, and then during the BLE scan one of two things happens: 1. Bluetooth is shut down (e.g. by just turning it off via the menubar). 2. The scan is a delegate-less scan and times out. then we would try to use the error handler that expects a SetUpCodePairer but without an actual non-null SetUpCodePairer to pass it. And then that would crash. The fix is to not call an error handler that we're not supposed to be calling; scans do not call the _connection_ error handler. Fix RESOURCE_EXHAUSTED in KeySetWrite (project-chip#28456) * Fix RESOURCE_EXHAUSTED in KeySetWrite * Restyled by prettier-yaml --------- Co-authored-by: [email protected] <[email protected]> Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Andrei Litvin <[email protected]> Power source: Implementation of dynamic endpoint list setter (project-chip#28110) * Implementation of dynamic endpoint list setter Test: tested by adding a call to set endpoint list in all clusters with chip-tool. Also see TestPowerSourceCluster.cpp * Restyled by whitespace * Restyled by gn * Remove the define Some platforms run these tests, but don't have that define defined. Instead, just change the function name to test only. * Address review comments * free is being called, man, where's the leak? * Restyled by clang-format * Address some review comments. * Fix leak. * Deal with zero-length arrays. * shutdown -> clear * Use EncodeList for list * test fix. * types need to match --------- Co-authored-by: Restyled.io <[email protected]> * Refine the laundry-washer-control server implementation and add laundry-washer-controls-delegate-impl (project-chip#28264) * * Refine the laundry-washer-control server implementation * Add laundry-washer-controls-delegate-impl Signed-off-by: Chin-Ran Lo <[email protected]> * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Update src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-delegate.h Co-authored-by: Boris Zbarsky <[email protected]> * Update examples/all-clusters-app/all-clusters-common/include/laundry-washer-controls-delegate-impl.h Co-authored-by: Boris Zbarsky <[email protected]> * * Remove the unused code and refine the comment Signed-off-by: Chin-Ran Lo <[email protected]> * Update examples/all-clusters-app/all-clusters-common/include/laundry-washer-controls-delegate-impl.h Co-authored-by: Arkadiusz Bokowy <[email protected]> * Restyled by clang-format --------- Signed-off-by: Chin-Ran Lo <[email protected]> Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Boris Zbarsky <[email protected]> Co-authored-by: Arkadiusz Bokowy <[email protected]> Fix selector for status update on CHIPToolDeviceControllerDelegate. (project-chip#28506) This did not get correctly updated in project-chip#23665, so it was not getting the status update callbacks. [app] Add option to disable read client (project-chip#28149) * app : Add option to disable Read Client * Restyled by gn * Format changes * Restyled by clang-format --------- Co-authored-by: Restyled.io <[email protected]> enable android platform configuration (project-chip#28451) Skip building python modules as part of Matter.framework build. (project-chip#28514) We don't need them there, but also they unconditionally pull in perfetto bits, which is also undesirable. [mode-base-cluster]fix: build error while not enable On/Off cluster server (project-chip#28388) * fix build error while not enable onOff cluster server * fix include file bug [Ameba] Update docker image (project-chip#28441) * Update Dockerfile * Update version [K32W0] Use west tool to get SDK (project-chip#28431) Signed-off-by: Marius Tache <[email protected]> [Ameba] Upgrade cpp17 (project-chip#28438) * fix cmake workaround for ameba - upgrade pigweed app to c++17 * Update Dockerfile * Update version * Move to chip-build-ameba version 4 instead of 1, to suppor c++17 --------- Co-authored-by: Andrei Litvin <[email protected]> Co-authored-by: Andrei Litvin <[email protected]> Remove ICDM cluster for lighting app (project-chip#28522) [Silabs] Rename SED build target to ICD for python scripts (project-chip#28504) * rename sed to icd in build targets * update txt tagets * rename targets [chef] disable Groups and Switch from example devices (project-chip#28501) * A set of manual edits * zap regen * Script-disable groups and switch from EP0 * Zap regen
Removed reportScheduler test flags and made TestReadInteractin.cpp wait for min/max instead of setting flags. Modified subscription times in the test to minimise the impact of waiting.
Fixes : #28129