Skip to content

Conversation

@MarekPikula
Copy link

@MarekPikula MarekPikula commented Dec 3, 2025

Summary

Before when stopping execution with KeyboardInterrupt (i.e., Ctrl+C) there was no mechanism to properly clean up the state (e.g., remove temporary files, close sockets, remove Linux network namespaces).

Now, KeyboardInterrupt is caught in the main loop, making the cleanup more seamless and less error-prone.

In addtion to this, there are a few small changes:

  • Add option to set network namespace index in Linux shell
  • Use replace for dataclass modifications
  • Use enum for SubprocessInfo.kind

Related issues

Related to #42204

Testing

Local tests with run_test_suite.py and sending Ctrl+C at various points in time.

Readability checklist

The checklist below will help the reviewer finish PR review in time and keep the
code readable:

  • PR title is
    descriptive
  • Apply the
    “When in Rome…”
    rule (coding style)
  • PR size is short
  • Try to avoid "squashing" and "force-update" in commit history
  • CI time didn't increase

See: Pull Request Guidelines

Copilot AI review requested due to automatic review settings December 3, 2025 15:08
@MarekPikula MarekPikula force-pushed the keyboardinterrupt-tests branch from 93b213f to 1b7e384 Compare December 3, 2025 15:11
Copilot finished reviewing on behalf of MarekPikula December 3, 2025 15:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the test suite infrastructure by implementing proper cleanup mechanisms for KeyboardInterrupt signals (Ctrl+C) and improving type safety throughout the codebase. The changes ensure that resources such as temporary files, sockets, and Linux network namespaces are properly cleaned up when test execution is interrupted, preventing resource leaks and system state corruption.

Key Changes:

  • Implemented try-except-finally pattern with KeyboardInterrupt handling to ensure cleanup on interruption
  • Refactored SubprocessInfo.kind from string literals to SubprocessKind enum for type safety
  • Migrated AppsRegister methods from camelCase to snake_case naming convention
  • Added comprehensive type hints across multiple modules for better IDE support and type checking

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
scripts/tests/run_test_suite.py Added KeyboardInterrupt handling, cleanup mechanism via try-finally block, type hints for CLI functions, and network namespace index option for shell command
scripts/tests/run_darwin_framework_ota_test.py Updated to use SubprocessKind enum and snake_case AppsRegister methods
scripts/tests/chipyaml/paths_finder.py Updated return type annotation to allow None
scripts/tests/chiptest/test_definition.py Changed TestTag to StrEnum, added comprehensive type hints, added assertions for safety, updated to use snake_case AppsRegister methods
scripts/tests/chiptest/runner.py Introduced SubprocessKind enum, refactored dataclass modifications to use replace(), added comprehensive type annotations
scripts/tests/chiptest/linux.py Added type hints, refactored methods to use variadic arguments, made setup_app_link_up public, added wait_for_dad parameter
scripts/tests/chiptest/darwin.py Added type hints to executor methods
scripts/tests/chiptest/accessories.py Refactored all methods to snake_case, added comprehensive type hints, added terminate() method for cleanup protocol
scripts/tests/chiptest/init.py Updated type hints to use modern syntax
src/python_testing/matter_testing_infrastructure/mypy.ini Removed (moved to pyproject.toml)
pyproject.toml Added mypy and pyright configuration
.vscode/settings.json Added Python ruler configuration
.vscode/extensions.json Added recommended extensions for Python development (ruff, mypy, etc.)
.github/workflows/mypy-validation.yml Updated to check additional files and use centralized mypy configuration

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

PR #42261: Size comparison from 1b2ac27 to 1b7e384

Full report (10 builds for cc13x4_26x4, cc32xx, nrfconnect, realtek, stm32)
platform target config section 1b2ac27 1b7e384 change % change
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 771448 771448 0 0.0
RAM 103392 103392 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 784260 784260 0 0.0
RAM 108712 108712 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 729280 729280 0 0.0
RAM 97452 97452 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 713728 713728 0 0.0
RAM 97660 97660 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 555260 555260 0 0.0
RAM 205472 205472 0 0.0
lock CC3235SF_LAUNCHXL FLASH 589200 589200 0 0.0
RAM 205720 205720 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 937484 937484 0 0.0
RAM 161700 161700 0 0.0
realtek light-switch-app rtl8777g FLASH 709864 709864 0 0.0
RAM 107188 107188 0 0.0
lighting-app rtl8777g FLASH 758560 758560 0 0.0
RAM 127320 127320 0 0.0
stm32 light STM32WB5MM-DK FLASH 470908 470908 0 0.0
RAM 141392 141392 0 0.0

