Skip to content

[OTA PROVIDER] - Read ApplyUpdateRequest as a flag using named pipes#72177

Open
jtrejoespinoza-grid wants to merge 17 commits into
project-chip:masterfrom
jtrejoespinoza-grid:provide_apply_update_request_read
Open

[OTA PROVIDER] - Read ApplyUpdateRequest as a flag using named pipes#72177
jtrejoespinoza-grid wants to merge 17 commits into
project-chip:masterfrom
jtrejoespinoza-grid:provide_apply_update_request_read

Conversation

@jtrejoespinoza-grid

@jtrejoespinoza-grid jtrejoespinoza-grid commented May 25, 2026

Copy link
Copy Markdown
Contributor

Summary

As part of testing for the test TC_SU_2_5 we need to be able tor read the values sent from the ApplyUpdateRequest action from the Provider, as we can not modify requestor behavior the Test need to be able to to read these values from the Provider, this will allow the test to assert the values and ensure we can terminate the provider properly before Re-request the ApplyUpdateRequest.

The idea for this is because we do not want to apply multiple software updates as is not really needed for the propose of the test.

Additionally the test TC_SU_2.5 is reduced to 3 steps ( 3,4 and 5) and remove step 1 and step 2 which will be validated on different test cases.

Related issues

#Fixes project-chip/matter-test-scripts#786

Testing

Build the Provider and Requestor apps:

Provider App
./scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/debug chip_config_network_layer_ble=false

Requestor App
./scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug chip_config_network_layer_ble=false

Run the test using:

python3 scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_SU_2_5.py

Readability checklist

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

  • Provider writes the ApplyUpdateRequest data in the named pipes.
  • Test read the response
  • Provider is terminated and no software update is completed on each step.
  • Update provider named pipes

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

Copy link
Copy Markdown
Contributor

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 implements a status tracking mechanism for OTA apply update requests using named pipes. It adds a boolean flag to OTAProviderExample to track sent requests and introduces a new command, GetApplyUpdateRequestStatus, in the command delegate to report this status via JSON. The Python test TC_SU_2_5.py is updated to verify these statuses during the update process. Review feedback identifies several typos in the new function names (e.g., 'BuildAppy' instead of 'BuildApply'), an unused variable in the command handler, a return type mismatch in a getter, and a configuration issue where the input and output pipes were defaulting to the same file path.

Comment thread src/python_testing/TC_SU_2_5.py Outdated
Comment thread examples/ota-provider-app/linux/OtaProviderAppCommandDelegate.cpp Outdated
Comment thread examples/ota-provider-app/linux/OtaProviderAppCommandDelegate.cpp Outdated
Comment thread examples/ota-provider-app/linux/OtaProviderAppCommandDelegate.h Outdated
Comment thread examples/ota-provider-app/ota-provider-common/OTAProviderExample.h Outdated
@codecov

codecov Bot commented May 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.08%. Comparing base (b47b58c) to head (f7fdf7c).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #72177   +/-   ##
=======================================
  Coverage   56.08%   56.08%           
=======================================
  Files        1640     1640           
  Lines      112462   112462           
  Branches    13316    13316           
=======================================
  Hits        63074    63074           
  Misses      49388    49388           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented May 25, 2026

Copy link
Copy Markdown

PR #72177: Size comparison from 7f05a3a to 8a36708

