Cherry-pick for v1.5-branch: Align TC-SC-4.1 and TC-SC-4.3 with updated TXT record T key verification; fix discriminator subtype lookup#43390
Conversation
…ion; fix discriminator subtype lookup (project-chip#42933) * Adds a TCP enabled version of the ci-pics-values file, added file: `ci-pics-values-tcp` * Fixes missing TXT record T key advertising for commissionable nodes when TCP is enabled * * Updates discriminator subtype presence verification to require an exact match, avoiding false positives when multiple discriminators or DUTs are present on the network * Updates TCP bit (0x04) verification to only assert when TCP is enabled * Updates CI test scenarios to enable TCP in the PICS (TCP is enabled in the app by default) * adds clarifying comment * removes dedundant T key verification * removes ci-pics-values-tcp, adds MCORE.SC.TCP=1 to ci-pics-values * removes ci-pics-values-tcp reference * adds MCORE.SC.TCP to PICS.yaml * removes unnecessary variable * updates T key verification logic * removes redundant T key bit 0 check * * absorb extra t key verifications into assert_valid_t_key * adds is_dut_tcp_supported to mdns network utils * updates assert_valid_t_key unit tests * log=false on txt record fetch * re-number steps * Restyled by ruff * updates TC-SC-4.3 as per T key verification fix * restores Dnssd. cpp/h * updates mdns class readme * Restyled by prettier-markdown * adds/refactors tcp support checks * re-order steps * adds dut tcp check for t key verifications * Restyled by autopep8 --------- Co-authored-by: Restyled.io <[email protected]> (cherry picked from commit 2bb1baf)
There was a problem hiding this comment.
Code Review
This pull request is a cherry-pick that aligns TC-SC-4.1 and TC-SC-4.3 with updated TXT record T key verification and fixes discriminator subtype lookup. The changes are extensive, touching test cases, utility functions, and configuration files. The introduction of is_dut_tcp_supported and the refactoring of assert_valid_t_key with comprehensive unit tests are significant improvements. All original review comments have been retained as they provide valuable feedback for improving code clarity, maintainability, and correctness, and do not contradict any of the provided rules.
07b9ca4 to
f56914a
Compare
🧪 CI InsightsHere's what we observed from your CI run for a26c2a2. 🟢 All jobs passed!But CI Insights is watching 👀 |
(cherry picked from commit 2bb1baf)
Summary
Changes
PICS
MCORE.SC.TCP=1in theci-pics-valuesfile to enable TCP in the PICS so it matches TCP enabled in the sample apps (enabled by default)MdnsDiscovery Class
assert_valid_t_keyassert_valid_t_keyunit testsis_dut_tcp_supportedfunction to network utilsTC-SC-4.1 and TC-SC-4.3
TC-SC-4.1
Corresponding Test Plan Update PR
Updates TC-SC-4.1 and TC-SC-4.3 test plans with updated TXT record T key verification #5856
Testing
Run test TC-SC-4.1
Run test TC-SC-4.3
Related Issue
TC-SC-4.1 fails due to TCP handling and multiple device advertisements #42941