@MarekPikula MarekPikula force-pushed the keyboardinterrupt-tests branch from 1b7e384 to 7c72f13 Compare December 3, 2025 15:34
@github-actions
Copy link

github-actions bot commented Dec 3, 2025

PR #42261: Size comparison from 1b2ac27 to 7c72f13

Full report (30 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, nrfconnect, psoc6, qpg, realtek, stm32, telink)
platform target config section 1b2ac27 7c72f13 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1106714 1106714 0 0.0
RAM 178954 178954 0 0.0
bl702 lighting-app bl702+eth FLASH 661534 661534 0 0.0
RAM 135025 135025 0 0.0
bl702+wifi FLASH 837384 837384 0 0.0
RAM 124485 124485 0 0.0
bl706+mfd+rpc+littlefs FLASH 1071032 1071032 0 0.0
RAM 117341 117341 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 903852 903852 0 0.0
RAM 105932 105932 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 983778 983778 0 0.0
RAM 109844 109844 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 771448 771448 0 0.0
RAM 103392 103392 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 784260 784260 0 0.0
RAM 108712 108712 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 729280 729280 0 0.0
RAM 97452 97452 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 713728 713728 0 0.0
RAM 97660 97660 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 555260 555260 0 0.0
RAM 205472 205472 0 0.0
lock CC3235SF_LAUNCHXL FLASH 589200 589200 0 0.0
RAM 205720 205720 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 937484 937484 0 0.0
RAM 161700 161700 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1683324 1683324 0 0.0
RAM 214156 214156 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1597660 1597660 0 0.0
RAM 211324 211324 0 0.0
light cy8ckit_062s2_43012 FLASH 1461236 1461236 0 0.0
RAM 197800 197800 0 0.0
lock cy8ckit_062s2_43012 FLASH 1495188 1495188 0 0.0
RAM 225672 225672 0 0.0
qpg lighting-app qpg6200+debug FLASH 839416 839416 0 0.0
RAM 127952 127952 0 0.0
lock-app qpg6200+debug FLASH 776656 776656 0 0.0
RAM 118920 118920 0 0.0
realtek light-switch-app rtl8777g FLASH 709864 709864 0 0.0
RAM 107188 107188 0 0.0
lighting-app rtl8777g FLASH 758560 758560 0 0.0
RAM 127320 127320 0 0.0
stm32 light STM32WB5MM-DK FLASH 470908 470908 0 0.0
RAM 141392 141392 0 0.0
telink bridge-app tl7218x FLASH 704398 704398 0 0.0
RAM 90760 90760 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 790746 790746 0 0.0
RAM 41176 41176 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 782058 782058 0 0.0
RAM 93860 93860 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 710542 710542 0 0.0
RAM 52232 52232 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 746374 746374 0 0.0
RAM 71256 71256 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 721062 721062 0 0.0
RAM 34956 34956 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 602950 602950 0 0.0
RAM 117576 117576 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 815566 815570 4 0.0
RAM 92248 92248 0 0.0

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

PR #42261: Size comparison from 8dd3e20 to 3f8fbda

