Skip to content
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

V1.4 Cherry-pick #37522: TC_CGEN_2_8, TC_CGEN_2_9 #37523

Open
wants to merge 1 commit into
base: v1.4-branch
Choose a base branch
from

Conversation

swan-amazon
Copy link
Contributor

@swan-amazon swan-amazon commented Feb 11, 2025

Fixes #37490
Cherry-picks #37522

Add explicit CloseSession calls in TC_CGEN_2_8 and TC_CGEN_2_9 to ensure proper cleanup of commissioner library resources. This fixes an issue where subsequent commissioner sessions could not be established due to lingering resources from previous test runs.

Bug: Commissioner session establishment failures in subsequent test runs
Fix: Add explicit session cleanup after commissioning operations

Testing:

  • Set PICS_USER_PROMPT=1 for manual intervention testing
  • Verified with terms-and-conditions-app test harness
  • Confirmed proper cleanup by:
    1. Running initial commissioning
    2. Performing factory reset (process kill + KVS cleanup)
    3. Successfully re-establishing commissioner session
  • Test passes with manual intervention at factory reset and commissioning prompts

Testing Details

Environment Setup
  • Set PICS_USER_PROMPT=1 to enable interactive command-line prompts during test execution
  • This configuration prevents automatic step skipping and allows manual intervention
Test Execution Steps
  1. Initial DUT Launch:

    rm /tmp/chip* 
    ./out/linux-x64-terms-and-conditions/chip-terms-and-conditions-app \
        --version 0 \
        --custom-flow 2 \
        --capabilities 6 \
        --discriminator 3840 \
        --passcode 20202021 \
        --KVS /tmp/chip_kvs.bin \
        --trace_file /tmp/chip_trace.log \
        --trace_log 1 \
        --trace_decode 1 \
        --vendor-id 0xfff1 \
        --product-id 0x8012
    
  2. Test Script Execution

    python3 src/python_testing/TC_CGEN_2_8.py \
        --storage-path admin_storage.json \
        --int-arg PIXIT.CGEN.FailsafeExpiryLengthSeconds:900 \
        PIXIT.CGEN.RequiredTCAcknowledgements:1 \
        PIXIT.CGEN.TCRevision:1 \
        --qr-code MT:-24J08M.00KA0648G00 \
        --PICS src/app/tests/suites/certification/ci-pics-values \
        --in-test-commissioning-method on-network
  3. Factory Reset Simulation:

    • Terminated the test app process
    • Removed KVS binary and chip-related temporary files
    • Restarted the test app with identical parameters
    • Acknowledged the factory reset prompt
    • Confirmed DUT entering commissioning mode
Results
  • Test completed successfully with PASS status
  • Manual intervention points were properly handled
  • Device state was successfully reset and recovered

Add explicit CloseSession calls in TC_CGEN_2_8 and TC_CGEN_2_9 to ensure
proper cleanup of commissioner library resources. This fixes an issue where
subsequent commissioner sessions could not be established due to lingering
resources from previous test runs.

Bug: Commissioner session establishment failures in subsequent test runs
Fix: Add explicit session cleanup after commissioning operations

Testing:
- Set PICS_USER_PROMPT=1 for manual intervention testing
- Verified with terms-and-conditions-app test harness
- Confirmed proper cleanup by:
  1. Running initial commissioning
  2. Performing factory reset (process kill + KVS cleanup)
  3. Successfully re-establishing commissioner session
- Test passes with manual intervention at factory reset and commissioning prompts
Copy link

semanticdiff-com bot commented Feb 11, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  src/python_testing/TC_CGEN_2_8.py  0% smaller
  src/python_testing/TC_CGEN_2_9.py  0% smaller

@github-actions github-actions bot added tests matter-1.4-te2-script-change Script changes before end of Matter 1.4 TE2 labels Feb 11, 2025
@swan-amazon swan-amazon marked this pull request as ready for review February 11, 2025 20:52
Copy link

github-actions bot commented Feb 11, 2025

PR #37523: Size comparison from 7d67dc9 to 44b571b