Full report (35 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, psoc6, qpg, realtek, stm32, telink)
platform target config section 7f05a3a 8a36708 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1093770 1093770 0 0.0
RAM 144882 144882 0 0.0
bl616 lighting-app bl616+thread FLASH 1105068 1105068 0 0.0
RAM 104280 104280 0 0.0
bl616+wifi+shell FLASH 1592776 1592776 0 0.0
RAM 98176 98176 0 0.0
bl702 lighting-app bl702+eth FLASH 1056782 1056782 0 0.0
RAM 108509 108509 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 895578 895578 0 0.0
RAM 105884 105884 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 776428 776428 0 0.0
RAM 103388 103388 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 789532 789532 0 0.0
RAM 108676 108676 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 738696 738696 0 0.0
RAM 97596 97596 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 718844 718844 0 0.0
RAM 97636 97636 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 568670 568670 0 0.0
RAM 205056 205056 0 0.0
lock CC3235SF_LAUNCHXL FLASH 596166 596166 0 0.0
RAM 205256 205256 0 0.0
efr32 lock-app BRD4187C FLASH 994072 994072 0 0.0
RAM 131288 131288 0 0.0
BRD4338a FLASH 798685 798677 -8 -0.0
RAM 243424 243424 0 0.0
window-app BRD4187C FLASH 1100064 1100056 -8 -0.0
RAM 130360 130360 0 0.0
esp32 all-clusters-app c3devkit DRAM 99716 99716 0 0.0
FLASH 1621046 1621046 0 0.0
IRAM 94776 94776 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 833844 833844 0 0.0
RAM 157532 157532 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1733436 1733436 0 0.0
RAM 215260 215260 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1622188 1622188 0 0.0
RAM 211548 211548 0 0.0
light cy8ckit_062s2_43012 FLASH 1469708 1469708 0 0.0
RAM 197420 197420 0 0.0
lock cy8ckit_062s2_43012 FLASH 1503284 1503284 0 0.0
RAM 225252 225252 0 0.0
qpg lighting-app qpg6200+debug FLASH 844588 844588 0 0.0
RAM 127956 127956 0 0.0
lock-app qpg6200+debug FLASH 783296 783296 0 0.0
RAM 118904 118904 0 0.0
realtek light-switch-app rtl8777g FLASH 688168 688168 0 0.0
RAM 101756 101756 0 0.0
lighting-app rtl8777g FLASH 729224 729224 0 0.0
RAM 102036 102036 0 0.0
stm32 light STM32WB5MM-DK FLASH 477940 477940 0 0.0
RAM 141468 141468 0 0.0
telink all-devices-app tl7218x FLASH 810468 810468 0 0.0
RAM 97196 97196 0 0.0
tlsr9118bdk40d FLASH 603924 603924 0 0.0
RAM 120152 120152 0 0.0
bridge-app tl7218x FLASH 731372 731372 0 0.0
RAM 95864 95864 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 851308 851308 0 0.0
RAM 44332 44332 0 0.0
tl7218x FLASH 842636 842636 0 0.0
RAM 99656 99656 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 731434 731434 0 0.0
RAM 55980 55980 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 794660 794660 0 0.0
RAM 75164 75164 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 731364 731364 0 0.0
RAM 33468 33468 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 614092 614092 0 0.0
RAM 118496 118496 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 840750 840754 4 0.0
RAM 97364 97364 0 0.0

@github-actions

github-actions Bot commented May 26, 2026

Copy link
Copy Markdown

PR #72177: Size comparison from 7f05a3a to 726f47d