Full report (35 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section 8dd3e20 3f8fbda change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1106714 1106714 0 0.0
RAM 178954 178954 0 0.0
bl702 lighting-app bl702+eth FLASH 661534 661534 0 0.0
RAM 135025 135025 0 0.0
bl702+wifi FLASH 837384 837384 0 0.0
RAM 124485 124485 0 0.0
bl706+mfd+rpc+littlefs FLASH 1071032 1071032 0 0.0
RAM 117341 117341 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 903852 903852 0 0.0
RAM 105932 105932 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 983778 983778 0 0.0
RAM 109844 109844 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 771448 771448 0 0.0
RAM 103392 103392 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 784260 784260 0 0.0
RAM 108712 108712 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 729280 729280 0 0.0
RAM 97452 97452 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 713728 713728 0 0.0
RAM 97660 97660 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 555260 555260 0 0.0
RAM 205472 205472 0 0.0
lock CC3235SF_LAUNCHXL FLASH 589200 589200 0 0.0
RAM 205720 205720 0 0.0
efr32 lock-app BRD4187C FLASH 965420 965420 0 0.0
RAM 123776 123776 0 0.0
BRD4338a FLASH 760240 760240 0 0.0
RAM 254388 254388 0 0.0
window-app BRD4187C FLASH 1061072 1061072 0 0.0
RAM 120004 120004 0 0.0
esp32 all-clusters-app c3devkit DRAM 102772 102772 0 0.0
FLASH 1839704 1839704 0 0.0
IRAM 93540 93540 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 937484 937484 0 0.0
RAM 161700 161700 0 0.0
nxp contact mcxw71+release FLASH 695840 695840 0 0.0
RAM 61744 61744 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1683324 1683324 0 0.0
RAM 214156 214156 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1597660 1597660 0 0.0
RAM 211324 211324 0 0.0
light cy8ckit_062s2_43012 FLASH 1461236 1461236 0 0.0
RAM 197800 197800 0 0.0
lock cy8ckit_062s2_43012 FLASH 1495188 1495188 0 0.0
RAM 225672 225672 0 0.0
qpg lighting-app qpg6200+debug FLASH 839416 839416 0 0.0
RAM 127952 127952 0 0.0
lock-app qpg6200+debug FLASH 776656 776656 0 0.0
RAM 118920 118920 0 0.0
realtek light-switch-app rtl8777g FLASH 709864 709864 0 0.0
RAM 107188 107188 0 0.0
lighting-app rtl8777g FLASH 758560 758560 0 0.0
RAM 127320 127320 0 0.0
stm32 light STM32WB5MM-DK FLASH 470908 470908 0 0.0
RAM 141392 141392 0 0.0
telink bridge-app tl7218x FLASH 704394 704394 0 0.0
RAM 90760 90760 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 790742 790742 0 0.0
RAM 41176 41176 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 782054 782054 0 0.0
RAM 93860 93860 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 710538 710538 0 0.0
RAM 52232 52232 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 746370 746370 0 0.0
RAM 71256 71256 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 721050 721050 0 0.0
RAM 34956 34956 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 602946 602946 0 0.0
RAM 117320 117320 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 815562 815566 4 0.0
RAM 92248 92248 0 0.0

@MarekPikula MarekPikula changed the title Properly clean up test suite tests on KeyboardInterrupt [Tests] Properly clean up test suite tests on KeyboardInterrupt Dec 3, 2025
@MarekPikula MarekPikula force-pushed the keyboardinterrupt-tests branch 2 times, most recently from 577fae8 to 4222664 Compare December 3, 2025 18:13
@github-actions
Copy link

github-actions bot commented Dec 3, 2025

PR #42261: Size comparison from fe96e6d to 4222664

Full report (35 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section fe96e6d 4222664 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1106714 1106714 0 0.0
RAM 178954 178954 0 0.0
bl702 lighting-app bl702+eth FLASH 661534 661534 0 0.0
RAM 135025 135025 0 0.0
bl702+wifi FLASH 837384 837384 0 0.0
RAM 124485 124485 0 0.0
bl706+mfd+rpc+littlefs FLASH 1071032 1071032 0 0.0
RAM 117341 117341 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 903852 903852 0 0.0
RAM 105932 105932 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 983778 983778 0 0.0
RAM 109844 109844 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 771448 771448 0 0.0
RAM 103392 103392 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 784260 784260 0 0.0
RAM 108712 108712 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 729280 729280 0 0.0
RAM 97452 97452 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 713728 713728 0 0.0
RAM 97660 97660 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 555260 555260 0 0.0
RAM 205472 205472 0 0.0
lock CC3235SF_LAUNCHXL FLASH 589200 589200 0 0.0
RAM 205720 205720 0 0.0
efr32 lock-app BRD4187C FLASH 965420 965420 0 0.0
RAM 123776 123776 0 0.0
BRD4338a FLASH 760240 760240 0 0.0
RAM 254388 254388 0 0.0
window-app BRD4187C FLASH 1061072 1061072 0 0.0
RAM 120004 120004 0 0.0
esp32 all-clusters-app c3devkit DRAM 102772 102772 0 0.0
FLASH 1839704 1839704 0 0.0
IRAM 93540 93540 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 937484 937484 0 0.0
RAM 161700 161700 0 0.0
nxp contact mcxw71+release FLASH 695840 695840 0 0.0
RAM 61744 61744 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1683324 1683324 0 0.0
RAM 214156 214156 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1597660 1597660 0 0.0
RAM 211324 211324 0 0.0
light cy8ckit_062s2_43012 FLASH 1461236 1461236 0 0.0
RAM 197800 197800 0 0.0
lock cy8ckit_062s2_43012 FLASH 1495188 1495188 0 0.0
RAM 225672 225672 0 0.0
qpg lighting-app qpg6200+debug FLASH 839416 839416 0 0.0
RAM 127952 127952 0 0.0
lock-app qpg6200+debug FLASH 776656 776656 0 0.0
RAM 118920 118920 0 0.0
realtek light-switch-app rtl8777g FLASH 709864 709864 0 0.0
RAM 107188 107188 0 0.0
lighting-app rtl8777g FLASH 758560 758560 0 0.0
RAM 127320 127320 0 0.0
stm32 light STM32WB5MM-DK FLASH 470908 470908 0 0.0
RAM 141392 141392 0 0.0
telink bridge-app tl7218x FLASH 704394 704394 0 0.0
RAM 90760 90760 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 790742 790742 0 0.0
RAM 41176 41176 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 782054 782054 0 0.0
RAM 93860 93860 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 710538 710538 0 0.0
RAM 52232 52232 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 746370 746370 0 0.0
RAM 71256 71256 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 721050 721050 0 0.0
RAM 34956 34956 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 602946 602946 0 0.0
RAM 117320 117320 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 815562 815566 4 0.0
RAM 92248 92248 0 0.0

Makes it easier to experiment with environment within Linux namespace.

Signed-off-by: Marek Pikuła <[email protected]>
Reduces code clutter.

Signed-off-by: Marek Pikuła <[email protected]>
Before when stopping execution with KeyboardInterrupt (i.e., Ctrl+C)
there was no mechanism to properly clean up the state (e.g., remove
temporary files, close sockets, remove Linux network namespaces).

Now, KeyboardInterrupt is caught in the main loop, making the cleanup
more seamless and less error-prone.

Signed-off-by: Marek Pikuła <[email protected]>
This allows to perform all termination commands, even if some fail
making it more likely that we leave a clean state.

Signed-off-by: Marek Pikuła <[email protected]>
In case any exception is encountered during namespace setup we ensure
that, before rethrowing the exception, we properly clean up the state.

Signed-off-by: Marek Pikuła <[email protected]>
@MarekPikula MarekPikula force-pushed the keyboardinterrupt-tests branch from 4222664 to 5ebec2e Compare December 4, 2025 16:34
@MarekPikula MarekPikula marked this pull request as ready for review December 4, 2025 16:35
Copilot AI review requested due to automatic review settings December 4, 2025 16:35
Copilot finished reviewing on behalf of MarekPikula December 4, 2025 18:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

PR #42261: Size comparison from e333758 to d47c4bb

Full report (35 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section e333758 d47c4bb change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1106718 1106718 0 0.0
RAM 178954 178954 0 0.0
bl702 lighting-app bl702+eth FLASH 661538 661538 0 0.0
RAM 135025 135025 0 0.0
bl702+wifi FLASH 837388 837388 0 0.0
RAM 124485 124485 0 0.0
bl706+mfd+rpc+littlefs FLASH 1071032 1071032 0 0.0
RAM 117341 117341 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 903852 903852 0 0.0
RAM 105932 105932 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 983778 983778 0 0.0
RAM 109844 109844 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 771448 771448 0 0.0
RAM 103392 103392 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 784260 784260 0 0.0
RAM 108712 108712 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 729280 729280 0 0.0
RAM 97452 97452 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 713728 713728 0 0.0
RAM 97660 97660 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 555260 555260 0 0.0
RAM 205472 205472 0 0.0
lock CC3235SF_LAUNCHXL FLASH 589200 589200 0 0.0
RAM 205720 205720 0 0.0
efr32 lock-app BRD4187C FLASH 965420 965420 0 0.0
RAM 123776 123776 0 0.0
BRD4338a FLASH 760240 760240 0 0.0
RAM 254388 254388 0 0.0
window-app BRD4187C FLASH 1061072 1061072 0 0.0
RAM 120004 120004 0 0.0
esp32 all-clusters-app c3devkit DRAM 102804 102804 0 0.0
FLASH 1840140 1840140 0 0.0
IRAM 93540 93540 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 937940 937940 0 0.0
RAM 161720 161720 0 0.0
nxp contact mcxw71+release FLASH 695840 695840 0 0.0
RAM 61744 61744 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1683620 1683620 0 0.0
RAM 214188 214188 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1597956 1597956 0 0.0
RAM 211356 211356 0 0.0
light cy8ckit_062s2_43012 FLASH 1461236 1461236 0 0.0
RAM 197800 197800 0 0.0
lock cy8ckit_062s2_43012 FLASH 1495188 1495188 0 0.0
RAM 225672 225672 0 0.0
qpg lighting-app qpg6200+debug FLASH 839784 839784 0 0.0
RAM 127976 127976 0 0.0
lock-app qpg6200+debug FLASH 776656 776656 0 0.0
RAM 118920 118920 0 0.0
realtek light-switch-app rtl8777g FLASH 709864 709864 0 0.0
RAM 107188 107188 0 0.0
lighting-app rtl8777g FLASH 758560 758560 0 0.0
RAM 127320 127320 0 0.0
stm32 light STM32WB5MM-DK FLASH 470908 470908 0 0.0
RAM 141392 141392 0 0.0
telink bridge-app tl7218x FLASH 704394 704394 0 0.0
RAM 90760 90760 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 790742 790742 0 0.0
RAM 41176 41176 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 782054 782054 0 0.0
RAM 93860 93860 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 710538 710538 0 0.0
RAM 52232 52232 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 746370 746370 0 0.0
RAM 71256 71256 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 721050 721050 0 0.0
RAM 34956 34956 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 602952 602952 0 0.0
RAM 117320 117320 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 815562 815566 4 0.0
RAM 92248 92248 0 0.0

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

PR #42261: Size comparison from e333758 to 146dd90

Full report (35 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section e333758 146dd90 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1106718 1105860 -858 -0.1
RAM 178954 178954 0 0.0
bl702 lighting-app bl702+eth FLASH 661538 660680 -858 -0.1
RAM 135025 135025 0 0.0
bl702+wifi FLASH 837388 836530 -858 -0.1
RAM 124485 124485 0 0.0
bl706+mfd+rpc+littlefs FLASH 1071032 1070174 -858 -0.1
RAM 117341 117341 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 903852 902384 -1468 -0.2
RAM 105932 105932 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 983778 982920 -858 -0.1
RAM 109844 109844 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 771448 770768 -680 -0.1
RAM 103392 103392 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 784260 783588 -672 -0.1
RAM 108712 108712 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 729280 728608 -672 -0.1
RAM 97452 97452 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 713728 713064 -664 -0.1
RAM 97660 97660 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 555260 554588 -672 -0.1
RAM 205472 205472 0 0.0
lock CC3235SF_LAUNCHXL FLASH 589200 588528 -672 -0.1
RAM 205720 205720 0 0.0
efr32 lock-app BRD4187C FLASH 965420 964748 -672 -0.1
RAM 123776 123776 0 0.0
BRD4338a FLASH 760240 759072 -1168 -0.2
RAM 254388 254388 0 0.0
window-app BRD4187C FLASH 1061072 1059888 -1184 -0.1
RAM 120004 120004 0 0.0
esp32 all-clusters-app c3devkit DRAM 102804 102804 0 0.0
FLASH 1840140 1831048 -9092 -0.5
IRAM 93540 93540 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 937940 936404 -1536 -0.2
RAM 161720 161720 0 0.0
nxp contact mcxw71+release FLASH 695840 695104 -736 -0.1
RAM 61744 61744 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1683620 1681188 -2432 -0.1
RAM 214188 214188 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1597956 1595684 -2272 -0.1
RAM 211356 211356 0 0.0
light cy8ckit_062s2_43012 FLASH 1461236 1460052 -1184 -0.1
RAM 197800 197800 0 0.0
lock cy8ckit_062s2_43012 FLASH 1495188 1494004 -1184 -0.1
RAM 225672 225672 0 0.0
qpg lighting-app qpg6200+debug FLASH 839784 838368 -1416 -0.2
RAM 127976 127976 0 0.0
lock-app qpg6200+debug FLASH 776656 775984 -672 -0.1
RAM 118920 118920 0 0.0
realtek light-switch-app rtl8777g FLASH 709864 708688 -1176 -0.2
RAM 107188 107188 0 0.0
lighting-app rtl8777g FLASH 758560 757384 -1176 -0.2
RAM 127320 127320 0 0.0
stm32 light STM32WB5MM-DK FLASH 470908 470236 -672 -0.1
RAM 141392 141392 0 0.0
telink bridge-app tl7218x FLASH 704394 703898 -496 -0.1
RAM 90760 90760 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 790742 790246 -496 -0.1
RAM 41176 41176 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 782054 781558 -496 -0.1
RAM 93860 93860 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 710538 710042 -496 -0.1
RAM 52232 52232 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 746370 745874 -496 -0.1
RAM 71256 71256 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 721050 720554 -496 -0.1
RAM 34956 34956 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 602952 602456 -496 -0.1
RAM 117320 117320 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 815562 815070 -492 -0.1
RAM 92248 92248 0 0.0

try:
self._run(cmd)
except Exception as e:
log.warning("Encountered error during namespace termination: %s", e, exc_info=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need stack trace here? Also, in other similar place you are logging exceptions as error while here as warning.

Copy link
Author

Choose a reason for hiding this comment

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

I was debating it myself how should we treat an exception during cleanup. On one hand it's indeed an error, on the other it's not critical, so I opted for warning. About the traceback, I prefer to have a traceback where possible, but maybe indeed it should go on a debug level. What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

Seeing a call trace on terminal triggers "there is a bug" reaction (at least that's my case). If such trace is not a bug but simply some runtime error which should be handled "somehow", by showing traces in random places we are training ourselves to treat traces as a noise, which is not good in my opinion.

Copy link
Author

Choose a reason for hiding this comment

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

What about the warning part?

Copy link
Contributor

@arkq arkq Dec 5, 2025

Choose a reason for hiding this comment

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

If the program can recover form here onward, then it's a warning, if it cannot recover (functionality will be degraded) then it's an error, if it can not function correctly, then it's a critical error. That's how I see it. So, in this particular case it seems like a warning - it's a termination logic anyway... The same applies to the def cleanup() -> None in the test suite code, IMHO.

Copy link
Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed

You did not fixed the def cleanup() -> None in the test suite code....

Copy link
Author

Choose a reason for hiding this comment

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

Right, sorry. Fixed now.

Copilot AI review requested due to automatic review settings December 5, 2025 11:40
Copilot finished reviewing on behalf of MarekPikula December 5, 2025 11:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

@github-actions
Copy link

github-actions bot commented Dec 5, 2025

PR #42261: Size comparison from 4579de1 to b6d1654

Full report (10 builds for cc13x4_26x4, cc32xx, nrfconnect, realtek, stm32)
platform target config section 4579de1 b6d1654b change % change
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 770768 770768 0 0.0
RAM 103392 103392 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 783588 783588 0 0.0
RAM 108712 108712 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 728608 728608 0 0.0
RAM 97452 97452 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 713064 713064 0 0.0
RAM 97660 97660 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 554588 554588 0 0.0
RAM 205472 205472 0 0.0
lock CC3235SF_LAUNCHXL FLASH 588528 588528 0 0.0
RAM 205720 205720 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 936404 936404 0 0.0
RAM 161720 161720 0 0.0
realtek light-switch-app rtl8777g FLASH 708688 708688 0 0.0
RAM 107188 107188 0 0.0
lighting-app rtl8777g FLASH 757384 757384 0 0.0
RAM 127320 127320 0 0.0
stm32 light STM32WB5MM-DK FLASH 470236 470236 0 0.0
RAM 141392 141392 0 0.0

Copilot AI review requested due to automatic review settings December 5, 2025 12:14
Copilot finished reviewing on behalf of MarekPikula December 5, 2025 12:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

@github-actions
Copy link

github-actions bot commented Dec 5, 2025

PR #42261: Size comparison from 4579de1 to 77c5aac

Full report (10 builds for cc13x4_26x4, cc32xx, nrfconnect, realtek, stm32)
platform target config section 4579de1 77c5aac change % change
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 770768 770768 0 0.0
RAM 103392 103392 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 783588 783588 0 0.0
RAM 108712 108712 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 728608 728608 0 0.0
RAM 97452 97452 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 713064 713064 0 0.0
RAM 97660 97660 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 554588 554588 0 0.0
RAM 205472 205472 0 0.0
lock CC3235SF_LAUNCHXL FLASH 588528 588528 0 0.0
RAM 205720 205720 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 936404 936404 0 0.0
RAM 161720 161720 0 0.0
realtek light-switch-app rtl8777g FLASH 708688 708688 0 0.0
RAM 107188 107188 0 0.0
lighting-app rtl8777g FLASH 757384 757384 0 0.0
RAM 127320 127320 0 0.0
stm32 light STM32WB5MM-DK FLASH 470236 470236 0 0.0
RAM 141392 141392 0 0.0

Signed-off-by: Marek Pikuła <[email protected]>
Copilot AI review requested due to automatic review settings December 5, 2025 12:46
Copilot finished reviewing on behalf of MarekPikula December 5, 2025 12:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@github-actions
Copy link

github-actions bot commented Dec 5, 2025

PR #42261: Size comparison from 4579de1 to 244dec3

Full report (35 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section 4579de1 244dec3 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1105860 1105860 0 0.0
RAM 178954 178954 0 0.0
bl702 lighting-app bl702+eth FLASH 660680 660680 0 0.0
RAM 135025 135025 0 0.0
bl702+wifi FLASH 836530 836530 0 0.0
RAM 124485 124485 0 0.0
bl706+mfd+rpc+littlefs FLASH 1070174 1070174 0 0.0
RAM 117341 117341 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 902384 902384 0 0.0
RAM 105932 105932 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 982920 982920 0 0.0
RAM 109844 109844 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 770768 770768 0 0.0
RAM 103392 103392 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 783588 783588 0 0.0
RAM 108712 108712 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 728608 728608 0 0.0
RAM 97452 97452 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 713064 713064 0 0.0
RAM 97660 97660 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 554588 554588 0 0.0
RAM 205472 205472 0 0.0
lock CC3235SF_LAUNCHXL FLASH 588528 588528 0 0.0
RAM 205720 205720 0 0.0
efr32 lock-app BRD4187C FLASH 964748 964748 0 0.0
RAM 123776 123776 0 0.0
BRD4338a FLASH 759072 759072 0 0.0
RAM 254388 254388 0 0.0
window-app BRD4187C FLASH 1059888 1059888 0 0.0
RAM 120004 120004 0 0.0
esp32 all-clusters-app c3devkit DRAM 102804 102804 0 0.0
FLASH 1831058 1831058 0 0.0
IRAM 93540 93540 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 936404 936404 0 0.0
RAM 161720 161720 0 0.0
nxp contact mcxw71+release FLASH 695104 695104 0 0.0
RAM 61744 61744 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1681188 1681188 0 0.0
RAM 214188 214188 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1595684 1595684 0 0.0
RAM 211356 211356 0 0.0
light cy8ckit_062s2_43012 FLASH 1460052 1460052 0 0.0
RAM 197800 197800 0 0.0
lock cy8ckit_062s2_43012 FLASH 1494004 1494004 0 0.0
RAM 225672 225672 0 0.0
qpg lighting-app qpg6200+debug FLASH 838368 838368 0 0.0
RAM 127976 127976 0 0.0
lock-app qpg6200+debug FLASH 775984 775984 0 0.0
RAM 118920 118920 0 0.0
realtek light-switch-app rtl8777g FLASH 708688 708688 0 0.0
RAM 107188 107188 0 0.0
lighting-app rtl8777g FLASH 757384 757384 0 0.0
RAM 127320 127320 0 0.0
stm32 light STM32WB5MM-DK FLASH 470236 470236 0 0.0
RAM 141392 141392 0 0.0
telink bridge-app tl7218x FLASH 703898 703898 0 0.0
RAM 90760 90760 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 790246 790246 0 0.0
RAM 41176 41176 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 781558 781558 0 0.0
RAM 93860 93860 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 710042 710042 0 0.0
RAM 52232 52232 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 745874 745874 0 0.0
RAM 71256 71256 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 720554 720554 0 0.0
RAM 34956 34956 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 602456 602456 0 0.0
RAM 117320 117320 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 815066 815070 4 0.0
RAM 92248 92248 0 0.0

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.

2 participants