8000 Increase unit test code coverage of `ble/` by 1.9% by AniDashyan · Pull Request #39890 · project-chip/connectedhomeip · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Increase unit test code coverage of ble/ by 1.9% #39890

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

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

AniDashyan
Copy link
@AniDashyan AniDashyan commented Jul 7, 2025

Summary

This PR adds comprehensive unit tests for the BleLayer::NewConnectionByDiscriminators method in TestBleLayer.cpp, increasing test coverage of ble/ folder from 67.2% to 69.1%. The tests cover the following scenarios:

  • Connection attempt with an uninitialized BleLayer
  • Connection attempt without a configured BleConnectionDelegate
  • Connection attempt with a null BLE transport
  • Successful connection establishment (via OnSuccess callback)
  • Connection failure handling (via OnError callback)
  • Edge case with an empty discriminator list

Implementation Notes

  • Tests are limited to single discriminator scenarios due to the BLE_LAYER_NUM_BLE_ENDPOINTS macro being set to 1, restricting BleLayer to one connection at a time. Multiple OnSuccess callback calls when multiple discriminators match cannot be tested at the moment beacuse of this endpoint limitation.
  • Created BleLayerTestAccess accessor class in BleLayerTestAccess.h to access private member mConnectionDelegate and OnConnectionComplete method of BleLayer for testing purposes, following the testing guidelines defined in the Connected Home IP unit testing documentation
  • OnSuccess and OnError callback validation is achieved through custom lambda functions implemented specifically for testing purposes to simulate connection success/failure scenarios.

Related issues

Main Issue #37732

Testing

This PR only adds new unit tests. No changes made to production code.

@CLAassistant
Copy link
CLAassistant commented Jul 7, 2025

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the ble label Jul 7, 2025
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 aims to increase unit test coverage for the ble/ directory by adding tests for BleLayer::NewConnectionByDiscriminators. The changes introduce a test accessor for BleLayer and several new test cases. While the new tests cover various scenarios like initialization failures and delegate issues, the core success and error path tests have logical flaws in how they simulate and verify callbacks. I've also pointed out a few minor issues in comments and build files. Addressing the issues in the test logic is important to ensure the BleLayer's callback mechanism is correctly validated.

Copy link
github-actions bot commented Jul 7, 2025

PR #39890: Size comparison from 961f1c3 to 1cc4418

Full report (1 build for stm32)
platform target config section 961f1c3 1cc4418 change % change
stm32 light STM32WB5MM-DK FLASH 466276 466276 0 0.0
RAM 141376 141376 0 0.0

@AniDashyan AniDashyan marked this pull request as draft July 7, 2025 16:54
Copy link
github-actions bot commented Jul 8, 2025

PR #39890: Size comparison from 961f1c3 to 6cae5e4

Full report (1 build for stm32)
platform target config section 961f1c3 6cae5e4 change % change
stm32 light STM32WB5MM-DK FLASH 466276 466276 0 0.0
RAM 141376 141376 0 0.0

@AniDashyan AniDashyan force-pushed the unit-tests-ble-layer branch 2 times, most recently from c41cbcd to efdcd51 Compare July 8, 2025 14:03
Copy link
github-actions bot commented Jul 8, 2025

PR #39890: Size comparison from 2f03cfa to efdcd51

Full report (1 build for stm32)
platform target config section 2f03cfa efdcd51 change % change
stm32 light STM32WB5MM-DK FLASH 466276 466276 0 0.0
RAM 141376 141376 0 0.0

@@ -224,7 +231,7 @@ class DLL_EXPORT BleLayer
kState_NotInitialized = 0,
kState_Initialized = 1,
kState_Disconnecting = 2
} mState; ///< [READ-ONLY] external access is deprecated, use IsInitialized() / IsBleClosing()
} mState; ///< [READ-ONLY] external access is deprecated, use () / IsBleClosing()
Copy link
Contributor

Choose a reason for hiding this comment

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

Why was the bot's (correct) comment resolved without actually resolving the issue?

@@ -354,6 +361,7 @@ class DLL_EXPORT BleLayer