Full report (35 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, psoc6, qpg, realtek, stm32, telink)
platform target config section 7f05a3a 726f47d change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1093770 1093790 20 0.0
RAM 144882 144882 0 0.0
bl616 lighting-app bl616+thread FLASH 1105068 1105100 32 0.0
RAM 104280 104280 0 0.0
bl616+wifi+shell FLASH 1592776 1592800 24 0.0
RAM 98176 98176 0 0.0
bl702 lighting-app bl702+eth FLASH 1056782 1056802 20 0.0
RAM 108509 108509 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 895578 895598 20 0.0
RAM 105884 105884 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 776428 776508 80 0.0
RAM 103388 103388 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 789532 789644 112 0.0
RAM 108676 108676 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 738696 738768 72 0.0
RAM 97596 97596 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 718844 718932 88 0.0
RAM 97636 97636 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 568670 568694 24 0.0
RAM 205056 205056 0 0.0
lock CC3235SF_LAUNCHXL FLASH 596166 596182 16 0.0
RAM 205256 205256 0 0.0
efr32 lock-app BRD4187C FLASH 994072 994104 32 0.0
RAM 131288 131288 0 0.0
BRD4338a FLASH 798685 798741 56 0.0
RAM 243424 243424 0 0.0
window-app BRD4187C FLASH 1100064 1100088 24 0.0
RAM 130360 130360 0 0.0
esp32 all-clusters-app c3devkit DRAM 99716 99716 0 0.0
FLASH 1621046 1621070 24 0.0
IRAM 94776 94776 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 833844 833860 16 0.0
RAM 157532 157540 8 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1733436 1733452 16 0.0
RAM 215260 215260 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1622188 1622236 48 0.0
RAM 211548 211548 0 0.0
light cy8ckit_062s2_43012 FLASH 1469708 1469724 16 0.0
RAM 197420 197420 0 0.0
lock cy8ckit_062s2_43012 FLASH 1503284 1503332 48 0.0
RAM 225252 225252 0 0.0
qpg lighting-app qpg6200+debug FLASH 844588 844652 64 0.0
RAM 127956 127964 8 0.0
lock-app qpg6200+debug FLASH 783296 783392 96 0.0
RAM 118904 118912 8 0.0
realtek light-switch-app rtl8777g FLASH 688168 688192 24 0.0
RAM 101756 101764 8 0.0
lighting-app rtl8777g FLASH 729224 729240 16 0.0
RAM 102036 102044 8 0.0
stm32 light STM32WB5MM-DK FLASH 477940 477964 24 0.0
RAM 141468 141476 8 0.0
telink all-devices-app tl7218x FLASH 810468 810492 24 0.0
RAM 97196 97196 0 0.0
tlsr9118bdk40d FLASH 603924 603944 20 0.0
RAM 120152 120152 0 0.0
bridge-app tl7218x FLASH 731372 731396 24 0.0
RAM 95864 95864 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 851308 851332 24 0.0
RAM 44332 44332 0 0.0
tl7218x FLASH 842636 842660 24 0.0
RAM 99656 99656 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 731434 731466 32 0.0
RAM 55980 55980 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 794660 794692 32 0.0
RAM 75164 75164 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 731364 731396 32 0.0
RAM 33468 33468 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 614092 614112 20 0.0
RAM 118496 118496 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 840750 840778 28 0.0
RAM 97364 97364 0 0.0

@jtrejoespinoza-grid jtrejoespinoza-grid marked this pull request as ready for review May 28, 2026 17:05

@r-recchia r-recchia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

PR #72177: Size comparison from b47b58c to 8a3aaa5

Full report (21 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, nrfconnect, psoc6, qpg, realtek, stm32)
platform target config section b47b58c 8a3aaa5 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1094288 1094288 0 0.0
RAM 144882 144882 0 0.0
bl616 lighting-app bl616+thread FLASH 1105604 1105604 0 0.0
RAM 104280 104280 0 0.0
bl616+wifi+shell FLASH 1593384 1593384 0 0.0
RAM 98176 98176 0 0.0
bl702 lighting-app bl702+eth FLASH 1057262 1057262 0 0.0
RAM 108525 108525 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 896094 896094 0 0.0
RAM 105908 105908 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 777008 777008 0 0.0
RAM 103404 103404 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 789760 789760 0 0.0
RAM 108684 108684 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 738868 738868 0 0.0
RAM 97612 97612 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 719040 719040 0 0.0
RAM 97644 97644 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 569106 569106 0 0.0
RAM 205112 205112 0 0.0
lock CC3235SF_LAUNCHXL FLASH 596658 596658 0 0.0
RAM 205272 205272 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 834496 834496 0 0.0
RAM 157693 157693 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1737236 1737236 0 0.0
RAM 215412 215412 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1625916 1625916 0 0.0
RAM 211604 211604 0 0.0
light cy8ckit_062s2_43012 FLASH 1470220 1470220 0 0.0
RAM 197436 197436 0 0.0
lock cy8ckit_062s2_43012 FLASH 1503676 1503676 0 0.0
RAM 225268 225268 0 0.0
qpg lighting-app qpg6200+debug FLASH 842424 842424 0 0.0
RAM 127908 127908 0 0.0
lock-app qpg6200+debug FLASH 782260 782260 0 0.0
RAM 118840 118840 0 0.0
realtek light-switch-app rtl8777g FLASH 688816 688816 0 0.0
RAM 101780 101780 0 0.0
lighting-app rtl8777g FLASH 729760 729760 0 0.0
RAM 102052 102052 0 0.0
stm32 light STM32WB5MM-DK FLASH 478464 478464 0 0.0
RAM 141492 141492 0 0.0

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

