-
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
Commissioning: Implement time sync requirements #27812
Conversation
Tests added in TestCommissioningTimeSync.py Test: Ran TestCommissioningTimeSync.py against all-clusters (has a time cluster) and lock (no time cluster) commissioned all-clusters and lock with chip-tool
PR #27812: Size comparison from e532537 to 136b96b Increases above 0.2%:
Increases (4 builds for k32w, linux, psoc6)
Decreases (4 builds for bl602, bl702, cc32xx, psoc6)
Full report (29 builds for bl602, bl702, bl702l, cc32xx, cyw30739, efr32, k32w, linux, mbed, nrfconnect, psoc6, qpg)
|
PR #27812: Size comparison from e532537 to 5610d98 Decreases (1 build for cc32xx)
Full report (1 build for cc32xx)
|
PR #27812: Size comparison from e532537 to 2889a95 Increases above 0.2%:
Increases (2 builds for k32w, linux)
Decreases (4 builds for bl602, cc32xx, nrfconnect, qpg)
Full report (17 builds for bl602, bl702, bl702l, cc32xx, k32w, linux, mbed, nrfconnect, qpg)
|
PR #27812: Size comparison from e532537 to a6a5b42 Increases above 0.2%:
Increases (56 builds for bl702, bl702l, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
Decreases (11 builds for bl602, bl702, bl702l, efr32, linux, psoc6)
Full report (58 builds for bl602, bl702, bl702l, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
PR #27812: Size comparison from badc0c8 to 50da6b8 Increases above 0.2%:
Increases (11 builds for bl602, bl702l, linux, telink)
Decreases (11 builds for bl602, bl702, esp32, psoc6, telink)
Full report (58 builds for bl602, bl702, bl702l, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
SendCommissioningReadRequest(proxy, timeout, readPaths, 9); | ||
} | ||
break; | ||
case CommissioningStage::kCheckForMatchingFabric: { | ||
// Read the current fabrics | ||
if (params.GetCheckForMatchingFabric()) |
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.
Is this test backwards?
return; | ||
} | ||
TimeSynchronization::Commands::SetTrustedTimeSource::Type request; | ||
request.trustedTimeSource.SetNull(); |
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.
Shouldn't this use params.GetTrustedTimeSource()
somehow? I am surprised the tests did not catch this....
@@ -453,6 +518,11 @@ class CommissioningParameters | |||
Optional<uint16_t> mFailsafeTimerSeconds; | |||
Optional<uint16_t> mCASEFailsafeTimerSeconds; | |||
Optional<app::Clusters::GeneralCommissioning::RegulatoryLocationTypeEnum> mDeviceRegulatoryLocation; | |||
Optional<app::DataModel::List<app::Clusters::TimeSynchronization::Structs::TimeZoneStruct::Type>> mTimeZone; |
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.
Don't these need to get added to ClearExternalBufferDependentValues?
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.
AutoCommissioner::SetCommissioningParameters needs to copy the new buffer things, no? Otherwise consumers who pass in a CommissioningParameters that we are then just grabbing raw pointers from have no way to control lifetime and we get use-after-free.
* Commissioning: Implement time sync requirements Tests added in TestCommissioningTimeSync.py Test: Ran TestCommissioningTimeSync.py against all-clusters (has a time cluster) and lock (no time cluster) commissioned all-clusters and lock with chip-tool * Add missing include * Note to self: commit ALL changes before uploading * Restyled by isort * Fix CGEN test for commissioning. * Read time sync in initial read, fabrics later Also fix tests * Remove extra log * Add new pairing delegate call, fix tv-app --------- Co-authored-by: Restyled.io <commits@restyled.io>
Tests added in TestCommissioningTimeSync.py
Test: Ran TestCommissioningTimeSync.py against all-clusters
(has a time cluster) and lock (no time cluster)
commissioned all-clusters and lock with chip-tool
NOTE: uses the ordering in spec issue https://github.com/CHIP-Specifications/connectedhomeip-spec/issues/7291
Fixes: #27342