static void OnConnectionComplete(void * appState, BLE_CONNECTION_OBJECT connObj);
static void OnConnectionError(void * appState, CHIP_ERROR err);

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

Copy link
Author

Choose a reason for hiding this comment

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

Done. Thank you.


// Create a list of discriminators
SetupDiscriminator discriminators[] = { SetupDiscriminator(), SetupDiscriminator() };
Span<const SetupDiscriminator> discriminatorsSpan(discriminators, 2);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Span<const SetupDiscriminator> discriminatorsSpan(discriminators, 2);
Span<const SetupDiscriminator> discriminatorsSpan(discriminators);

Copy link
Author

Choose a reason for hiding this comment

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

Done

// Checks that the connection could not be established due to an error
TEST_F(TestBleLayer, NewConnectionByDiscriminatorsError)
{
chip::Test::BleLayerTestAccess access(this);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the chip:: prefix here and elsewhere in this PR? Is this not all inside namespace chip?

Copy link
Author

Choose a reason for hiding this comment

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

The chip:: prefix here is needed, because otherwise compiler identifies Test as pw::unit_test::internal::Test.

access.SetConnectionDelegate(nullptr);

SetupDiscriminator discriminators[] = { SetupDiscriminator(), SetupDiscriminator() };
Span<const SetupDiscriminator> discriminatorsSpan(discriminators, 2);
Copy link
Contributor

Choose a reason for hiding this comment

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

Please drop the extra , 2 various places. I'll stop commenting on this.

Copy link
Author

Choose a reason for hiding this comment

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

Thank you for the review. This PR is still a draft, I'll make the changes based on your feedback.

@AniDashyan AniDashyan force-pushed the unit-tests-ble-layer branch from aafb339 to 7b4f187 Compare July 10, 2025 13:59
Copy link

PR #39890: Size comparison from 1446be8 to 7b4f187

Full report (2 builds for cc32xx)
platform target config section 1446be8 7b4f187 change % change
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 549546 549546 0 0.0
RAM 205144 205144 0 0.0
lock CC3235SF_LAUNCHXL FLASH 582666 582666 0 0.0
RAM 205344 205344 0 0.0

@AniDashyan AniDashyan force-pushed the unit-tests-ble-layer branch from d19f134 to bc25c93 Compare July 10, 2025 15:06
@heinsaar heinsaar linked an issue Jul 10, 2025 that may be closed by this pull request
Copy link
github-actions bot commented Jul 10, 2025

PR #39890: Size comparison from 1446be8 to bc25c93

Full report (72 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 1446be8 bc25c93 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1103360 1103360 0 0.0
RAM 179026 179026 0 0.0
bl702 lighting-app bl702+eth FLASH 656508 656508 0 0.0
RAM 134977 134977 0 0.0
bl702+wifi FLASH 833946 833946 0 0.0
RAM 124541 124541 0 0.0
bl706+mfd+rpc+littlefs FLASH 1066320 1066320 0 0.0
RAM 117397 117397 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 895866 895866 0 0.0
RAM 105676 105676 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 979584 979584 0 0.0
RAM 109876 109876 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 764160 764160 0 0.0
RAM 103368 103368 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 775836 775836 0 0.0
RAM 108536 108536 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 721968 721968 0 0.0
RAM 96940 96940 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 706268 706268 0 0.0
RAM 97148 97148 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 549546 549546 0 0.0
RAM 205144 205144 0 0.0
lock CC3235SF_LAUNCHXL FLASH 582666 582666 0 0.0
RAM 205344 205344 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 663637 663637 0 0.0
RAM 77472 77472 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 683489 683489 0 0.0
RAM 80112 80112 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 683489 683489 0 0.0
RAM 80112 80112 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 640421 640421 0 0.0
RAM 72540 72540 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 625021 625021 0 0.0
RAM 73784 73784 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 644649 644649 0 0.0
RAM 76336 76336 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 644649 644649 0 0.0
RAM 76336 76336 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 645957 645957 0 0.0
RAM 76784 76784 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 665673 665673 0 0.0
RAM 79336 79336 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 665673 665673 0 0.0
RAM 79336 79336 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 620633 620633 0 0.0
RAM 70888 70888 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 640485 640485 0 0.0
RAM 73520 73520 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 640485 640485 0 0.0
RAM 73520 73520 0 0.0
efr32 lock-app BRD4187C FLASH 948260 948260 0 0.0
RAM 131528 131528 0 0.0
BRD4338a FLASH 749748 749740 -8 -0.0
RAM 203072 203072 0 0.0
window-app BRD4187C FLASH 1041592 1041584 -8 -0.0
RAM 127656 127656 0 0.0
esp32 all-clusters-app c3devkit DRAM 102272 102272 0 0.0
FLASH 1781630 1781630 0 0.0
IRAM 83862 83862 0 0.0
m5stack DRAM 121156 121156 0 0.0
FLASH 1748822 1748822 0 0.0
IRAM 117071 117071 0 0.0
linux air-purifier-app debug unknown 4856 4856 0 0.0
FLASH 2801830 2801830 0 0.0
RAM 117320 117320 0 0.0
all-clusters-app debug unknown 5672 5672 0 0.0
FLASH 6205500 6205500 0 0.0
RAM 531248 531248 0 0.0
all-clusters-minimal-app debug unknown 5536 5536 0 0.0
FLASH 5479096 5479096 0 0.0
RAM 228008 228008 0 0.0
bridge-app debug unknown 5568 5568 0 0.0
FLASH 4812442 4812442 0 0.0
RAM 207712 207712 0 0.0
camera-app debug unknown 8976 8976 0 0.0
FLASH 6939291 6939291 0 0.0
RAM 230024 230024 0 0.0
camera-controller debug unknown 9216 9216 0 0.0
FLASH 14374683 14374683 0 0.0
RAM 661400 661400 0 0.0
chip-tool debug unknown 6272 6272 0 0.0
FLASH 14723589 14723589 0 0.0
RAM 654912 654912 0 0.0
chip-tool-ipv6only arm64 unknown 40656 40656 0 0.0
FLASH 12700111 12700111 0 0.0
RAM 701208 701208 0 0.0
closure-app debug unknown 5536 5536 0 0.0
FLASH 4799480 4799480 0 0.0
RAM 200616 200616 0 0.0
fabric-admin debug unknown 5952 5952 0 0.0
FLASH 12785693 12785693 0 0.0
RAM 653944 653944 0 0.0
fabric-bridge-app debug unknown 4816 4816 0 0.0
FLASH 4598658 4598658 0 0.0
RAM 193424 193424 0 0.0
fabric-sync debug unknown 5056 5056 0 0.0
FLASH 5746509 5746509 0 0.0
RAM 491760 491760 0 0.0
lighting-app debug+rpc+ui unknown 6280 6280 0 0.0
FLASH 5699089 5699089 0 0.0
RAM 209944 209944 0 0.0
lock-app debug unknown 5488 5488 0 0.0
FLASH 4841048 4841048 0 0.0
RAM 197192 197192 0 0.0
ota-provider-app debug unknown 4856 4856 0 0.0
FLASH 4451256 4451256 0 0.0
RAM 186112 186112 0 0.0
ota-requestor-app debug unknown 4736 4736 0 0.0
FLASH 4523380 4523380 0 0.0
RAM 188984 188984 0 0.0
shell debug unknown 4288 4288 0 0.0
FLASH 3081372 3081372 0 0.0
RAM 147344 147344 0 0.0
thermostat-no-ble arm64 unknown 9832 9832 0 0.0
FLASH 4238911 4238911 0 0.0
RAM 233304 233304 0 0.0
tv-app debug unknown 5824 5824 0 0.0
FLASH 6110781 6110781 0 0.0
RAM 616008 616008 0 0.0
tv-casting-app debug unknown 5352 5352 0 0.0
FLASH 12877613 12877613 0 0.0
RAM 771504 771504 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 889296 889296 0 0.0
RAM 166162 166162 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 897368 897368 0 0.0
RAM 145100 145100 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 859824 859824 0 0.0
RAM 141049 141049 0 0.0
nxp contact mcxw71+release FLASH 625896 625896 0 0.0
RAM 63164 63164 0 0.0
lock mcxw71+release FLASH 777160 777160 0 0.0
RAM 67820 67820 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1632996 1632996 0 0.0
RAM 211104 211104 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1577204 1577204 0 0.0
RAM 208472 208472 0 0.0
light cy8ckit_062s2_43012 FLASH 1449788 1449788 0 0.0
RAM 197184 197184 0 0.0
lock cy8ckit_062s2_43012 FLASH 1482156 1482156 0 0.0
RAM 224904 224904 0 0.0
qpg lighting-app qpg6200+debug FLASH 744888 744888 0 0.0
RAM 94220 94220 0 0.0
lock-app qpg6200+debug FLASH 754644 754644 0 0.0
RAM 94248 94248 0 0.0
stm32 light STM32WB5MM-DK FLASH 466332 466332 0 0.0
RAM 141376 141376 0 0.0
telink bridge-app tl7218x FLASH 703404 703404 0 0.0
RAM 93600 93600 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 795138 795138 0 0.0
RAM 44016 44016 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 783544 783544 0 0.0
RAM 100912 100912 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 710830 710830 0 0.0
RAM 54240 54240 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 747424 747424 0 0.0
RAM 77404 77404 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 724150 724150 0 0.0
RAM 36996 36996 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 603702 603702 0 0.0
RAM 112532 112532 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 819098 819102 4 0.0
RAM 99164 99164 0 0.0
tizen all-clusters-app arm unknown 5096 5096 0 0.0
FLASH 1698892 1698892 0 0.0
RAM 91444 91444 0 0.0
chip-tool-ubsan arm unknown 20756 20756 0 0.0
FLASH 21047082 21047082 0 0.0
RAM 9155060 9155060 0 0.0

Ani Dashyan and others added 15 commits July 11, 2025 10:55
Adds a  test to callback to the BLE layer to notify when a connection is complete.

This change also adds a test case to verify the callback is working.
- The old BleLayerAccess.h is removed -

-`CallOnConnectionComplete` function is added
to `BleLayerTestAccess.h` as a wrapper to `OnConnectionComplete` function of `BleLayer` to test the new callback functionality.
It tries to ensure that the connection delegate is properly set before
attempting to establish a connection, preventing potential
incorrect state errors.
in the test BLE layer. This allows for better verification
of connection establishment success and failure scenarios.
Refactors the Ble connection success test by simplifying the OnSuccess callback invocation and adding assertions to verify the connection and error counts, ensuring more robust test coverage.
Introduces validation to handle empty discriminator Span in BLE connection logic, returning an error for invalid arguments. Adds unit tests to cover scenarios such as uninitialized states, missing connection delegates, and empty discriminator spans.
Introduces a new test to validate error handling during BLE
connection establishment using discriminators.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
@AniDashyan AniDashyan force-pushed the unit-tests-ble-layer branch from bc25c93 to 7893a87 Compare July 11, 2025 10:55
Copy link
github-actions bot commented Jul 11, 2025

PR #39890: Size comparison from bde480e to 7893a87

Full report (45 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, nrfconnect, psoc6, qpg, stm32, telink, tizen)
platform target config section bde480e 7893a87 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1102622 1102622 0 0.0
RAM 179010 179010 0 0.0
bl702 lighting-app bl702+eth FLASH 656030 656030 0 0.0
RAM 134961 134961 0 0.0
bl702+wifi FLASH 833212 833212 0 0.0
RAM 124517 124517 0 0.0
bl706+mfd+rpc+littlefs FLASH 1065330 1065330 0 0.0
RAM 117373 117373 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 894876 894876 0 0.0
RAM 105660 105660 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 978594 978594 0 0.0
RAM 109852 109852 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 763128 763128 0 0.0
RAM 103368 103368 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 774668 774668 0 0.0
RAM 108536 108536 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 721008 721008 0 0.0
RAM 96940 96940 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 705300 705300 0 0.0
RAM 97148 97148 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 548850 548850 0 0.0
RAM 205144 205144 0 0.0
lock CC3235SF_LAUNCHXL FLASH 581842 581842 0 0.0
RAM 205344 205344 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 662613 662613 0 0.0
RAM 77472 77472 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 682465 682465 0 0.0
RAM 80112 80112 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 682465 682465 0 0.0
RAM 80112 80112 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 639397 639397 0 0.0
RAM 72540 72540 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 623837 623837 0 0.0
RAM 73784 73784 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 643473 643473 0 0.0
RAM 76336 76336 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 643473 643473 0 0.0
RAM 76336 76336 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 644797 644797 0 0.0
RAM 76784 76784 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 664513 664513 0 0.0
RAM 79336 79336 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 664513 664513 0 0.0
RAM 79336 79336 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 619577 619577 0 0.0
RAM 70888 70888 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 639429 639429 0 0.0
RAM 73520 73520 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 639429 639429 0 0.0
RAM 73520 73520 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 888100 888100 0 0.0
RAM 166162 166162 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 897252 897252 0 0.0
RAM 145100 145100 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 858424 858424 0 0.0
RAM 141049 141049 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1632532 1632532 0 0.0
RAM 211104 211104 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1576708 1576708 0 0.0
RAM 208472 208472 0 0.0
light cy8ckit_062s2_43012 FLASH 1449500 1449500 0 0.0
RAM 197184 197184 0 0.0
lock cy8ckit_062s2_43012 FLASH 1481756 1481756 0 0.0
RAM 224904 224904 0 0.0
qpg lighting-app qpg6200+debug FLASH 743856 743856 0 0.0
RAM 94220 94220 0 0.0
lock-app qpg6200+debug FLASH 753476 753476 0 0.0
RAM 94248 94248 0 0.0
stm32 light STM32WB5MM-DK FLASH 465292 465292 0 0.0
RAM 141376 141376 0 0.0
telink bridge-app tl7218x FLASH 702340 702340 0 0.0
RAM 93600 93600 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 794072 794072 0 0.0
RAM 44016 44016 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 782478 782478 0 0.0
RAM 100912 100912 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 709590 709590 0 0.0
RAM 54240 54240 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 746184 746184 0 0.0
RAM 77404 77404 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 722910 722910 0 0.0
RAM 36996 36996 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 603014 603014 0 0.0
RAM 112532 112532 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 818032 818036 4 0.0
RAM 99164 99164 0 0.0
tizen all-clusters-app arm unknown 5096 5096 0 0.0
FLASH 1695816 1695816 0 0.0
RAM 91444 91444 0 0.0
chip-tool-ubsan arm unknown 20764 20764 0 0.0
FLASH 21066690 21066690 0 0.0
RAM 9165440 9165440 0 0.0

Copy link
github-actions bot commented Jul 11, 2025

PR #39890: Size comparison from f804504 to a241cd3

Full report (72 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section f804504 a241cd3 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1102622 1102622 0 0.0
RAM 179010 179010 0 0.0
bl702 lighting-app bl702+eth FLASH 656030 656030 0 0.0
RAM 134961 134961 0 0.0
bl702+wifi FLASH 833212 833212 0 0.0
RAM 124517 124517 0 0.0
bl706+mfd+rpc+littlefs FLASH 1065330 1065330 0 0.0
RAM 117373 117373 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 894876 894876 0 0.0
RAM 105660 105660 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 978594 978594 0 0.0
RAM 109852 109852 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 763128 763128 0 0.0
RAM 103368 103368 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 774668 774668 0 0.0
RAM 108536 108536 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 721008 721008 0 0.0
RAM 96940 96940 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 705300 705300 0 0.0
RAM 97148 97148 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 548850 548850 0 0.0
RAM 205144 205144 0 0.0
lock CC3235SF_LAUNCHXL FLASH 581842 581842 0 0.0
RAM 205344 205344 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 662613 662613 0 0.0
RAM 77472 77472 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 682465 682465 0 0.0
RAM 80112 80112 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 682465 682465 0 0.0
RAM 80112 80112 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 639397 639397 0 0.0
RAM 72540 72540 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 623837 623837 0 0.0
RAM 73784 73784 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 643473 643473 0 0.0
RAM 76336 76336 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 643473 643473 0 0.0
RAM 76336 76336 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 644797 644797 0 0.0
RAM 76784 76784 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 664513 664513 0 0.0
RAM 79336 79336 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 664513 664513 0 0.0
RAM 79336 79336 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 619577 619577 0 0.0
RAM 70888 70888 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 639429 639429 0 0.0
RAM 73520 73520 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 639429 639429 0 0.0
RAM 73520 73520 0 0.0
efr32 lock-app BRD4187C FLASH 955016 955016 0 0.0
RAM 126564 126564 0 0.0
BRD4338a FLASH 749468 749460 -8 -0.0
RAM 251912 251912 0 0.0
window-app BRD4187C FLASH 1049576 1049576 0 0.0
RAM 122760 122760 0 0.0
esp32 all-clusters-app c3devkit DRAM 102272 102272 0 0.0
FLASH 1780616 1780616 0 0.0
IRAM 83862 83862 0 0.0
m5stack DRAM 121156 121156 0 0.0
FLASH 1747894 1747894 0 0.0
IRAM 117071 117071 0 0.0
linux air-purifier-app debug unknown 4856 4856 0 0.0
FLASH 2796646 2796646 0 0.0
RAM 117320 117320 0 0.0
all-clusters-app debug unknown 5672 5672 0 0.0
FLASH 6198206 6198206 0 0.0
RAM 531216 531216 0 0.0
all-clusters-minimal-app debug unknown 5536 5536 0 0.0
FLASH 5473562 5473562 0 0.0
RAM 228008 228008 0 0.0
bridge-app debug unknown 5568 5568 0 0.0
FLASH 4807802 4807802 0 0.0
RAM 207712 207712 0 0.0
camera-app debug unknown 8976 8976 0 0.0
FLASH 6935131 6935131 0 0.0
RAM 230024 230024 0 0.0
camera-controller debug unknown 9216 9216 0 0.0
FLASH 14387339 14387339 0 0.0
RAM 661528 661528 0 0.0
chip-tool debug unknown 6272 6272 0 0.0
FLASH 14738305 14738305 0 0.0
RAM 655072 655072 0 0.0
chip-tool-ipv6only arm64 unknown 40672 40672 0 0.0
FLASH 12713487 12713487 0 0.0
RAM 701344 701344 0 0.0
closure-app debug unknown 5536 5536 0 0.0
FLASH 4790656 4790656 0 0.0
RAM 200584 200584 0 0.0
fabric-admin debug unknown 5952 5952 0 0.0
FLASH 12798837 12798837 0 0.0
RAM 654104 654104 0 0.0
fabric-bridge-app debug unknown 4816 4816 0 0.0
FLASH 4593134 4593134 0 0.0
RAM 193424 193424 0 0.0
fabric-sync debug unknown 5056 5056 0 0.0
FLASH 5741661 5741661 0 0.0
RAM 491728 491728 0 0.0
lighting-app debug+rpc+ui unknown 6280 6280 0 0.0
FLASH 5694593 5694593 0 0.0
RAM 209944 209944 0 0.0
lock-app debug unknown 5488 5488 0 0.0
FLASH 4836482 4836482 0 0.0
RAM 197192 197192 0 0.0
ota-provider-app debug unknown 4856 4856 0 0.0
FLASH 4446986 4446986 0 0.0
RAM 186112 186112 0 0.0
ota-requestor-app debug unknown 4736 4736 0 0.0
FLASH 4519108 4519108 0 0.0
RAM 188984 188984 0 0.0
shell debug unknown 4288 4288 0 0.0
FLASH 3076572 3076572 0 0.0
RAM 147344 147344 0 0.0
thermostat-no-ble arm64 unknown 9832 9832 0 0.0
FLASH 4236319 4236319 0 0.0
RAM 233304 233304 0 0.0
tv-app debug unknown 5824 5824 0 0.0
FLASH 6106653 6106653 0 0.0
RAM 615976 615976 0 0.0
tv-casting-app debug unknown 5352 5352 0 0.0
FLASH 12888029 12888029 0 0.0
RAM 771728 771728 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 888100 888100 0 0.0
RAM 166162 166162 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 897252 897252 0 0.0
RAM 145100 145100 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 858424 858424 0 0.0
RAM 141049 141049 0 0.0
nxp contact mcxw71+release FLASH 624800 624800 0 0.0
RAM 63164 63164 0 0.0
lock mcxw71+release FLASH 776008 776008 0 0.0
RAM 67820 67820 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1632532 1632532 0 0.0
RAM 211104 211104 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1576708 1576708 0 0.0
RAM 208472 208472 0 0.0
light cy8ckit_062s2_43012 FLASH 1449500 1449500 0 0.0
RAM 197184 197184 0 0.0
lock cy8ckit_062s2_43012 FLASH 1481756 1481756 0 0.0
RAM 224904 224904 0 0.0
qpg lighting-app qpg6200+debug FLASH 743856 743856 0 0.0
RAM 94220 94220 0 0.0
lock-app qpg6200+debug FLASH 753476 753476 0 0.0
RAM 94248 94248 0 0.0
stm32 light STM32WB5MM-DK FLASH 465292 465292 0 0.0
RAM 141376 141376 0 0.0
telink bridge-app tl7218x FLASH 702340 702340 0 0.0
RAM 93600 93600 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 794072 794072 0 0.0
RAM 44016 44016 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 782478 782478 0 0.0
RAM 100912 100912 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 709590 709590 0 0.0
RAM 54240 54240 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 746184 746184 0 0.0
RAM 77404 77404 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 722910 722910 0 0.0
RAM 36996 36996 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 603014 603014 0 0.0
RAM 112532 112532 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 818032 818036 4 0.0
RAM 99164 99164 0 0.0
tizen all-clusters-app arm unknown 5096 5096 0 0.0
FLASH 1695816 1695816 0 0.0
RAM 91444 91444 0 0.0
chip-tool-ubsan arm unknown 20764 20764 0 0.0
FLASH 21066690 21066690 0 0.0
RAM 9165440 9165440 0 0.0

@AniDashyan AniDashyan marked this pull request as ready for review July 11, 2025 14:06
@@ -383,5 +408,127 @@ TEST_F(TestBleLayer, ExceedBleConnectionEndPointLimit)
EXPECT_FALSE(HandleWriteReceivedCapabilitiesRequest(connObj));
}

TEST_F(TestBleLayer, NewBleConnectionByDiscriminatorsNotInitialized)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe consider adding a comment.

EXPECT_EQ(NewBleConnectionByDiscriminators(discriminatorsSpan, this, OnSuccess, OnError), CHIP_ERROR_INCORRECT_STATE);
}

TEST_F(TestBleLayer, NewBleConnectionByDiscriminatorsNoConnectionDelegate)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe consider adding a comment.

EXPECT_EQ(NewBleConnectionByDiscriminators(discriminatorsSpan, this, OnSuccess, OnError), CHIP_ERROR_INCORRECT_STATE);
}

TEST_F(TestBleLayer, NewBleConnectionByDiscriminatorsNoBleTransportLayer)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe consider adding a comment.

EXPECT_EQ(NewBleConnectionByDiscriminators(discriminatorsSpan, this, OnSuccess, OnError), CHIP_ERROR_INCORRECT_STATE);
}

TEST_F(TestBleLayer, NewConnectionByDiscriminatorsSuccess)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe consider adding a comment.

EXPECT_EQ(mOnConnectionErrorCount, 1);
}

TEST_F(TestBleLayer, NewConnectionByDiscriminatorsEmptySpan)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe consider adding a comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

Increase unit test code coverage of ble/ to 80%
5 participants
0