-
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
Allowing chip-repl test to send invalid enum values #24352
Allowing chip-repl test to send invalid enum values #24352
Conversation
PR #24352: Size comparison from 0807f5e to e959c0a Increases (5 builds for bl602, cc13x2_26x2, esp32, telink)
Decreases (13 builds for bl602, bl702, cc13x2_26x2, esp32, k32w, nrfconnect, psoc6, telink)
Full report (54 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
PR #24352: Size comparison from 2f0c9ab to 0124265 Increases (10 builds for bl702, psoc6, qpg, telink)
Decreases (10 builds for bl602, bl702, esp32, psoc6, telink)
Full report (54 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
PR #24352: Size comparison from a912fdc to 0cd4073 Increases (15 builds for bl702, cc13x2_26x2, efr32, esp32, nrfconnect, psoc6, qpg, telink)
Decreases (5 builds for cc13x2_26x2, nrfconnect, telink)
Full report (54 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
Possible to move the enum.py into the clusters folders/package ? That way it will be included in the clusters wheel, as the custom enum class is meant to be used by the cluster definitions. |
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.
LGTM, thanks!
PR #24352: Size comparison from 8ad1073 to 09c23e8 Increases (10 builds for bl702, cc13x2_26x2, esp32, nrfconnect, psoc6, telink)
Decreases (5 builds for cc13x2_26x2, cyw30739, telink)
Full report (43 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
* Proof of concept for allowing chip-repl test to send invalid enum values * Prototype after latest round of discussions * Quick cleanup * Moving to properly done version * Couple extra fixes * Remove unneeded global * Add lock for placeholder count * Restyle * add missing regen to cluster-enums.h after merging master * Quick fix * Quick Fix * Restyle
The new enum type is required in the Cluster objects. Make it and its dependency part of the Cluster CHIP wheel. Fixes PR project-chip#24352.
The new enum type is required in the Cluster objects. Make it and its dependency part of the Cluster CHIP wheel. Fixes PR project-chip#24352.
* [python] make enum part of cluster wheel The new enum type is required in the Cluster objects. Make it and its dependency part of the Cluster CHIP wheel. Fixes PR #24352. * Restyle
Fixes: #24369
This give python the same behaviour that exists in cpp today. When an out of scope enum value is received we map it to kUknownEnumValue. We also provide a way to disable this in someone would like to intentionally disable this behaviour and intentionally get a ValueError.
We also add the ability for chip-repl to extend the enum at runtime. This allows tests to intentionally send out an invalid enum value to see how matter device on the other side behaves when given an out of scope enum value.