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

[build] Fix SECURITY_TEST_MODE to be disabled for all builds. #12166

Merged
merged 1 commit into from
Nov 25, 2021

Conversation

turon
Copy link
Contributor

@turon turon commented Nov 23, 2021

Problem

#pragma mesage warning developers that CHIP_CONFIG_SECURITY_TEST_MODE is enabled is creating excessive noise and spam in build logs.

Also, the flag is enabled on some platforms.

Change overview

  • Use #warning instead of #pragma message so builds will fail if SECURITY_TEST_MODE is inadvertently enabled.
  • Default to disabled on all platforms.
  • Add documentation to pass treat_warnings_as_errors=false to the build when enabling SECURITY_TEST_MODE.

Testing

CI and local builds with and without flag enabled.

@github-actions
Copy link

github-actions bot commented Nov 23, 2021

PR #12166: Size comparison from 098e736 to 6c6ad42

Decreases (2 builds for qpg)
platform target config section 098e736 6c6ad42 change % change
qpg lighting-app qpg6100+debug (read only) 495384 495192 -192 -0.0
.text 490064 489872 -192 -0.0
lock-app qpg6100+debug (read only) 470328 470136 -192 -0.0
.text 465008 464816 -192 -0.0
Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 098e736 6c6ad42 change % change
efr32 lighting-app BRD4161A (read only) 752584 752584 0 0.0
(read/write) 119764 119764 0 0.0
.bss 117956 117956 0 0.0
.data 1808 1808 0 0.0
.text 752576 752576 0 0.0
BRD4161A+rpc (read only) 740084 740084 0 0.0
(read/write) 136392 136392 0 0.0
.bss 134460 134460 0 0.0
.data 1932 1932 0 0.0
.text 740076 740076 0 0.0
lock-app BRD4161A (read only) 729600 729600 0 0.0
(read/write) 117484 117484 0 0.0
.bss 115716 115716 0 0.0
.data 1764 1764 0 0.0
.text 729592 729592 0 0.0
window-app BRD4161A (read only) 733048 733048 0 0.0
(read/write) 117844 117844 0 0.0
.bss 116068 116068 0 0.0
.data 1772 1772 0 0.0
.text 733040 733040 0 0.0
esp32 all-clusters-app c3devkit (read only) 834250 834250 0 0.0
(read/write) 1222370 1222370 0 0.0
.dram0.bss 57832 57832 0 0.0
.dram0.data 14100 14100 0 0.0
.flash.rodata 165176 165176 0 0.0
.flash.text 834250 834250 0 0.0
.iram0.text 61394 61394 0 0.0
m5stack (read only) 905203 905203 0 0.0
(read/write) 421648 421648 0 0.0
.dram0.bss 63192 63192 0 0.0
.dram0.data 34064 34064 0 0.0
.flash.rodata 193112 193112 0 0.0
.flash.text 899819 899819 0 0.0
.iram0.text 122943 122943 0 0.0
k32w lighting-app k32w061+se05x+release (read/write) 708716 708716 0 0.0
.bss 77292 77292 0 0.0
.data 1920 1920 0 0.0
.text 623704 623704 0 0.0
lock-app k32w061+debug (read/write) 600048 600048 0 0.0
.bss 67732 67732 0 0.0
.data 1888 1888 0 0.0
.text 524628 524628 0 0.0
shell k32w061+debug (read/write) 665428 665428 0 0.0
.bss 78892 78892 0 0.0
.data 1856 1856 0 0.0
.text 578880 578880 0 0.0
linux all-clusters-app debug (read only) 1751481 1751481 0 0.0
(read/write) 128944 128944 0 0.0
.bss 58640 58640 0 0.0
.data 1042 1042 0 0.0
.data.rel.ro 63952 63952 0 0.0
.dynamic 592 592 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 568 568 0 0.0
.rodata 138677 138677 0 0.0
.text 1476162 1476162 0 0.0
bridge-app debug+rpc (read only) 1330957 1330957 0 0.0
(read/write) 76920 76920 0 0.0
.bss 41552 41552 0 0.0
.data 1584 1584 0 0.0
.data.rel.ro 28752 28752 0 0.0
.dynamic 592 592 0 0.0
.got 3984 3984 0 0.0
.init 27 27 0 0.0
.init_array 416 416 0 0.0
.rodata 113276 113276 0 0.0
.text 1119269 1119269 0 0.0
chip-tool debug (read only) 5923485 5923485 0 0.0
(read/write) 196224 196224 0 0.0
.bss 39896 39896 0 0.0
.data 2288 2288 0 0.0
.data.rel.ro 148488 148488 0 0.0
.dynamic 592 592 0 0.0
.got 4456 4456 0 0.0
.init 27 27 0 0.0
.init_array 480 480 0 0.0
.rodata 283930 283930 0 0.0
.text 5258565 5258565 0 0.0
lighting-app debug+rpc (read only) 1600857 1600857 0 0.0
(read/write) 110168 110168 0 0.0
.bss 47280 47280 0 0.0
.data 1234 1234 0 0.0
.data.rel.ro 56336 56336 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 544 544 0 0.0
.rodata 131633 131633 0 0.0
.text 1333186 1333186 0 0.0
ota-provider-app debug (read only) 1280873 1280873 0 0.0
(read/write) 75376 75376 0 0.0
.bss 44128 44128 0 0.0
.data 800 800 0 0.0
.data.rel.ro 25336 25336 0 0.0
.dynamic 592 592 0 0.0
.got 4048 4048 0 0.0
.init 27 27 0 0.0
.init_array 456 456 0 0.0
.rodata 114999 114999 0 0.0
.text 1067202 1067202 0 0.0
ota-requestor-app debug (read only) 1377457 1377457 0 0.0
(read/write) 79240 79240 0 0.0
.bss 46592 46592 0 0.0
.data 864 864 0 0.0
.data.rel.ro 26664 26664 0 0.0
.dynamic 592 592 0 0.0
.got 4032 4032 0 0.0
.init 27 27 0 0.0
.init_array 480 480 0 0.0
.rodata 126408 126408 0 0.0
.text 1149586 1149586 0 0.0
shell debug (read only) 804641 804641 0 0.0
(read/write) 66160 66160 0 0.0
.bss 23336 23336 0 0.0
.data 274 274 0 0.0
.data.rel.ro 38008 38008 0 0.0
.dynamic 592 592 0 0.0
.got 3560 3560 0 0.0
.init 27 27 0 0.0
.init_array 352 352 0 0.0
.rodata 79279 79279 0 0.0
.text 620258 620258 0 0.0
tv-app debug (read only) 1899561 1899561 0 0.0
(read/write) 319120 319120 0 0.0
.bss 249944 249944 0 0.0
.data 2784 2784 0 0.0
.data.rel.ro 60720 60720 0 0.0
.dynamic 592 592 0 0.0
.got 4432 4432 0 0.0
.init 27 27 0 0.0
.init_array 624 624 0 0.0
.rodata 159549 159549 0 0.0
.text 1593490 1593490 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2291296 2291296 0 0.0
.bss 180380 180380 0 0.0
.data 5232 5232 0 0.0
.heap 850832 850832 0 0.0
.text 1253896 1253896 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2275512 2275512 0 0.0
.bss 172284 172284 0 0.0
.data 5584 5584 0 0.0
.heap 858576 858576 0 0.0
.text 1238112 1238112 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2251312 2251312 0 0.0
.bss 171100 171100 0 0.0
.data 5576 5576 0 0.0
.heap 859768 859768 0 0.0
.text 1213912 1213912 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139744 1139744 0 0.0
.bss 11752 11752 0 0.0
.data 4368 4368 0 0.0
.heap 1020328 1020328 0 0.0
.text 103128 103128 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2050936 2050936 0 0.0
.bss 156280 156280 0 0.0
.data 4976 4976 0 0.0
.heap 875192 875192 0 0.0
.text 1013536 1013536 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 868635 868635 0 0.0
bss 112616 112616 0 0.0
rodata 96180 96180 0 0.0
text 584192 584192 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 831003 831003 0 0.0
bss 108968 108968 0 0.0
rodata 87364 87364 0 0.0
text 558360 558360 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 793674 793674 0 0.0
bss 113988 113988 0 0.0
rodata 91436 91436 0 0.0
text 513660 513660 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 841755 841755 0 0.0
bss 109648 109648 0 0.0
rodata 92612 92612 0 0.0
text 564044 564044 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 767062 767062 0 0.0
bss 111060 111060 0 0.0
rodata 87920 87920 0 0.0
text 493604 493604 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 497327 497327 0 0.0
bss 51824 51824 0 0.0
rodata 45780 45780 0 0.0
text 339436 339436 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 847867 847867 0 0.0
bss 109788 109788 0 0.0
rodata 94324 94324 0 0.0
text 568228 568228 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 841459 841459 0 0.0
bss 109684 109684 0 0.0
rodata 92572 92572 0 0.0
text 563664 563664 0 0.0
shell nrf52840dk_nrf52840 (read/write) 778671 778671 0 0.0
bss 109160 109160 0 0.0
rodata 73196 73196 0 0.0
text 521696 521696 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 693678 693678 0 0.0
bss 110144 110144 0 0.0
rodata 67840 67840 0 0.0
text 442304 442304 0 0.0
p6 all-clusters-app default (read/write) 2304824 2304824 0 0.0
.bss 113368 113368 0 0.0
.data 2536 2536 0 0.0
.heap 917440 917440 0 0.0
.text 1263088 1263088 0 0.0
lock-app default (read/write) 2217992 2217992 0 0.0
.bss 100960 100960 0 0.0
.data 2408 2408 0 0.0
.heap 929976 929976 0 0.0
.text 1176256 1176256 0 0.0
qpg lighting-app qpg6100+debug (read only) 495384 495192 -192 -0.0
(read/write) 114144 114144 0 0.0
.bss 50336 50336 0 0.0
.data 1016 1016 0 0.0
.text 490064 489872 -192 -0.0
lock-app qpg6100+debug (read only) 470328 470136 -192 -0.0
(read/write) 114140 114140 0 0.0
.bss 49208 49208 0 0.0
.data 972 972 0 0.0
.text 465008 464816 -192 -0.0
persistent-storage-app qpg6100+debug (read only) 105408 105408 0 0.0
(read/write) 114142 114142 0 0.0
.bss 8986 8986 0 0.0
.data 272 272 0 0.0
.text 100088 100088 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 769954 769954 0 0.0
bss 79208 79208 0 0.0
noinit 37160 37160 0 0.0
text 534636 534636 0 0.0

@andy31415
Copy link
Contributor

fast track: pr up for a while, has several checkmarks, small patch

@andy31415 andy31415 merged commit 06a59ec into project-chip:master Nov 25, 2021
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.

6 participants