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

[Tests] Add tests to TestCluster.yaml for unsupported attributes, long octet string and lists. #7741

Conversation

vivien-apple
Copy link
Contributor

Problem

Currently there is no tests for unsupported attributes, not long octet string. And the current tests for attributes of type List does not check the content, just that the return status is a success.

That's an issue since #7634 was sort of green, but there were issues for all those.

Change overview

  • Add a test for an attribute that is not supported on the server side
  • Add some tests that check the length of List attributes when they are returned
  • Add some tests for LONG_OCTET_STRING
  • Update src/app/util since it was truncating the response to a max size of uint8_t
  • Update the template for encoder-src.zapt since it was not putting the right size when writing attribute with a size > uint8_t.
  • Update src/app/clusters/test-cluster-server/ to write some content for the LIST attribute
  • Update gen/ folders

Testing

  • Tests have been added to src/app/tests/suites/TestCluster.yaml

@github-actions
Copy link

Size increase report for "esp32-example-build" from 01ee80e

File Section File VM
chip-all-clusters-app.elf .flash.rodata 1032 1032
chip-all-clusters-app.elf .dram0.bss 0 1000
chip-all-clusters-app.elf .flash.text 120 120
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

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

sections,vmsize,filesize
.flash.rodata,1032,1032
.dram0.bss,1000,0
.debug_info,0,274
.debug_line,0,255
.debug_loc,0,190
.flash.text,120,120
.debug_str,0,29
.debug_ranges,0,-8
[Unmapped],0,-1032

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

sections,vmsize,filesize


@github-actions
Copy link

Size increase report for "nrfconnect-example-build" from 01ee80e

File Section File VM
chip-lock.elf device_handles 12 12
chip-lock.elf text 4 4
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

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

sections,vmsize,filesize
.debug_loc,0,68
device_handles,12,12
.debug_line,0,4
text,4,4

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

sections,vmsize,filesize


@woody-apple woody-apple merged commit 6e64fbf into project-chip:master Jun 19, 2021
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
…g octet string and lists. (project-chip#7741)

* Update src/app/util to not use uint8_t for emAfSend and update encoder-src.zapt template to put the right size when writing an attribute

* Add LONG_OCTET_STRING to TestCluster and an attribute that is not supported on the server side

* Add a test for unsupported attributes and a test for LONG_OCTET_STRING

* Update templates and src/app/clusters/test-cluster-server

* Add an helper for c++ literal suffix

* Update gen/ folders
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.

None yet

4 participants