PR #72177: Size comparison from b47b58c to f7fdf7c

Full report (35 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, psoc6, qpg, realtek, stm32, telink)
platform target config section b47b58c f7fdf7c change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1094288 1094288 0 0.0
RAM 144882 144882 0 0.0
bl616 lighting-app bl616+thread FLASH 1105604 1105604 0 0.0
RAM 104280 104280 0 0.0
bl616+wifi+shell FLASH 1593384 1593384 0 0.0
RAM 98176 98176 0 0.0
bl702 lighting-app bl702+eth FLASH 1057262 1057262 0 0.0
RAM 108525 108525 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 896094 896094 0 0.0
RAM 105908 105908 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 777008 777008 0 0.0
RAM 103404 103404 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 789760 789760 0 0.0
RAM 108684 108684 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 738868 738868 0 0.0
RAM 97612 97612 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 719040 719040 0 0.0
RAM 97644 97644 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 569106 569106 0 0.0
RAM 205112 205112 0 0.0
lock CC3235SF_LAUNCHXL FLASH 596658 596658 0 0.0
RAM 205272 205272 0 0.0
efr32 lighting-app BRD4187C FLASH 1094308 1094308 0 0.0
RAM 135256 135256 0 0.0
lock-app BRD4187C FLASH 994320 994320 0 0.0
RAM 131292 131292 0 0.0
BRD4338a FLASH 799169 799169 0 0.0
RAM 243432 243432 0 0.0
esp32 all-clusters-app c3devkit DRAM 99876 99876 0 0.0
FLASH 1623944 1623944 0 0.0
IRAM 94776 94776 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 834496 834496 0 0.0
RAM 157693 157693 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1737236 1737236 0 0.0
RAM 215412 215412 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1625916 1625916 0 0.0
RAM 211604 211604 0 0.0
light cy8ckit_062s2_43012 FLASH 1470220 1470220 0 0.0
RAM 197436 197436 0 0.0
lock cy8ckit_062s2_43012 FLASH 1503676 1503676 0 0.0
RAM 225268 225268 0 0.0
qpg lighting-app qpg6200+debug FLASH 842424 842424 0 0.0
RAM 127908 127908 0 0.0
lock-app qpg6200+debug FLASH 782260 782260 0 0.0
RAM 118840 118840 0 0.0
realtek light-switch-app rtl8777g FLASH 688816 688816 0 0.0
RAM 101780 101780 0 0.0
lighting-app rtl8777g FLASH 729760 729760 0 0.0
RAM 102052 102052 0 0.0
stm32 light STM32WB5MM-DK FLASH 478464 478464 0 0.0
RAM 141492 141492 0 0.0
telink all-devices-app tl7218x FLASH 833912 833912 0 0.0
RAM 99028 99028 0 0.0
tlsr9118bdk40d FLASH 625238 625238 0 0.0
RAM 120160 120160 0 0.0
bridge-app tl7218x FLASH 733700 733700 0 0.0
RAM 97700 97700 0 0.0
light-app-ota-compress-lzma-factory-data tl3218x FLASH 800190 800190 0 0.0
RAM 42380 42380 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl7218x FLASH 845370 845370 0 0.0
RAM 101492 101492 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 734192 734192 0 0.0
RAM 57816 57816 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 795254 795254 0 0.0
RAM 75176 75176 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 734066 734066 0 0.0
RAM 34472 34472 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 614710 614710 0 0.0
RAM 118508 118508 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 841318 841322 4 0.0
RAM 97376 97376 0 0.0

@mergify

mergify Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

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.

[TC-SU] Implement a named pipe cmd on OTA Provider to handle the ApplyUpdateRequest

2 participants