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

Convert CharSpan to C++ String for proper comparison. #19476

Merged
merged 1 commit into from
Jun 10, 2022

Conversation

krypton36
Copy link
Contributor

Problem

When comparing CharSpan to C++ String, we need to convert CharSpan to a string and then do the comparison.

Change overview

  • Convert CharSpan to C++ string using the correct size and then do the comparison.

Testing

  • Validated that the input now correctly accepts the value given.

@bzbarsky-apple
Copy link
Contributor

Fast-tracking test tool change.

@github-actions
Copy link

github-actions bot commented Jun 10, 2022

PR #19476: Size comparison from 287e47a to 107e0cf

Increases (4 builds for cc13x2_26x2, linux, telink)
platform target config section 287e47a 107e0cf change % change
cc13x2_26x2 lock-ftd LP_CC2652R7 (read only) 687651 687659 8 0.0
.text 588324 588332 8 0.0
linux chip-tool debug (read only) 9816405 9816789 384 0.0
.text 7868917 7869301 384 0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 9564036 9564452 416 0.0
.text 7519188 7519604 416 0.0
telink light-switch-app tlsr9518adk80d (read/write) 786648 786656 8 0.0
text 556600 556602 2 0.0
Decreases (2 builds for cc13x2_26x2, esp32)
platform target config section 287e47a 107e0cf change % change
cc13x2_26x2 lock-ftd LP_CC2652R7 (read/write) 154300 154292 -8 -0.0
esp32 all-clusters-app c3devkit (read only) 1010926 1010924 -2 -0.0
.flash.text 1010926 1010924 -2 -0.0
Full report (41 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 287e47a 107e0cf change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 656295 656295 0 0.0
(read/write) 194584 194584 0 0.0
.bss 73772 73772 0 0.0
.data 3416 3416 0 0.0
.rodata 86511 86511 0 0.0
.text 569472 569472 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 644779 644779 0 0.0
(read/write) 157268 157268 0 0.0
.bss 72996 72996 0 0.0
.data 3356 3356 0 0.0
.rodata 90019 90019 0 0.0
.text 554440 554440 0 0.0
lock-ftd LP_CC2652R7 (read only) 687651 687659 8 0.0
(read/write) 154300 154292 -8 -0.0
.bss 71732 71732 0 0.0
.data 3280 3280 0 0.0
.rodata 98843 98843 0 0.0
.text 588324 588332 8 0.0
lock-mtd LP_CC2652R7 (read only) 637059 637059 0 0.0
(read/write) 144864 144864 0 0.0
.bss 67468 67468 0 0.0
.data 3280 3280 0 0.0
.rodata 98723 98723 0 0.0
.text 537844 537844 0 0.0
pump-app LP_CC2652R7 (read only) 669011 669011 0 0.0
(read/write) 173852 173852 0 0.0
.bss 71876 71876 0 0.0
.data 3316 3316 0 0.0
.rodata 86955 86955 0 0.0
.text 581572 581572 0 0.0
pump-controller-app LP_CC2652R7 (read only) 659575 659575 0 0.0
(read/write) 183392 183392 0 0.0
.bss 71980 71980 0 0.0
.data 3276 3276 0 0.0
.rodata 84855 84855 0 0.0
.text 574236 574236 0 0.0
shell LP_CC2652R7 (read only) 686422 686422 0 0.0
(read/write) 159952 159952 0 0.0
.bss 76068 76068 0 0.0
.data 3420 3420 0 0.0
.rodata 109582 109582 0 0.0
.text 576528 576528 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 606450 606450 0 0.0
.app_xip_area 464964 464964 0 0.0
.bss 84416 84416 0 0.0
.data 756 756 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 603550 603550 0 0.0
.app_xip_area 461920 461920 0 0.0
.bss 84592 84592 0 0.0
.data 724 724 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 611270 611270 0 0.0
.app_xip_area 470712 470712 0 0.0
.bss 83600 83600 0 0.0
.data 644 644 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 919200 919200 0 0.0
(read/write) 133424 133424 0 0.0
.bss 131312 131312 0 0.0
.data 2112 2112 0 0.0
.text 919192 919192 0 0.0
BRD4161A+rpc (read only) 953380 953380 0 0.0
(read/write) 150116 150116 0 0.0
.bss 147800 147800 0 0.0
.data 2316 2316 0 0.0
.text 953372 953372 0 0.0
BRD4161A+rs911x (read only) 794276 794276 0 0.0
(read/write) 129708 129708 0 0.0
.bss 127588 127588 0 0.0
.data 2120 2120 0 0.0
.text 794268 794268 0 0.0
lock-app BRD4161A+wf200 (read only) 962636 962636 0 0.0
(read/write) 130052 130052 0 0.0
.bss 127964 127964 0 0.0
.data 2088 2088 0 0.0
.text 962628 962628 0 0.0
window-app BRD4161A (read only) 904256 904256 0 0.0
(read/write) 133504 133504 0 0.0
.bss 131392 131392 0 0.0
.data 2108 2108 0 0.0
.text 904248 904248 0 0.0
esp32 all-clusters-app c3devkit (read only) 1010926 1010924 -2 -0.0
(read/write) 1482754 1482754 0 0.0
.dram0.bss 69400 69400 0 0.0
.dram0.data 14696 14696 0 0.0
.flash.rodata 213216 213216 0 0.0
.flash.text 1010926 1010924 -2 -0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1065355 1065355 0 0.0
(read/write) 484864 484864 0 0.0
.dram0.bss 74920 74920 0 0.0
.dram0.data 34224 34224 0 0.0
.flash.rodata 243724 243724 0 0.0
.flash.text 1059971 1059971 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 657232 657232 0 0.0
.bss 69732 69732 0 0.0
.data 2028 2028 0 0.0
.text 579672 579672 0 0.0
lock k32w061+release (read/write) 718820 718820 0 0.0
.bss 70164 70164 0 0.0
.data 2000 2000 0 0.0
.text 640856 640856 0 0.0
linux all-clusters-app debug (read only) 2907801 2907801 0 0.0
(read/write) 188240 188240 0 0.0
.bss 95776 95776 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 84200 84200 0 0.0
.dynamic 608 608 0 0.0
.got 4544 4544 0 0.0
.init 27 27 0 0.0
.init_array 1032 1032 0 0.0
.rodata 257341 257341 0 0.0
.text 2475410 2475410 0 0.0
all-clusters-minimal-app debug (read only) 2769345 2769345 0 0.0
(read/write) 179856 179856 0 0.0
.bss 94944 94944 0 0.0
.data 1920 1920 0 0.0
.data.rel.ro 76824 76824 0 0.0
.dynamic 608 608 0 0.0
.got 4496 4496 0 0.0
.init 27 27 0 0.0
.init_array 1032 1032 0 0.0
.rodata 258685 258685 0 0.0
.text 2337618 2337618 0 0.0
bridge-app debug+rpc (read only) 2247705 2247705 0 0.0
(read/write) 158688 158688 0 0.0
.bss 82944 82944 0 0.0
.data 3760 3760 0 0.0
.data.rel.ro 66200 66200 0 0.0
.dynamic 608 608 0 0.0
.got 4400 4400 0 0.0
.init 27 27 0 0.0
.init_array 728 728 0 0.0
.rodata 191104 191104 0 0.0
.text 1896690 1896690 0 0.0
chip-tool debug (read only) 9816405 9816789 384 0.0
(read/write) 623496 623496 0 0.0
.bss 25440 25440 0 0.0
.data 1088 1088 0 0.0
.data.rel.ro 590696 590696 0 0.0
.dynamic 624 624 0 0.0
.got 5000 5000 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 506869 506869 0 0.0
.text 7868917 7869301 384 0.0
chip-tool-no-interactive-ipv6only arm64 (read only) 9564036 9564452 416 0.0
(read/write) 689841 689841 0 0.0
.bss 43697 43697 0 0.0
.data 1152 1152 0 0.0
.data.rel.ro 626128 626128 0 0.0
.dynamic 528 528 0 0.0
.got 15056 15056 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 468756 468756 0 0.0
.text 7519188 7519604 416 0.0
lighting-app debug+rpc (read only) 2497617 2497617 0 0.0
(read/write) 163384 163384 0 0.0
.bss 84288 84288 0 0.0
.data 2064 2064 0 0.0
.data.rel.ro 71128 71128 0 0.0
.dynamic 608 608 0 0.0
.got 4432 4432 0 0.0
.init 27 27 0 0.0
.init_array 816 816 0 0.0
.rodata 207176 207176 0 0.0
.text 2122322 2122322 0 0.0
lock-app debug (read only) 2443617 2443617 0 0.0
(read/write) 158456 158456 0 0.0
.bss 82944 82944 0 0.0
.data 1552 1552 0 0.0
.data.rel.ro 68088 68088 0 0.0
.dynamic 608 608 0 0.0
.got 4432 4432 0 0.0
.init 27 27 0 0.0
.init_array 784 784 0 0.0
.rodata 221256 221256 0 0.0
.text 2059234 2059234 0 0.0
ota-provider-app debug (read only) 2281881 2281881 0 0.0
(read/write) 152656 152656 0 0.0
.bss 82624 82624 0 0.0
.data 1784 1784 0 0.0
.data.rel.ro 62424 62424 0 0.0
.dynamic 608 608 0 0.0
.got 4496 4496 0 0.0
.init 27 27 0 0.0
.init_array 680 680 0 0.0
.rodata 197400 197400 0 0.0
.text 1923362 1923362 0 0.0
ota-requestor-app debug (read only) 2329409 2329409 0 0.0
(read/write) 155440 155440 0 0.0
.bss 83328 83328 0 0.0
.data 1976 1976 0 0.0
.data.rel.ro 64344 64344 0 0.0
.dynamic 608 608 0 0.0
.got 4456 4456 0 0.0
.init 27 27 0 0.0
.init_array 712 712 0 0.0
.rodata 199552 199552 0 0.0
.text 1964898 1964898 0 0.0
shell debug (read only) 2599753 2599753 0 0.0
(read/write) 219384 219384 0 0.0
.bss 134568 134568 0 0.0
.data 1392 1392 0 0.0
.data.rel.ro 77664 77664 0 0.0
.dynamic 608 608 0 0.0
.got 4176 4176 0 0.0
.init 27 27 0 0.0
.init_array 936 936 0 0.0
.rodata 229842 229842 0 0.0
.text 2210690 2210690 0 0.0
thermostat-no-ble arm64 (read only) 2557804 2557804 0 0.0
(read/write) 191329 191329 0 0.0
.bss 99361 99361 0 0.0
.data 1560 1560 0 0.0
.data.rel.ro 82336 82336 0 0.0
.dynamic 528 528 0 0.0
.got 5048 5048 0 0.0
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 161316 161316 0 0.0
.text 2158976 2158976 0 0.0
tv-app debug (read only) 3051249 3051249 0 0.0
(read/write) 289800 289800 0 0.0
.bss 200200 200200 0 0.0
.data 4688 4688 0 0.0
.data.rel.ro 78472 78472 0 0.0
.dynamic 608 608 0 0.0
.got 4848 4848 0 0.0
.init 27 27 0 0.0
.init_array 952 952 0 0.0
.rodata 242784 242784 0 0.0
.text 2622754 2622754 0 0.0
tv-casting-app debug (read only) 5350353 5350353 0 0.0
(read/write) 232248 232248 0 0.0
.bss 88072 88072 0 0.0
.data 2480 2480 0 0.0
.data.rel.ro 135472 135472 0 0.0
.dynamic 608 608 0 0.0
.got 4712 4712 0 0.0
.init 27 27 0 0.0
.init_array 872 872 0 0.0
.rodata 342432 342432 0 0.0
.text 4656722 4656722 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2433320 2433320 0 0.0
.bss 208980 208980 0 0.0
.data 5896 5896 0 0.0
.text 1395964 1395964 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1195719 1195719 0 0.0
bss 141583 141583 0 0.0
rodata 155296 155296 0 0.0
text 819852 819852 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1143351 1143351 0 0.0
bss 140800 140800 0 0.0
rodata 131808 131808 0 0.0
text 791928 791928 0 0.0
p6 all-clusters-app default (read/write) 2549208 2549208 0 0.0
.bss 143408 143408 0 0.0
.data 2832 2832 0 0.0
.text 1507472 1507472 0 0.0
all-clusters-minimal-app default (read/write) 2494008 2494008 0 0.0
.bss 142616 142616 0 0.0
.data 2776 2776 0 0.0
.text 1452272 1452272 0 0.0
light-app default (read/write) 2425440 2425440 0 0.0
.bss 135728 135728 0 0.0
.data 2624 2624 0 0.0
.text 1383704 1383704 0 0.0
lock-app default (read/write) 2445848 2445848 0 0.0
.bss 135552 135552 0 0.0
.data 2600 2600 0 0.0
.text 1404112 1404112 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 786648 786656 8 0.0
bss 70860 70860 0 0.0
noinit 40416 40416 0 0.0
text 556600 556602 2 0.0
lighting-app tlsr9518adk80d (read/write) 806668 806668 0 0.0
bss 71120 71120 0 0.0
noinit 40416 40416 0 0.0
text 573320 573320 0 0.0

@andy31415 andy31415 merged commit d1d5ca8 into project-chip:master Jun 10, 2022
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.

When entering 'y' in UserPromt, the comparison is not successful.
4 participants