Full report (88 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 7d67dc9 44b571b change % change
bl602 lighting-app bl602 FLASH 1281264 1281264 0 0.0
RAM 96040 96040 0 0.0
bl602+mfd FLASH 1309312 1309312 0 0.0
RAM 95696 95696 0 0.0
bl602+rpc FLASH 1335684 1335684 0 0.0
RAM 104016 104016 0 0.0
bl702 lighting-app bl702 FLASH 944870 944870 0 0.0
RAM 15105 15105 0 0.0
bl702+mfd FLASH 957580 957580 0 0.0
RAM 14769 14769 0 0.0
bl702+rpc FLASH 1051284 1051284 0 0.0
RAM 23661 23661 0 0.0
bl706-eth FLASH 658290 658290 0 0.0
RAM 24745 24745 0 0.0
bl706-wifi FLASH 824798 824798 0 0.0
RAM 13965 13965 0 0.0
bl702l lighting-app bl702l FLASH 961806 961806 0 0.0
RAM 16804 16804 0 0.0
bl702l+mfd FLASH 974568 974568 0 0.0
RAM 16468 16468 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 829312 829312 0 0.0
RAM 123484 123484 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 814668 814668 0 0.0
RAM 125364 125364 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 761176 761176 0 0.0
RAM 113864 113864 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 745404 745404 0 0.0
RAM 114048 114048 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 617186 617186 0 0.0
RAM 205948 205948 0 0.0
lock CC3235SF_LAUNCHXL FLASH 657338 657338 0 0.0
RAM 206092 206092 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 678229 678229 0 0.0
RAM 78700 78700 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 698073 698073 0 0.0
RAM 81332 81332 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 698073 698073 0 0.0
RAM 81332 81332 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 655009 655009 0 0.0
RAM 73768 73768 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 614637 614637 0 0.0
RAM 71668 71668 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 634265 634265 0 0.0
RAM 74220 74220 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 634265 634265 0 0.0
RAM 74220 74220 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 633941 633941 0 0.0
RAM 74708 74708 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 653657 653657 0 0.0
RAM 77260 77260 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 653657 653657 0 0.0
RAM 77260 77260 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 609245 609245 0 0.0
RAM 68796 68796 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 629105 629105 0 0.0
RAM 71428 71428 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 629105 629105 0 0.0
RAM 71428 71428 0 0.0
efr32 lighting-app BRD4187C FLASH 934052 934052 0 0.0
RAM 136280 136280 0 0.0
lock-app BRD2605a FLASH 741592 741568 -24 -0.0
RAM 232156 232156 0 0.0
BRD4338a FLASH 742032 742008 -24 -0.0
RAM 232040 232040 0 0.0
window-app BRD4187C FLASH 1017848 1017840 -8 -0.0
RAM 128212 128212 0 0.0
esp32 all-clusters-app c3devkit DRAM 94280 94280 0 0.0
FLASH 1538440 1538440 0 0.0
IRAM 82538 82538 0 0.0
m5stack DRAM 115232 115232 0 0.0
FLASH 1548946 1548946 0 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4688 4688 0 0.0
FLASH 2781471 2781471 0 0.0
RAM 129680 129680 0 0.0
all-clusters-app debug unknown 5528 5528 0 0.0
FLASH 6085614 6085614 0 0.0
RAM 510784 510784 0 0.0
all-clusters-minimal-app debug unknown 5424 5424 0 0.0
FLASH 5418896 5418896 0 0.0
RAM 241424 241424 0 0.0
bridge-app debug unknown 5408 5408 0 0.0
FLASH 4752318 4752318 0 0.0
RAM 218608 218608 0 0.0
chip-tool debug unknown 6096 6096 0 0.0
FLASH 12723828 12723828 0 0.0
RAM 561250 561250 0 0.0
chip-tool-ipv6only arm64 unknown 20792 20792 0 0.0
FLASH 11349344 11349344 0 0.0
RAM 611616 611616 0 0.0
fabric-admin debug unknown 5792 5792 0 0.0
FLASH 11021391 11021391 0 0.0
RAM 560138 560138 0 0.0
fabric-bridge-app debug unknown 4632 4632 0 0.0
FLASH 4575120 4575120 0 0.0
RAM 205240 205240 0 0.0
lighting-app debug+rpc+ui unknown 6056 6056 0 0.0
FLASH 5692065 5692065 0 0.0
RAM 228648 228648 0 0.0
lock-app debug unknown 5344 5344 0 0.0
FLASH 4801882 4801882 0 0.0
RAM 204696 204696 0 0.0
ota-provider-app debug unknown 4720 4720 0 0.0
FLASH 4431302 4431302 0 0.0
RAM 198384 198384 0 0.0
ota-requestor-app debug unknown 4656 4656 0 0.0
FLASH 4570120 4570120 0 0.0
RAM 202952 202952 0 0.0
shell debug unknown 4216 4216 0 0.0
FLASH 3111613 3111613 0 0.0
RAM 159504 159504 0 0.0
thermostat-no-ble arm64 unknown 9464 9464 0 0.0
FLASH 4319440 4319440 0 0.0
RAM 243088 243088 0 0.0
tv-app debug unknown 5624 5624 0 0.0
FLASH 6043477 6043477 0 0.0
RAM 584416 584416 0 0.0
tv-casting-app debug unknown 5208 5208 0 0.0
FLASH 10851677 10851677 0 0.0
RAM 649184 649184 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 914180 914180 0 0.0
RAM 142387 142387 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 885168 885168 0 0.0
RAM 140534 140534 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 847592 847592 0 0.0
RAM 141281 141281 0 0.0
nxp contact k32w0+release FLASH 582008 582008 0 0.0
RAM 70976 70976 0 0.0
k32w1+release FLASH 596688 596688 0 0.0
RAM 63200 63200 0 0.0
mcxw71+release FLASH 596432 596432 0 0.0
RAM 63200 63200 0 0.0
light k32w0+release FLASH 618604 618604 0 0.0
RAM 70448 70448 0 0.0
k32w1+release FLASH 682720 682720 0 0.0
RAM 48832 48832 0 0.0
mcxw71+release FLASH 682720 682720 0 0.0
RAM 48832 48832 0 0.0
lock k32w1+release FLASH 704992 704992 0 0.0
RAM 67348 67348 0 0.0
mcxw71+release FLASH 705016 705016 0 0.0
RAM 67348 67348 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646412 1646412 0 0.0
RAM 211432 211432 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1552508 1552508 0 0.0
RAM 208240 208240 0 0.0
light cy8ckit_062s2_43012 FLASH 1467964 1467964 0 0.0
RAM 201232 201232 0 0.0
lock cy8ckit_062s2_43012 FLASH 1465020 1465020 0 0.0
RAM 225592 225592 0 0.0
qpg lighting-app qpg6105+debug FLASH 660376 660376 0 0.0
RAM 105428 105428 0 0.0
lock-app qpg6105+debug FLASH 618356 618356 0 0.0
RAM 99904 99904 0 0.0
stm32 light STM32WB5MM-DK FLASH 481672 481672 0 0.0
RAM 144876 144876 0 0.0
telink air-quality-sensor-app tlsr9528a_retention FLASH 620850 620850 0 0.0
RAM 50688 50688 0 0.0
all-clusters-app tlsr9118bdk40d FLASH 688060 688060 0 0.0
RAM 148528 148528 0 0.0
all-clusters-minimal-app tlsr9528a FLASH 781054 781054 0 0.0
RAM 110480 110480 0 0.0
bridge-app tlsr9258a FLASH 680962 680962 0 0.0
RAM 91344 91344 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 620614 620614 0 0.0
RAM 50640 50640 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a FLASH 708566 708566 0 0.0
RAM 73980 73980 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 625548 625548 0 0.0
RAM 144508 144508 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 811320 811320 0 0.0
RAM 99140 99140 0 0.0
lock-app-dfu tlsr9528a FLASH 656532 656532 0 0.0
RAM 66700 66700 0 0.0
ota-requestor-app tlsr9258a FLASH 696932 696932 0 0.0
RAM 90936 90936 0 0.0
pump-app-usb tlsr9518adk80d FLASH 634264 634264 0 0.0
RAM 55516 55516 0 0.0
pump-controller-app tlsr9518adk80d FLASH 611454 611454 0 0.0
RAM 52760 52760 0 0.0
shell tlsr9518adk80d FLASH 467862 467862 0 0.0
RAM 68168 68168 0 0.0
smoke_co_alarm-app tlsr9528a_retention FLASH 627770 627770 0 0.0
RAM 52352 52352 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d FLASH 653592 653592 0 0.0
RAM 56308 56308 0 0.0
thermostat tlsr9518adk80d FLASH 638180 638180 0 0.0
RAM 53152 53152 0 0.0
window-covering tlsr9118bdk40d FLASH 524318 524318 0 0.0
RAM 97484 97484 0 0.0
tizen all-clusters-app arm unknown 4912 4912 0 0.0
FLASH 1727020 1727020 0 0.0
RAM 89172 89172 0 0.0
chip-tool-ubsan arm unknown 10848 10848 0 0.0
FLASH 18023466 18023466 0 0.0
RAM 7870416 7870416 0 0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
matter-1.4-te2-script-change Script changes before end of Matter 1.4 TE2 tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant