Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Open
raul-marquez-csa wants to merge 4 commits intoproject-chip:v1.5-branchfrom
raul-marquez-csa:cp-42933-to-v1.5
Open

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
raul-marquez-csa wants to merge 4 commits intoproject-chip:v1.5-branchfrom
raul-marquez-csa:cp-42933-to-v1.5

Conversation

@raul-marquez-csa
Copy link
Contributor

(cherry picked from commit 2bb1baf)

Summary

  • Updates verification of the TXT record T key value, its absence, and its relationship with TCP support.
  • Updates discriminator subtype lookup to require an exact match when multiple subtypes are present.

Changes

  • PICS

    • Fixes missing MCORE.SC.TCP=1 in the ci-pics-values file to enable TCP in the PICS so it matches TCP enabled in the sample apps (enabled by default)
  • MdnsDiscovery Class

    • Updates TXT record T key verification criteria in assert_valid_t_key
    • Updates assert_valid_t_key unit tests
    • Adds is_dut_tcp_supported function to network utils
    • Updates README.md documentation
  • TC-SC-4.1 and TC-SC-4.3

    • Updates CI arguments test scenarios to use TCP enabled PICS
    • Updates TXT record T key verification step
    • Adds DUT TCP support check
  • TC-SC-4.1

    • Updates discriminator subtype presence verification to require an exact match, avoiding false positives when multiple discriminators or DUTs are present on the network

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

./scripts/tests/run_python_test.py --factory-reset --app out/linux-x64-all-clusters/chip-all-clusters-app --script-args "--storage-path admin_storage.json --commissioning-method on-network --qr-code 'MT:-24J042C00KA0648G00' --PICS src/app/tests/suites/certification/ci-pics-values" --script src/python_testing/TC_SC_4_1.py

Run test TC-SC-4.3

./scripts/tests/run_python_test.py --factory-reset --app out/linux-x64-all-clusters/chip-all-clusters-app --script-args "--storage-path admin_storage.json --commissioning-method on-network --qr-code 'MT:-24J042C00KA0648G00' --PICS src/app/tests/suites/certification/ci-pics-values" --script src/python_testing/TC_SC_4_3.py

Related Issue

TC-SC-4.1 fails due to TCP handling and multiple device advertisements #42941

…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)
@raul-marquez-csa raul-marquez-csa changed the title Cherry-pick: Align TC-SC-4.1 and TC-SC-4.3 with updated TXT record T key verification; fix discriminator subtype lookup #42933 Cherry-pick: Align TC-SC-4.1 and TC-SC-4.3 with updated TXT record T key verification; fix discriminator subtype lookup Mar 2, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@raul-marquez-csa raul-marquez-csa requested review from a team as code owners March 2, 2026 17:54
@mergify
Copy link

mergify bot commented Mar 2, 2026

🧪 CI Insights

Here's what we observed from your CI run for a26c2a2.

🟢 All jobs passed!

But CI Insights is watching 👀

@raul-marquez-csa raul-marquez-csa changed the title Cherry-pick: Align TC-SC-4.1 and TC-SC-4.3 with updated TXT record T key verification; fix discriminator subtype lookup 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 Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants