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

Enable the src/controller tests on all platforms except nrfconnect. #9638

Merged

Conversation

bzbarsky-apple
Copy link
Contributor

  1. Modify our CHIPClientCallbacks template to suppress the "possibly
    unbounded stack" warning from a VLA we know we want to remove.
  2. Don't try to link in BLELayer in the TestDevice test if BLE
    networking is disabled (so that BLELayer symbols don't actually
    exist).
  3. Heap-allocate the huge FabricTable so we don't run into compile
    errors due to a stack frame being too big in TestDevice.
  4. Fix the fact that SystemLayerImplSelect did not default-initialize
    mDispatchQueue. This matters because TestDevice does weird things
    with a separate SystemLayer that the PlatformManager does not know
    about, nor does it call InitChipStack in any case.

The tests are still disabled on nrfconnect because I could not get
them to link there so far.

Fixes #9173

Problem

Tests were disabled on Darwin, probably because the actual test BUILD.gn did not spell "darwin" right, so did not end up linking in the right things, so linking failed.

Change overview

Always link in the right things, plus the items above.

Testing

CI passes.

@todo
Copy link

todo bot commented Sep 13, 2021

This stack usage bit is not OK. See #8558 }}

{{! TODO: This stack usage bit is not OK. See https://github.com/project-chip/connectedhomeip/issues/8558 }}
#if !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstack-usage="
#endif // __clang__
void {{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}ListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback)
{
// TODO: Add actual support for array and lists.


This comment was generated by todo based on a TODO comment in bb11782 in #9638. cc @bzbarsky-apple.

@todo
Copy link

todo bot commented Sep 13, 2021

This stack usage bit is not OK. See #8558 }}

{{! TODO: This stack usage bit is not OK. See https://github.com/project-chip/connectedhomeip/issues/8558 }}
#if !defined(__clang__)
#pragma GCC diagnostic pop
#endif // __clang__
{{/if}}
{{/chip_server_cluster_attributes}}


This comment was generated by todo based on a TODO comment in bb11782 in #9638. cc @bzbarsky-apple.

src/BUILD.gn Outdated Show resolved Hide resolved
1) Modify our CHIPClientCallbacks template to suppress the "possibly
   unbounded stack" warning from a VLA we know we want to remove.
2) Don't try to link in BLELayer in the TestDevice test if BLE
   networking is disabled (so that BLELayer symbols don't actually
   exist).
3) Heap-allocate the huge FabricTable so we don't run into compile
   errors due to a stack frame being too big in TestDevice.
4) Fix the fact that SystemLayerImplSelect did not default-initialize
   mDispatchQueue.  This matters because TestDevice does weird things
   with a separate SystemLayer that the PlatformManager does not know
   about, nor does it call InitChipStack in any case.

The tests are still disabled on nrfconnect because I could not get
them to link there so far.

Fixes project-chip#9173
@github-actions
Copy link

Size increase report for "esp32-example-build" from 92d3a28

File Section File VM
chip-bridge-app.elf .flash.text 85 72
chip-shell.elf .flash.text 48 48
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-pigweed-app.elf and ./pull_artifact/chip-pigweed-app.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-persistent-storage.elf and ./pull_artifact/chip-persistent-storage.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-lock-app.elf and ./pull_artifact/chip-lock-app.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-bridge-app.elf and ./pull_artifact/chip-bridge-app.elf:

sections,vmsize,filesize
.flash.text,72,85
[Unmapped],0,-85

Comparing ./master_artifact/chip-temperature-measurement-app.elf and ./pull_artifact/chip-temperature-measurement-app.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize
.flash.text,48,48
[Unmapped],0,-48

Comparing ./master_artifact/chip-ipv6only-app.elf and ./pull_artifact/chip-ipv6only-app.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize


@bzbarsky-apple bzbarsky-apple merged commit bc2d74b into project-chip:master Sep 13, 2021
@bzbarsky-apple bzbarsky-apple deleted the enable-controller-tests branch September 13, 2021 20:14
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.

Controller/BUILD: Cannot add controller tests for certain platforms (Darwin, clang)
6 participants