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

Fix handling of list-typed attributes in Darwin tests. #12538

Merged

Conversation

bzbarsky-apple
Copy link
Contributor

Two issues here:

  1. asTestValue did not handle list attributes properly: it assigned
    @(0) to the NSArray*.

  2. This compiled, because we were not enabling -Werror for the build
    of the test harness.

This fixes both issues. No codegen changes, because we don't actually
have any non-excluded writable list-typed attributes yet. Which is
good, because they would not have passed CI due to crashing when we
try to treat an NSNumber* as NSArray*.

Problem

See above.

Change overview

See above.

Testing

Ran darwin tests locally and ensured they compile with the warning exclusions I put in.

Two issues here:

1) asTestValue did not handle list attributes properly: it assigned
   @(0) to the NSArray*.

2) This compiled, because we were not enabling -Werror for the build
   of the test harness.

This fixes both issues.  No codegen changes, because we don't actually
have any non-excluded writable list-typed attributes yet.  Which is
good, because they would not have passed CI due to crashing when we
try to treat an NSNumber* as NSArray*.
@github-actions
Copy link

github-actions bot commented Dec 3, 2021

PR #12538: Size comparison from c8e8696 to 715c057

Full report (39 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section c8e8696 715c057 change % change
efr32 lighting-app BRD4161A (read only) 751520 751520 0 0.0
(read/write) 120032 120032 0 0.0
.bss 118200 118200 0 0.0
.data 1828 1828 0 0.0
.text 751512 751512 0 0.0
BRD4161A+rpc (read only) 780192 780192 0 0.0
(read/write) 138336 138336 0 0.0
.bss 136400 136400 0 0.0
.data 1936 1936 0 0.0
.text 780184 780184 0 0.0
lock-app BRD4161A (read only) 725376 725376 0 0.0
(read/write) 117736 117736 0 0.0
.bss 115952 115952 0 0.0
.data 1784 1784 0 0.0
.text 725368 725368 0 0.0
window-app BRD4161A (read only) 728688 728688 0 0.0
(read/write) 118160 118160 0 0.0
.bss 116368 116368 0 0.0
.data 1792 1792 0 0.0
.text 728680 728680 0 0.0
esp32 all-clusters-app c3devkit (read only) 847818 847818 0 0.0
(read/write) 1223826 1223826 0 0.0
.dram0.bss 56576 56576 0 0.0
.dram0.data 14052 14052 0 0.0
.flash.rodata 167744 167744 0 0.0
.flash.text 847818 847818 0 0.0
.iram0.text 61394 61394 0 0.0
m5stack (read only) 918227 918227 0 0.0
(read/write) 422804 422804 0 0.0
.dram0.bss 61960 61960 0 0.0
.dram0.data 34016 34016 0 0.0
.flash.rodata 195548 195548 0 0.0
.flash.text 912843 912843 0 0.0
.iram0.text 122943 122943 0 0.0
k32w lighting-app k32w061+se05x+release (read/write) 728688 728688 0 0.0
.bss 79304 79304 0 0.0
.data 1860 1860 0 0.0
.text 641724 641724 0 0.0
lock-app k32w061+debug (read/write) 617672 617672 0 0.0
.bss 69744 69744 0 0.0
.data 1824 1824 0 0.0
.text 540304 540304 0 0.0
shell k32w061+debug (read/write) 683588 683588 0 0.0
.bss 81400 81400 0 0.0
.data 1796 1796 0 0.0
.text 594592 594592 0 0.0
linux all-clusters-app debug (read only) 1848057 1848057 0 0.0
(read/write) 124520 124520 0 0.0
.bss 50896 50896 0 0.0
.data 1120 1120 0 0.0
.data.rel.ro 67088 67088 0 0.0
.dynamic 592 592 0 0.0
.got 4120 4120 0 0.0
.init 27 27 0 0.0
.init_array 688 688 0 0.0
.rodata 148501 148501 0 0.0
.text 1556690 1556690 0 0.0
bridge-app debug+rpc (read only) 1426205 1426205 0 0.0
(read/write) 74584 74584 0 0.0
.bss 36240 36240 0 0.0
.data 1728 1728 0 0.0
.data.rel.ro 31528 31528 0 0.0
.dynamic 592 592 0 0.0
.got 3992 3992 0 0.0
.init 27 27 0 0.0
.init_array 480 480 0 0.0
.rodata 120620 120620 0 0.0
.text 1200709 1200709 0 0.0
chip-tool debug (read only) 6621365 6621365 0 0.0
(read/write) 202280 202280 0 0.0
.bss 34504 34504 0 0.0
.data 1024 1024 0 0.0
.data.rel.ro 161112 161112 0 0.0
.dynamic 592 592 0 0.0
.got 4472 4472 0 0.0
.init 27 27 0 0.0
.init_array 568 568 0 0.0
.rodata 307608 307608 0 0.0
.text 5903189 5903189 0 0.0
lighting-app debug+rpc (read only) 1710713 1710713 0 0.0
(read/write) 107616 107616 0 0.0
.bss 41936 41936 0 0.0
.data 1280 1280 0 0.0
.data.rel.ro 59024 59024 0 0.0
.dynamic 608 608 0 0.0
.got 4144 4144 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 140657 140657 0 0.0
.text 1427410 1427410 0 0.0
ota-provider-app debug (read only) 1386329 1386329 0 0.0
(read/write) 72816 72816 0 0.0
.bss 38816 38816 0 0.0
.data 928 928 0 0.0
.data.rel.ro 27880 27880 0 0.0
.dynamic 592 592 0 0.0
.got 4056 4056 0 0.0
.init 27 27 0 0.0
.init_array 520 520 0 0.0
.rodata 121448 121448 0 0.0
.text 1160194 1160194 0 0.0
ota-requestor-app debug (read only) 1490137 1490137 0 0.0
(read/write) 76784 76784 0 0.0
.bss 40960 40960 0 0.0
.data 992 992 0 0.0
.data.rel.ro 29592 29592 0 0.0
.dynamic 592 592 0 0.0
.got 4072 4072 0 0.0
.init 27 27 0 0.0
.init_array 552 552 0 0.0
.rodata 133776 133776 0 0.0
.text 1247666 1247666 0 0.0
shell debug (read only) 819625 819625 0 0.0
(read/write) 60584 60584 0 0.0
.bss 16936 16936 0 0.0
.data 256 256 0 0.0
.data.rel.ro 38936 38936 0 0.0
.dynamic 592 592 0 0.0
.got 3512 3512 0 0.0
.init 27 27 0 0.0
.init_array 344 344 0 0.0
.rodata 83570 83570 0 0.0
.text 629314 629314 0 0.0
tv-app debug (read only) 2020417 2020417 0 0.0
(read/write) 320000 320000 0 0.0
.bss 247224 247224 0 0.0
.data 2768 2768 0 0.0
.data.rel.ro 64200 64200 0 0.0
.dynamic 592 592 0 0.0
.got 4432 4432 0 0.0
.init 27 27 0 0.0
.init_array 736 736 0 0.0
.rodata 173608 173608 0 0.0
.text 1692354 1692354 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2309200 2309200 0 0.0
.bss 179628 179628 0 0.0
.data 5184 5184 0 0.0
.heap 851632 851632 0 0.0
.text 1271776 1271776 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2295592 2295592 0 0.0
.bss 173272 173272 0 0.0
.data 5496 5496 0 0.0
.heap 857680 857680 0 0.0
.text 1258192 1258192 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2268624 2268624 0 0.0
.bss 172088 172088 0 0.0
.data 5496 5496 0 0.0
.heap 858864 858864 0 0.0
.text 1231224 1231224 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1140008 1140008 0 0.0
.bss 11756 11756 0 0.0
.data 4376 4376 0 0.0
.heap 1020312 1020312 0 0.0
.text 103392 103392 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2046960 2046960 0 0.0
.bss 156732 156732 0 0.0
.data 4872 4872 0 0.0
.heap 874840 874840 0 0.0
.text 1009560 1009560 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 891455 891455 0 0.0
bss 113752 113752 0 0.0
rodata 99408 99408 0 0.0
text 602740 602740 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 854831 854831 0 0.0
bss 110100 110100 0 0.0
rodata 90768 90768 0 0.0
text 577736 577736 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 817350 817350 0 0.0
bss 115124 115124 0 0.0
rodata 94664 94664 0 0.0
text 533076 533076 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 862311 862311 0 0.0
bss 110788 110788 0 0.0
rodata 95144 95144 0 0.0
text 580992 580992 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 788466 788466 0 0.0
bss 112200 112200 0 0.0
rodata 90436 90436 0 0.0
text 511420 511420 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 497463 497463 0 0.0
bss 51820 51820 0 0.0
rodata 45852 45852 0 0.0
text 339492 339492 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 868327 868327 0 0.0
bss 110924 110924 0 0.0
rodata 96880 96880 0 0.0
text 585056 585056 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 861391 861391 0 0.0
bss 110804 110804 0 0.0
rodata 95016 95016 0 0.0
text 580116 580116 0 0.0
shell nrf52840dk_nrf52840 (read/write) 779891 779891 0 0.0
bss 109696 109696 0 0.0
rodata 73792 73792 0 0.0
text 521908 521908 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 694934 694934 0 0.0
bss 110680 110680 0 0.0
rodata 68432 68432 0 0.0
text 442512 442512 0 0.0
p6 all-clusters-app default (read/write) 2339480 2339480 0 0.0
.bss 107820 107820 0 0.0
.data 2456 2456 0 0.0
.heap 923064 923064 0 0.0
.text 1297744 1297744 0 0.0
light-app default (read/write) 2278840 2278840 0 0.0
.bss 98504 98504 0 0.0
.data 2336 2336 0 0.0
.heap 932504 932504 0 0.0
.text 1237104 1237104 0 0.0
lock-app default (read/write) 2254192 2254192 0 0.0
.bss 97160 97160 0 0.0
.data 2296 2296 0 0.0
.heap 933888 933888 0 0.0
.text 1212456 1212456 0 0.0
qpg lighting-app qpg6100+debug (read only) 510480 510480 0 0.0
(read/write) 122332 122332 0 0.0
.bss 80264 80264 0 0.0
.data 964 964 0 0.0
.text 505160 505160 0 0.0
lock-app qpg6100+debug (read only) 483288 483288 0 0.0
(read/write) 122332 122332 0 0.0
.bss 79176 79176 0 0.0
.data 916 916 0 0.0
.text 477968 477968 0 0.0
persistent-storage-app qpg6100+debug (read only) 108208 108208 0 0.0
(read/write) 122332 122332 0 0.0
.bss 36696 36696 0 0.0
.data 292 292 0 0.0
.text 102888 102888 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 794546 794546 0 0.0
bss 80328 80328 0 0.0
noinit 37160 37160 0 0.0
text 554526 554526 0 0.0

@andy31415 andy31415 merged commit 89c17fe into project-chip:master Dec 3, 2021
@bzbarsky-apple bzbarsky-apple deleted the darwin-more-test-safety branch December 3, 2021 21:33
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

6 participants