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

Add a way to capture message payloads in tests. #21774

Merged

Conversation

bzbarsky-apple
Copy link
Contributor

One use in TestReadInteraction shows how this works. More uses in
that file will need to be added to address the other TODOs.

Problem

We have tests that want to verify that certain messages were sent, but have no way to check for that now.

Change overview

Add a way to capture messages after decryption, so we can examine them.

Testing

PR uses the new bits in a unit test.

@github-actions
Copy link

github-actions bot commented Aug 10, 2022

PR #21774: Size comparison from a6cdfbb to d40735c

Increases (3 builds for cc13x2_26x2, cyw30739)
platform target config section a6cdfbb d40735c change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read/write) 180456 180464 8 0.0
pump-app LP_CC2652R7 (read/write) 159356 159364 8 0.0
cyw30739 ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 596954 596962 8 0.0
.app_xip_area 474476 474484 8 0.0
Decreases (5 builds for cc13x2_26x2, esp32, telink)
platform target config section a6cdfbb d40735c change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 670927 670919 -8 -0.0
.text 582140 582132 -8 -0.0
pump-app LP_CC2652R7 (read only) 683019 683011 -8 -0.0
.text 593220 593212 -8 -0.0
esp32 all-clusters-app c3devkit (read only) 1026078 1026076 -2 -0.0
.flash.text 1026078 1026076 -2 -0.0
telink light-switch-app tlsr9518adk80d text 569826 569824 -2 -0.0
lighting-app tlsr9518adk80d text 587800 587798 -2 -0.0
Full report (32 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section a6cdfbb d40735c change % change
bl602 lighting-app bl602 (read/write) 1379962 1379962 0 0.0
.bss 119746 119746 0 0.0
.data 4480 4480 0 0.0
.text 1048136 1048136 0 0.0
bl602+rpc (read/write) 1425210 1425210 0 0.0
.bss 127186 127186 0 0.0
.data 4600 4600 0 0.0
.text 1079636 1079636 0 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 670927 670919 -8 -0.0
(read/write) 180456 180464 8 0.0
.bss 74276 74276 0 0.0
.data 3372 3372 0 0.0
.rodata 88471 88471 0 0.0
.text 582140 582132 -8 -0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 636471 636471 0 0.0
(read/write) 157844 157844 0 0.0
.bss 73556 73556 0 0.0
.data 3372 3372 0 0.0
.rodata 77727 77727 0 0.0
.text 558420 558420 0 0.0
lock-ftd LP_CC2652R7 (read only) 672787 672787 0 0.0
(read/write) 168780 168780 0 0.0
.bss 71348 71348 0 0.0
.data 3296 3296 0 0.0
.rodata 76411 76411 0 0.0
.text 595896 595896 0 0.0
lock-mtd LP_CC2652R7 (read only) 655395 655395 0 0.0
(read/write) 181860 181860 0 0.0
.bss 67036 67036 0 0.0
.data 3296 3296 0 0.0
.rodata 101363 101363 0 0.0
.text 553552 553552 0 0.0
pump-app LP_CC2652R7 (read only) 683019 683011 -8 -0.0
(read/write) 159356 159364 8 0.0
.bss 71388 71388 0 0.0
.data 3296 3296 0 0.0
.rodata 89315 89315 0 0.0
.text 593220 593212 -8 -0.0
pump-controller-app LP_CC2652R7 (read only) 667487 667487 0 0.0
(read/write) 175024 175024 0 0.0
.bss 71524 71524 0 0.0
.data 3292 3292 0 0.0
.rodata 84863 84863 0 0.0
.text 582144 582144 0 0.0
shell LP_CC2652R7 (read only) 663610 663610 0 0.0
(read/write) 183292 183292 0 0.0
.bss 76596 76596 0 0.0
.data 3376 3376 0 0.0
.rodata 85418 85418 0 0.0
.text 577876 577876 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 584646 584646 0 0.0
.app_xip_area 461448 461448 0 0.0
.bss 65640 65640 0 0.0
.data 744 744 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 590582 590582 0 0.0
.app_xip_area 462600 462600 0 0.0
.bss 70424 70424 0 0.0
.data 748 748 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 596954 596962 8 0.0
.app_xip_area 474476 474484 8 0.0
.bss 64952 64952 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1096372 1096372 0 0.0
.bss 132844 132844 0 0.0
.data 2068 2068 0 0.0
.text 961436 961436 0 0.0
BRD4161A+rpc (read/write) 1150636 1150636 0 0.0
.bss 149532 149532 0 0.0
.data 2280 2280 0 0.0
.text 998804 998804 0 0.0
BRD4161A+rs911x (read/write) 985908 985908 0 0.0
.bss 162184 162184 0 0.0
.data 2056 2056 0 0.0
.text 821648 821648 0 0.0
lock-app BRD4161A+wf200 (read/write) 1136484 1136484 0 0.0
.bss 144824 144824 0 0.0
.data 2064 2064 0 0.0
.text 989576 989576 0 0.0
window-app BRD4161A (read/write) 1088104 1088104 0 0.0
.bss 134292 134292 0 0.0
.data 2096 2096 0 0.0
.text 951696 951696 0 0.0
esp32 all-clusters-app c3devkit (read only) 1026078 1026076 -2 -0.0
(read/write) 1487418 1487418 0 0.0
.dram0.bss 70336 70336 0 0.0
.dram0.data 14600 14600 0 0.0
.flash.rodata 217048 217048 0 0.0
.flash.text 1026078 1026076 -2 -0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1079367 1079367 0 0.0
(read/write) 489392 489392 0 0.0
.dram0.bss 75840 75840 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 247412 247412 0 0.0
.flash.text 1073983 1073983 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w0+release (read/write) 643644 643644 0 0.0
.bss 69712 69712 0 0.0
.data 2044 2044 0 0.0
.text 569160 569160 0 0.0
lock k32w0+release (read/write) 701076 701076 0 0.0
.bss 70184 70184 0 0.0
.data 2052 2052 0 0.0
.text 626112 626112 0 0.0
linux chip-tool-ipv6only arm64 (read only) 10007084 10007084 0 0.0
(read/write) 695153 695153 0 0.0
.bss 32897 32897 0 0.0
.data 3272 3272 0 0.0
.data.rel.ro 640360 640360 0 0.0
.dynamic 560 560 0 0.0
.got 13656 13656 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 474124 474124 0 0.0
.text 7903284 7903284 0 0.0
thermostat-no-ble arm64 (read only) 2350956 2350956 0 0.0
(read/write) 141681 141681 0 0.0
.bss 55313 55313 0 0.0
.data 1672 1672 0 0.0
.data.rel.ro 75880 75880 0 0.0
.dynamic 560 560 0 0.0
.got 5040 5040 0 0.0
.init 24 24 0 0.0
.init_array 408 408 0 0.0
.rodata 139716 139716 0 0.0
.text 1973712 1973712 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2452720 2452720 0 0.0
.bss 214556 214556 0 0.0
.data 5872 5872 0 0.0
.text 1415364 1415364 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1177959 1177959 0 0.0
bss 143222 143222 0 0.0
rodata 142776 142776 0 0.0
text 813112 813112 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1157983 1157983 0 0.0
bss 142460 142460 0 0.0
rodata 134472 134472 0 0.0
text 802232 802232 0 0.0
p6 all-clusters-app default (read only) 881520 881520 0 0.0
(read/write) 1693812 1693812 0 0.0
.bss 149168 149168 0 0.0
.data 2656 2656 0 0.0
.text 1533600 1533600 0 0.0
all-clusters-minimal-app default (read only) 882240 882240 0 0.0
(read/write) 1637980 1637980 0 0.0
.bss 148448 148448 0 0.0
.data 2656 2656 0 0.0
.text 1478488 1478488 0 0.0
light-app default (read only) 890560 890560 0 0.0
(read/write) 1556668 1556668 0 0.0
.bss 140336 140336 0 0.0
.data 2448 2448 0 0.0
.text 1405496 1405496 0 0.0
lock-app default (read only) 886064 886064 0 0.0
(read/write) 1593980 1593980 0 0.0
.bss 144816 144816 0 0.0
.data 2464 2464 0 0.0
.text 1438312 1438312 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 806120 806120 0 0.0
bss 70976 70976 0 0.0
noinit 43488 43488 0 0.0
text 569826 569824 -2 -0.0
lighting-app tlsr9518adk80d (read/write) 827928 827928 0 0.0
bss 71820 71820 0 0.0
noinit 43488 43488 0 0.0
text 587800 587798 -2 -0.0

One use in TestReadInteraction shows how this works.  More uses in
that file will need to be added to address the other TODOs.
@github-actions
Copy link

github-actions bot commented Aug 10, 2022

PR #21774: Size comparison from 5dade57 to 74817ff

Increases (4 builds for bl602, cc13x2_26x2, esp32, nrfconnect)
platform target config section 5dade57 74817ff change % change
bl602 lighting-app bl602 (read/write) 1380050 1380058 8 0.0
.text 1048228 1048232 4 0.0
cc13x2_26x2 lock-mtd LP_CC2652R7 (read/write) 181804 181812 8 0.0
esp32 all-clusters-app c3devkit (read only) 1026146 1026148 2 0.0
.flash.text 1026146 1026148 2 0.0
nrfconnect all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1158031 1158047 16 0.0
text 802288 802292 4 0.0
Decreases (2 builds for cc13x2_26x2, telink)
platform target config section 5dade57 74817ff change % change
cc13x2_26x2 lock-mtd LP_CC2652R7 (read only) 655451 655443 -8 -0.0
.text 553608 553600 -8 -0.0
telink light-switch-app tlsr9518adk80d (read/write) 806184 806176 -8 -0.0
text 569886 569884 -2 -0.0
Full report (32 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 5dade57 74817ff change % change
bl602 lighting-app bl602 (read/write) 1380050 1380058 8 0.0
.bss 119746 119746 0 0.0
.data 4480 4480 0 0.0
.text 1048228 1048232 4 0.0
bl602+rpc (read/write) 1425306 1425306 0 0.0
.bss 127186 127186 0 0.0
.data 4600 4600 0 0.0
.text 1079732 1079732 0 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 670991 670991 0 0.0
(read/write) 180392 180392 0 0.0
.bss 74276 74276 0 0.0
.data 3372 3372 0 0.0
.rodata 88471 88471 0 0.0
.text 582204 582204 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 636535 636535 0 0.0
(read/write) 157844 157844 0 0.0
.bss 73556 73556 0 0.0
.data 3372 3372 0 0.0
.rodata 77727 77727 0 0.0
.text 558484 558484 0 0.0
lock-ftd LP_CC2652R7 (read only) 672843 672843 0 0.0
(read/write) 168724 168724 0 0.0
.bss 71348 71348 0 0.0
.data 3296 3296 0 0.0
.rodata 76411 76411 0 0.0
.text 595952 595952 0 0.0
lock-mtd LP_CC2652R7 (read only) 655451 655443 -8 -0.0
(read/write) 181804 181812 8 0.0
.bss 67036 67036 0 0.0
.data 3296 3296 0 0.0
.rodata 101363 101363 0 0.0
.text 553608 553600 -8 -0.0
pump-app LP_CC2652R7 (read only) 683083 683083 0 0.0
(read/write) 159292 159292 0 0.0
.bss 71388 71388 0 0.0
.data 3296 3296 0 0.0
.rodata 89315 89315 0 0.0
.text 593284 593284 0 0.0
pump-controller-app LP_CC2652R7 (read only) 667551 667551 0 0.0
(read/write) 174960 174960 0 0.0
.bss 71524 71524 0 0.0
.data 3292 3292 0 0.0
.rodata 84863 84863 0 0.0
.text 582208 582208 0 0.0
shell LP_CC2652R7 (read only) 663666 663666 0 0.0
(read/write) 183236 183236 0 0.0
.bss 76596 76596 0 0.0
.data 3376 3376 0 0.0
.rodata 85418 85418 0 0.0
.text 577932 577932 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 584710 584710 0 0.0
.app_xip_area 461512 461512 0 0.0
.bss 65640 65640 0 0.0
.data 744 744 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 590646 590646 0 0.0
.app_xip_area 462664 462664 0 0.0
.bss 70424 70424 0 0.0
.data 748 748 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 597026 597026 0 0.0
.app_xip_area 474548 474548 0 0.0
.bss 64952 64952 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1096516 1096516 0 0.0
.bss 132844 132844 0 0.0
.data 2068 2068 0 0.0
.text 961580 961580 0 0.0
BRD4161A+rpc (read/write) 1150780 1150780 0 0.0
.bss 149532 149532 0 0.0
.data 2280 2280 0 0.0
.text 998948 998948 0 0.0
BRD4161A+rs911x (read/write) 986036 986036 0 0.0
.bss 162184 162184 0 0.0
.data 2056 2056 0 0.0
.text 821776 821776 0 0.0
lock-app BRD4161A+wf200 (read/write) 1136532 1136532 0 0.0
.bss 144824 144824 0 0.0
.data 2064 2064 0 0.0
.text 989624 989624 0 0.0
window-app BRD4161A (read/write) 1088248 1088248 0 0.0
.bss 134292 134292 0 0.0
.data 2096 2096 0 0.0
.text 951840 951840 0 0.0
esp32 all-clusters-app c3devkit (read only) 1026146 1026148 2 0.0
(read/write) 1487426 1487426 0 0.0
.dram0.bss 70336 70336 0 0.0
.dram0.data 14600 14600 0 0.0
.flash.rodata 217056 217056 0 0.0
.flash.text 1026146 1026148 2 0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1079419 1079419 0 0.0
(read/write) 489392 489392 0 0.0
.dram0.bss 75840 75840 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 247412 247412 0 0.0
.flash.text 1074035 1074035 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w0+release (read/write) 643708 643708 0 0.0
.bss 69712 69712 0 0.0
.data 2044 2044 0 0.0
.text 569224 569224 0 0.0
lock k32w0+release (read/write) 701140 701140 0 0.0
.bss 70184 70184 0 0.0
.data 2052 2052 0 0.0
.text 626176 626176 0 0.0
linux chip-tool-ipv6only arm64 (read only) 10009596 10009596 0 0.0
(read/write) 695217 695217 0 0.0
.bss 32897 32897 0 0.0
.data 3272 3272 0 0.0
.data.rel.ro 640416 640416 0 0.0
.dynamic 560 560 0 0.0
.got 13664 13664 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 474396 474396 0 0.0
.text 7905332 7905332 0 0.0
thermostat-no-ble arm64 (read only) 2351100 2351100 0 0.0
(read/write) 141681 141681 0 0.0
.bss 55313 55313 0 0.0
.data 1672 1672 0 0.0
.data.rel.ro 75880 75880 0 0.0
.dynamic 560 560 0 0.0
.got 5040 5040 0 0.0
.init 24 24 0 0.0
.init_array 408 408 0 0.0
.rodata 139716 139716 0 0.0
.text 1973856 1973856 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2452720 2452720 0 0.0
.bss 214556 214556 0 0.0
.data 5872 5872 0 0.0
.text 1415364 1415364 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1178023 1178023 0 0.0
bss 143222 143222 0 0.0
rodata 142776 142776 0 0.0
text 813172 813172 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1158031 1158047 16 0.0
bss 142460 142460 0 0.0
rodata 134472 134472 0 0.0
text 802288 802292 4 0.0
p6 all-clusters-app default (read only) 881520 881520 0 0.0
(read/write) 1694004 1694004 0 0.0
.bss 149168 149168 0 0.0
.data 2656 2656 0 0.0
.text 1533792 1533792 0 0.0
all-clusters-minimal-app default (read only) 882240 882240 0 0.0
(read/write) 1638172 1638172 0 0.0
.bss 148448 148448 0 0.0
.data 2656 2656 0 0.0
.text 1478680 1478680 0 0.0
light-app default (read only) 890560 890560 0 0.0
(read/write) 1556860 1556860 0 0.0
.bss 140336 140336 0 0.0
.data 2448 2448 0 0.0
.text 1405688 1405688 0 0.0
lock-app default (read only) 886064 886064 0 0.0
(read/write) 1594172 1594172 0 0.0
.bss 144816 144816 0 0.0
.data 2464 2464 0 0.0
.text 1438504 1438504 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 806184 806176 -8 -0.0
bss 70976 70976 0 0.0
noinit 43488 43488 0 0.0
text 569886 569884 -2 -0.0
lighting-app tlsr9518adk80d (read/write) 827984 827984 0 0.0
bss 71820 71820 0 0.0
noinit 43488 43488 0 0.0
text 587860 587860 0 0.0

@woody-apple woody-apple enabled auto-merge (squash) August 10, 2022 05:28
@woody-apple woody-apple merged commit 095e206 into project-chip:master Aug 10, 2022
@bzbarsky-apple bzbarsky-apple deleted the better-test-message-capturing branch August 10, 2022 16:10
isiu-apple pushed a commit to isiu-apple/connectedhomeip that referenced this pull request Sep 16, 2022
One use in TestReadInteraction shows how this works.  More uses in
that file will need to be added to address the other TODOs.
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.

3 participants