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

[TestConstraints] Add some tests for the hasValue constraints #25087

Merged

Conversation

vivien-apple
Copy link
Contributor

Problem

It seems that TestConstraints.yaml does not contains any tests for the hasValue constraints. This PR adds some.

@github-actions
Copy link

github-actions bot commented Feb 15, 2023

PR #25087: Size comparison from d2e4c4a to 73652ba

Increases (6 builds for esp32, linux, psoc6, telink)
platform target config section d2e4c4a 73652ba change % change
esp32 all-clusters-app c3devkit (read only) 1049654 1049656 2 0.0
.flash.text 1049654 1049656 2 0.0
m5stack (read/write) 501431 501435 4 0.0
.flash.rodata 250540 250544 4 0.0
linux chip-tool-ipv6only arm64 (read only) 12012612 12017188 4576 0.0
.rodata 584660 585044 384 0.1
.text 9699124 9703316 4192 0.0
psoc6 lock cy8ckit_062s2_43012 .debug_info 23171048 23171049 1 0.0
telink all-clusters-app tlsr9518adk80d text 686348 686350 2 0.0
lighting-app tlsr9518adk80d text 658702 658704 2 0.0
Decreases (4 builds for bl702, cyw30739, esp32, psoc6)
platform target config section d2e4c4a 73652ba change % change
bl702 lighting-app bl702 .debug_info 40652730 40652729 -1 -0.0
.text 954766 954764 -2 -0.0
cyw30739 light cyw930739m2evb_01 (read/write) 585990 585982 -8 -0.0
.app_xip_area 462752 462744 -8 -0.0
esp32 all-clusters-app c3devkit (read/write) 1585346 1585338 -8 -0.0
.flash.rodata 221800 221792 -8 -0.0
psoc6 all-clusters-minimal cy8ckit_062s2_43012 .debug_info 27600759 27600758 -1 -0.0
Full report (33 builds for bl602, bl702, cc13x2_26x2, cc32xx, cyw30739, esp32, linux, mbed, psoc6, qpg, telink)
platform target config section d2e4c4a 73652ba change % change
bl602 lighting-app bl602 (read/write) 1349038 1349038 0 0.0
.bss 94834 94834 0 0.0
.data 9736 9736 0 0.0
.text 1025366 1025366 0 0.0
bl602+rpc (read/write) 1394214 1394214 0 0.0
.bss 102882 102882 0 0.0
.data 10128 10128 0 0.0
.text 1056044 1056044 0 0.0
bl702 lighting-app bl702 (read only) 3358 3358 0 0.0
(read/write) 1187387 1187387 0 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 292 292 0 0.0
.bss 69937 69937 0 0.0
.bss_psram 30064 30064 0 0.0
.comment 48 48 0 0.0
.data 4056 4056 0 0.0
.debug_abbrev 1552720 1552720 0 0.0
.debug_aranges 134368 134368 0 0.0
.debug_frame 492396 492396 0 0.0
.debug_info 40652730 40652729 -1 -0.0
.debug_line 5282033 5282033 0 0.0
.debug_loc 3413875 3413875 0 0.0
.debug_ranges 372176 372176 0 0.0
.debug_str 3562662 3562662 0 0.0
.hbn 536 536 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 144 144 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 107488 107488 0 0.0
.rsvd 2960 2960 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 573911 573911 0 0.0
.symtab 173568 173568 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3358 3358 0 0.0
.text 0 0 0 0.0
954766 954764 -2 -0.0
bl702+rpc (read only) 3358 3358 0 0.0
(read/write) 1280559 1280559 0 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 292 292 0 0.0
.bss 77985 77985 0 0.0
.bss_psram 30320 30320 0 0.0
.comment 48 48 0 0.0
.data 4608 4608 0 0.0
.debug_abbrev 1701210 1701210 0 0.0
.debug_aranges 142600 142600 0 0.0
.debug_frame 520144 520144 0 0.0
.debug_info 45062087 45062087 0 0.0
.debug_line 5681029 5681029 0 0.0
.debug_loc 3610751 3610751 0 0.0
.debug_ranges 395944 395944 0 0.0
.debug_str 3966166 3966166 0 0.0
.hbn 536 536 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 160 160 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 122128 122128 0 0.0
.rsvd 2960 2960 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 634970 634970 0 0.0
.symtab 192032 192032 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3358 3358 0 0.0
.text 0 0 0 0.0
1032162 1032162 0 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 679675 679675 0 0.0
(read/write) 171540 171540 0 0.0
.bss 80908 80908 0 0.0
.data 3384 3384 0 0.0
.rodata 88379 88379 0 0.0
.text 590980 590980 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 643083 643083 0 0.0
(read/write) 157600 157600 0 0.0
.bss 80100 80100 0 0.0
.data 3384 3384 0 0.0
.rodata 78219 78219 0 0.0
.text 564544 564544 0 0.0
lock-ftd LP_CC2652R7 (read only) 676119 676119 0 0.0
(read/write) 172448 172448 0 0.0
.bss 78348 78348 0 0.0
.data 3312 3312 0 0.0
.rodata 76735 76735 0 0.0
.text 598904 598904 0 0.0
lock-mtd LP_CC2652R7 (read only) 662563 662563 0 0.0
(read/write) 181260 181260 0 0.0
.bss 73604 73604 0 0.0
.data 3312 3312 0 0.0
.rodata 103315 103315 0 0.0
.text 558768 558768 0 0.0
pump-app LP_CC2652R7 (read only) 689211 689211 0 0.0
(read/write) 160092 160092 0 0.0
.bss 78316 78316 0 0.0
.data 3276 3276 0 0.0
.rodata 90915 90915 0 0.0
.text 597816 597816 0 0.0
pump-controller-app LP_CC2652R7 (read only) 674411 674411 0 0.0
(read/write) 175004 175004 0 0.0
.bss 78428 78428 0 0.0
.data 3300 3300 0 0.0
.rodata 86923 86923 0 0.0
.text 587008 587008 0 0.0
shell LP_CC2652R7 (read only) 670946 670946 0 0.0
(read/write) 182340 182340 0 0.0
.bss 82980 82980 0 0.0
.data 3380 3380 0 0.0
.rodata 85130 85130 0 0.0
.text 585504 585504 0 0.0
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 641793 641793 0 0.0
(read/write) 204124 204124 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197528 197528 0 0.0
.comment 194 194 0 0.0
.data 1476 1476 0 0.0
.debug_abbrev 931232 931232 0 0.0
.debug_aranges 87448 87448 0 0.0
.debug_frame 300176 300176 0 0.0
.debug_info 20331214 20331214 0 0.0
.debug_line 2657689 2657689 0 0.0
.debug_loc 2790247 2790247 0 0.0
.debug_ranges 281336 281336 0 0.0
.debug_str 3004452 3004452 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 105697 105697 0 0.0
.shstrtab 232 232 0 0.0
.stab 204 204 0 0.0
.stabstr 441 441 0 0.0
.stack 2048 2048 0 0.0
.strtab 376342 376342 0 0.0
.symtab 256016 256016 0 0.0
.text 533972 533972 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 585990 585982 -8 -0.0
.app_xip_area 462752 462744 -8 -0.0
.bss 65680 65680 0 0.0
.data 736 736 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 589770 589770 0 0.0
.app_xip_area 461236 461236 0 0.0
.bss 70968 70968 0 0.0
.data 744 744 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 551026 551026 0 0.0
.app_xip_area 433292 433292 0 0.0
.bss 60224 60224 0 0.0
.data 692 692 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
esp32 all-clusters-app c3devkit (read only) 1049654 1049656 2 0.0
(read/write) 1585346 1585338 -8 -0.0
.dram0.bss 77992 77992 0 0.0
.dram0.data 13792 13792 0 0.0
.flash.rodata 221800 221792 -8 -0.0
.flash.text 1049654 1049656 2 0.0
.iram0.text 72896 72896 0 0.0
m5stack (read only) 1101519 1101519 0 0.0
(read/write) 501431 501435 4 0.0
.dram0.bss 83040 83040 0 0.0
.dram0.data 34080 34080 0 0.0
.flash.rodata 250540 250544 4 0.0
.flash.text 1096135 1096135 0 0.0
.iram0.text 124855 124855 0 0.0
linux chip-tool-ipv6only arm64 (read only) 12012612 12017188 4576 0.0
(read/write) 728632 728632 0 0.0
.bss 34248 34248 0 0.0
.data 3008 3008 0 0.0
.data.rel.ro 670872 670872 0 0.0
.dynamic 560 560 0 0.0
.got 15304 15304 0 0.0
.init 24 24 0 0.0
.init_array 208 208 0 0.0
.rodata 584660 585044 384 0.1
.text 9699124 9703316 4192 0.0
thermostat-no-ble arm64 (read only) 2516868 2516868 0 0.0
(read/write) 145320 145320 0 0.0
.bss 56488 56488 0 0.0
.data 1824 1824 0 0.0
.data.rel.ro 77544 77544 0 0.0
.dynamic 560 560 0 0.0
.got 5408 5408 0 0.0
.init 24 24 0 0.0
.init_array 432 432 0 0.0
.rodata 151232 151232 0 0.0
.text 2103344 2103344 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2467848 2467848 0 0.0
.bss 215932 215932 0 0.0
.data 5880 5880 0 0.0
.text 1430492 1430492 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 840832 840832 0 0.0
(read/write) 1760172 1760172 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 189840 189840 0 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2672 2672 0 0.0
.debug_abbrev 1254734 1254734 0 0.0
.debug_aranges 111504 111504 0 0.0
.debug_frame 374600 374600 0 0.0
.debug_info 28053816 28053816 0 0.0
.debug_line 3792795 3792795 0 0.0
.debug_loc 3684779 3684779 0 0.0
.debug_ranges 363064 363064 0 0.0
.debug_str 3512768 3512768 0 0.0
.heap 840832 840832 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 579468 579468 0 0.0
.symtab 425232 425232 0 0.0
.text 0 0 0 0.0
1559272 1559272 0 0.0
.zero.table 8 8 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 841648 841648 0 0.0
(read/write) 1701052 1701052 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 189032 189032 0 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2664 2664 0 0.0
.debug_abbrev 1240277 1240277 0 0.0
.debug_aranges 110768 110768 0 0.0
.debug_frame 377036 377036 0 0.0
.debug_info 27600759 27600758 -1 -0.0
.debug_line 3801260 3801260 0 0.0
.debug_loc 3668394 3668394 0 0.0
.debug_ranges 361032 361032 0 0.0
.debug_str 3498521 3498521 0 0.0
.heap 841648 841648 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 540079 540079 0 0.0
.symtab 410512 410512 0 0.0
.text 1500968 1500968 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
light cy8ckit_062s2_43012 (read only) 849960 849960 0 0.0
(read/write) 1614340 1614340 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 180920 180920 0 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2464 2464 0 0.0
.debug_abbrev 1074704 1074704 0 0.0
.debug_aranges 102976 102976 0 0.0
.debug_frame 347296 347296 0 0.0
.debug_info 22942034 22942034 0 0.0
.debug_line 3353260 3353260 0 0.0
.debug_loc 3347831 3347831 0 0.0
.debug_ranges 320208 320208 0 0.0
.debug_str 3301478 3301478 0 0.0
.heap 849960 849960 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 475861 475861 0 0.0
.symtab 378288 378288 0 0.0
.text 1422568 1422568 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
lock cy8ckit_062s2_43012 (read only) 844984 844984 0 0.0
(read/write) 1648156 1648156 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 185888 185888 0 0.0
.comment 200 200 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2472 2472 0 0.0
.debug_abbrev 1076447 1076447 0 0.0
.debug_aranges 103416 103416 0 0.0
.debug_frame 349172 349172 0 0.0
.debug_info 23171048 23171049 1 0.0
.debug_line 3354873 3354873 0 0.0
.debug_loc 3369605 3369605 0 0.0
.debug_ranges 322120 322120 0 0.0
.debug_str 3318282 3318282 0 0.0
.heap 844984 844984 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 478613 478613 0 0.0
.symtab 380480 380480 0 0.0
.text 1451408 1451408 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1150492 1150492 0 0.0
.bss 99932 99932 0 0.0
.data 848 848 0 0.0
.text 597592 597592 0 0.0
lock-app qpg6105+debug (read/write) 1117820 1117820 0 0.0
.bss 96428 96428 0 0.0
.data 860 860 0 0.0
.text 564916 564916 0 0.0
telink all-clusters-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 1015380 1015380 0 0.0
bss 97936 97936 0 0.0
text 686348 686350 2 0.0
all-clusters-minimal-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 951392 951392 0 0.0
bss 96988 96988 0 0.0
text 648198 648198 0 0.0
contact-sensor-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 855804 855804 0 0.0
bss 89108 89108 0 0.0
text 578634 578634 0 0.0
light-switch-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 871564 871564 0 0.0
bss 89192 89192 0 0.0
text 592678 592678 0 0.0
lighting-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 949524 949524 0 0.0
bss 97344 97344 0 0.0
text 658702 658704 2 0.0
ota-requestor-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 882988 882988 0 0.0
bss 90144 90144 0 0.0
text 602516 602516 0 0.0
thermostat tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 875864 875864 0 0.0
bss 90584 90584 0 0.0
text 594302 594302 0 0.0

@yufengwangca yufengwangca merged commit 92d090f into project-chip:master Feb 16, 2023
Comment on lines +300 to +301
constraints:
hasValue: false
Copy link
Contributor

Choose a reason for hiding this comment

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

But.... this is not in fact generating any code to check that there is no value, if you look at the generated code!

More generally, my understanding was that hasValue was about testing for value existence, not null vs not null?

Copy link
Contributor

Choose a reason for hiding this comment

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

I had assumed python yaml parser is the one that validate these.

Copy link
Contributor

Choose a reason for hiding this comment

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

Python right now can't tell apart missing and null @andy31415 so can't correctly implement hasValue anyway.

lecndav pushed a commit to lecndav/connectedhomeip that referenced this pull request Mar 22, 2023
…t-chip#25087)

* [TestConstraints] Add some tests for the hasValue constraints

* Update generated tests content
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.

5 participants