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

DNS-SD mock for checking platform implementations #26143

Merged
merged 7 commits into from
May 25, 2023

Conversation

arkq
Copy link
Contributor

@arkq arkq commented Apr 18, 2023

Validate platform implementations of mDNS resolver with a mock responder which does not responds with additional records. For this test to pass, platform implementation has to request for A/AAAA/TXT records individually if they are not available in PTR response.

Changes

  • mock mDNS responder which does not responds with additional records
  • set mShouldRunEventLoop to true when event loop is managed by the caller (this allows to run event loop with RunEventLoop() even if StopEventLoopTask() was called beforehand)

Testing

Tested locally on Linux with Avahi.
CI will test Darwin.

@github-actions
Copy link

PR #26143: Size comparison from 856963e to bace239

Full report (3 builds for cc32xx, qpg)
platform target config section 856963e bace239 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 643249 643249 0 0.0
(read/write) 203848 203848 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197248 197248 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 933224 933224 0 0.0
.debug_aranges 87792 87792 0 0.0
.debug_frame 302140 302140 0 0.0
.debug_info 20330830 20330830 0 0.0
.debug_line 2687904 2687904 0 0.0
.debug_loc 2838960 2838960 0 0.0
.debug_ranges 288072 288072 0 0.0
.debug_str 3042335 3042335 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104401 104401 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 377963 377963 0 0.0
.symtab 256976 256976 0 0.0
.text 536728 536728 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1166568 1166568 0 0.0
.bss 99308 99308 0 0.0
.data 856 856 0 0.0
.text 613668 613668 0 0.0
lock-app qpg6105+debug (read/write) 1136688 1136688 0 0.0
.bss 94452 94452 0 0.0
.data 860 860 0 0.0
.text 583784 583784 0 0.0

@arkq arkq force-pushed the mdns-resolver-tester branch from bace239 to 97e8cf5 Compare April 19, 2023 18:07
@github-actions
Copy link

PR #26143: Size comparison from b8368a1 to 97e8cf5

Decreases (1 build for cc32xx)
platform target config section b8368a1 97e8cf5 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 20330829 20330828 -1 -0.0
Full report (1 build for cc32xx)
platform target config section b8368a1 97e8cf5 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 643249 643249 0 0.0
(read/write) 203848 203848 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197248 197248 0 0.0
.comment 194 194 0 0.0
.data 1480 1480 0 0.0
.debug_abbrev 933224 933224 0 0.0
.debug_aranges 87792 87792 0 0.0
.debug_frame 302140 302140 0 0.0
.debug_info 20330829 20330828 -1 -0.0
.debug_line 2687904 2687904 0 0.0
.debug_loc 2838960 2838960 0 0.0
.debug_ranges 288072 288072 0 0.0
.debug_str 3042335 3042335 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104401 104401 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 377963 377963 0 0.0
.symtab 256976 256976 0 0.0
.text 536728 536728 0 0.0

@arkq arkq force-pushed the mdns-resolver-tester branch 2 times, most recently from 336729e to 7f7b086 Compare April 26, 2023 11:53
@github-actions
Copy link

PR #26143: Size comparison from c2a28c8 to 7f7b086

Increases (1 build for cc32xx)
platform target config section c2a28c8 7f7b086 change % change
cc32xx lock CC3235SF_LAUNCHXL .debug_info 19489250 19489251 1 0.0
Full report (1 build for cc32xx)
platform target config section c2a28c8 7f7b086 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 601114 601114 0 0.0
(read/write) 204132 204132 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197544 197544 0 0.0
.comment 206 206 0 0.0
.data 1468 1468 0 0.0
.debug_abbrev 956756 956756 0 0.0
.debug_aranges 103416 103416 0 0.0
.debug_frame 349704 349704 0 0.0
.debug_info 19489250 19489251 1 0.0
.debug_line 2678035 2678035 0 0.0
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1501882 1501882 0 0.0
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 96008 96008 0 0.0
.debug_str 3024877 3024877 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104170 104170 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 477531 477531 0 0.0
.symtab 285936 285936 0 0.0
.text 494824 494824 0 0.0

@arkq arkq force-pushed the mdns-resolver-tester branch from 7f7b086 to f0131f5 Compare April 28, 2023 09:04
@arkq arkq marked this pull request as ready for review April 28, 2023 09:11
@github-actions
Copy link

PR #26143: Size comparison from 6ec5f81 to f0131f5

Increases (3 builds for bl702, linux)
platform target config section 6ec5f81 f0131f5 change % change
bl702 lighting-app bl702+rpc .debug_info 45286329 45286330 1 0.0
.text 1034938 1034940 2 0.0
linux chip-tool-ipv6only arm64 (read only) 12172316 12172332 16 0.0
.text 9835812 9835828 16 0.0
thermostat-no-ble arm64 (read only) 2512300 2512316 16 0.0
.text 2118896 2118912 16 0.0
Decreases (1 build for qpg)
platform target config section 6ec5f81 f0131f5 change % change
qpg lighting-app qpg6105+debug (read/write) 1165872 1165864 -8 -0.0
.text 612972 612964 -8 -0.0
Full report (16 builds for bl602, bl702, cc13x2_26x2, cc32xx, linux, qpg)
platform target config section 6ec5f81 f0131f5 change % change
bl602 lighting-app bl602 (read/write) 1352438 1352438 0 0.0
.bss 87886 87886 0 0.0
.data 9648 9648 0 0.0
.text 1033476 1033476 0 0.0
bl602+rpc (read/write) 1398450 1398450 0 0.0
.bss 95934 95934 0 0.0
.data 10040 10040 0 0.0
.text 1064572 1064572 0 0.0
bl702 lighting-app bl702 0 0 0 0.0
(read only) 3358 3358 0 0.0
(read/write) 1182831 1182831 0 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 328 328 0 0.0
.bss 67601 67601 0 0.0
.bss_psram 24368 24368 0 0.0
.comment 48 48 0 0.0
.data 3952 3952 0 0.0
.debug_abbrev 1549638 1549638 0 0.0
.debug_aranges 134848 134848 0 0.0
.debug_frame 495892 495892 0 0.0
.debug_info 40792870 40792870 0 0.0
.debug_line 5317307 5317307 0 0.0
.debug_loc 3452901 3452901 0 0.0
.debug_ranges 377408 377408 0 0.0
.debug_str 3634516 3634516 0 0.0
.hbn 536 536 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 140 140 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 106192 106192 0 0.0
.rsvd 4 4 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 576706 576706 0 0.0
.symtab 174752 174752 0 0.0
.tcm_data 28 28 0 0.0
.tcmcode 3358 3358 0 0.0
.text 962636 962636 0 0.0
bl702+rpc 0 0 0 0.0
(read only) 3358 3358 0 0.0
(read/write) 1270291 1270291 0 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 328 328 0 0.0
.bss 75633 75633 0 0.0
.bss_psram 24768 24768 0 0.0
.comment 48 48 0 0.0
.data 4504 4504 0 0.0
.debug_abbrev 1700384 1700384 0 0.0
.debug_aranges 143072 143072 0 0.0
.debug_frame 523772 523772 0 0.0
.debug_info 45286329 45286330 1 0.0
.debug_line 5724599 5724599 0 0.0
.debug_loc 3653491 3653491 0 0.0
.debug_ranges 402400 402400 0 0.0
.debug_str 4058927 4058927 0 0.0
.hbn 536 536 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 156 156 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 120032 120032 0 0.0
.rsvd 4 4 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 637250 637250 0 0.0
.symtab 193040 193040 0 0.0
.tcm_data 28 28 0 0.0
.tcmcode 3358 3358 0 0.0
.text 1034938 1034940 2 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 678031 678031 0 0.0
(read/write) 158660 158660 0 0.0
.bss 81232 81232 0 0.0
.data 3316 3316 0 0.0
.rodata 86855 86855 0 0.0
.text 590852 590852 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 642207 642207 0 0.0
(read/write) 157860 157860 0 0.0
.bss 80432 80432 0 0.0
.data 3316 3316 0 0.0
.rodata 76663 76663 0 0.0
.text 565224 565224 0 0.0
lock-ftd LP_CC2652R7 (read only) 677383 677383 0 0.0
(read/write) 156152 156152 0 0.0
.bss 78760 78760 0 0.0
.data 3280 3280 0 0.0
.rodata 75535 75535 0 0.0
.text 601360 601360 0 0.0
lock-mtd LP_CC2652R7 (read only) 664939 664939 0 0.0
(read/write) 151320 151320 0 0.0
.bss 73928 73928 0 0.0
.data 3280 3280 0 0.0
.rodata 102363 102363 0 0.0
.text 562088 562088 0 0.0
pump-app LP_CC2652R7 (read only) 690451 690451 0 0.0
(read/write) 156596 156596 0 0.0
.bss 78728 78728 0 0.0
.data 3244 3244 0 0.0
.rodata 89651 89651 0 0.0
.text 600312 600312 0 0.0
pump-controller-app LP_CC2652R7 (read only) 675907 675907 0 0.0
(read/write) 157012 157012 0 0.0
.bss 78864 78864 0 0.0
.data 3268 3268 0 0.0
.rodata 85427 85427 0 0.0
.text 589992 589992 0 0.0
shell LP_CC2652R7 (read only) 671246 671246 0 0.0
(read/write) 160732 160732 0 0.0
.bss 83320 83320 0 0.0
.data 3300 3300 0 0.0
.rodata 85150 85150 0 0.0
.text 585776 585776 0 0.0
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 602714 602714 0 0.0
(read/write) 204156 204156 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197568 197568 0 0.0
.comment 206 206 0 0.0
.data 1468 1468 0 0.0
.debug_abbrev 956984 956984 0 0.0
.debug_aranges 103664 103664 0 0.0
.debug_frame 350552 350552 0 0.0
.debug_info 19521971 19521971 0 0.0
.debug_line 2682751 2682751 0 0.0
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1506147 1506147 0 0.0
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 96278 96278 0 0.0
.debug_str 3059490 3059490 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104250 104250 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 481887 481887 0 0.0
.symtab 287248 287248 0 0.0
.text 496340 496340 0 0.0
linux chip-tool-ipv6only arm64 (read only) 12172316 12172332 16 0.0
(read/write) 745192 745192 0 0.0
.bss 34392 34392 0 0.0
.data 3008 3008 0 0.0
.data.rel.ro 687016 687016 0 0.0
.dynamic 560 560 0 0.0
.got 15584 15584 0 0.0
.init 24 24 0 0.0
.init_array 216 216 0 0.0
.rodata 567904 567904 0 0.0
.text 9835812 9835828 16 0.0
thermostat-no-ble arm64 (read only) 2512300 2512316 16 0.0
(read/write) 145704 145704 0 0.0
.bss 56360 56360 0 0.0
.data 1784 1784 0 0.0
.data.rel.ro 78064 78064 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 129424 129424 0 0.0
.text 2118896 2118912 16 0.0
qpg lighting-app qpg6105+debug (read/write) 1165872 1165864 -8 -0.0
.bss 99640 99640 0 0.0
.data 856 856 0 0.0
.text 612972 612964 -8 -0.0
lock-app qpg6105+debug (read/write) 1135224 1135224 0 0.0
.bss 94792 94792 0 0.0
.data 852 852 0 0.0
.text 582320 582320 0 0.0

@github-actions
Copy link

github-actions bot commented May 2, 2023

PR #26143: Size comparison from fa505f6 to 75f801b

Full report (1 build for cc32xx)
platform target config section fa505f6 75f801b change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 604042 604042 0 0.0
(read/write) 204156 204156 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197568 197568 0 0.0
.comment 206 206 0 0.0
.data 1468 1468 0 0.0
.debug_abbrev 956764 956764 0 0.0
.debug_aranges 103240 103240 0 0.0
.debug_frame 349432 349432 0 0.0
.debug_info 19559510 19559510 0 0.0
.debug_line 2687404 2687404 0 0.0
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1515630 1515630 0 0.0
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 95966 95966 0 0.0
.debug_str 3082308 3082308 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104282 104282 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 479192 479192 0 0.0
.symtab 286736 286736 0 0.0
.text 497636 497636 0 0.0

@github-actions
Copy link

github-actions bot commented May 4, 2023

PR #26143: Size comparison from 5ff1818 to 9692ff5

Full report (1 build for cc32xx)
platform target config section 5ff1818 9692ff5 change % change
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 604866 604866 0 0.0
(read/write) 204156 204156 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197568 197568 0 0.0
.comment 206 206 0 0.0
.data 1468 1468 0 0.0
.debug_abbrev 957005 957005 0 0.0
.debug_aranges 101104 101104 0 0.0
.debug_frame 341416 341416 0 0.0
.debug_info 19522698 19522698 0 0.0
.debug_line 2666219 2666219 0 0.0
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1488771 1488771 0 0.0
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 94291 94291 0 0.0
.debug_str 3100491 3100491 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104346 104346 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 482872 482872 0 0.0
.symtab 287120 287120 0 0.0
.text 498396 498396 0 0.0

Copy link
Contributor

@bzbarsky-apple bzbarsky-apple left a comment

Choose a reason for hiding this comment

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

Thank you!

src/platform/tests/TestDnssd.cpp Outdated Show resolved Hide resolved
src/platform/tests/TestDnssd.cpp Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented May 4, 2023

PR #26143: Size comparison from 5ff1818 to c58e0dc

Decreases (4 builds for bl602, bl702)
platform target config section 5ff1818 c58e0dc change % change
bl602 lighting-app bl602 .text 1035792 1035790 -2 -0.0
bl602+rpc (read/write) 1401114 1401106 -8 -0.0
.text 1067146 1067144 -2 -0.0
bl702 lighting-app bl702 .debug_info 40749399 40749398 -1 -0.0
.text 964924 964922 -2 -0.0
bl702+rpc .debug_info 45444506 45444505 -1 -0.0
.text 1037316 1037314 -2 -0.0
Full report (8 builds for bl602, bl702, cc32xx, mbed, qpg)
platform target config section 5ff1818 c58e0dc change % change
bl602 lighting-app bl602 (read/write) 1354838 1354838 0 0.0
.bss 87886 87886 0 0.0
.data 9648 9648 0 0.0
.text 1035792 1035790 -2 -0.0
bl602+rpc (read/write) 1401114 1401106 -8 -0.0
.bss 95934 95934 0 0.0
.data 10040 10040 0 0.0
.text 1067146 1067144 -2 -0.0
bl702 lighting-app bl702 0 0 0 0.0
(read only) 3358 3358 0 0.0
(read/write) 1185199 1185199 0 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 328 328 0 0.0
.bss 67601 67601 0 0.0
.bss_psram 24368 24368 0 0.0
.comment 48 48 0 0.0
.data 3952 3952 0 0.0
.debug_abbrev 1549515 1549515 0 0.0
.debug_aranges 132776 132776 0 0.0
.debug_frame 487884 487884 0 0.0
.debug_info 40749399 40749398 -1 -0.0
.debug_line 5293911 5293911 0 0.0
.debug_loc 3418091 3418091 0 0.0
.debug_ranges 372032 372032 0 0.0
.debug_str 3675990 3675990 0 0.0
.hbn 536 536 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 140 140 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 106272 106272 0 0.0
.rsvd 4 4 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 580333 580333 0 0.0
.symtab 175136 175136 0 0.0
.tcm_data 28 28 0 0.0
.tcmcode 3358 3358 0 0.0
.text 964924 964922 -2 -0.0
bl702+rpc 0 0 0 0.0
(read only) 3358 3358 0 0.0
(read/write) 1272755 1272755 0 0.0
.bleromro 6342 6342 0 0.0
.bleromrw 124 124 0 0.0
.boot2 328 328 0 0.0
.bss 75633 75633 0 0.0
.bss_psram 24768 24768 0 0.0
.comment 48 48 0 0.0
.data 4504 4504 0 0.0
.debug_abbrev 1702795 1702795 0 0.0
.debug_aranges 141000 141000 0 0.0
.debug_frame 515776 515776 0 0.0
.debug_info 45444506 45444505 -1 -0.0
.debug_line 5703342 5703342 0 0.0
.debug_loc 3619114 3619114 0 0.0
.debug_ranges 397064 397064 0 0.0
.debug_str 4100399 4100399 0 0.0
.hbn 536 536 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 156 156 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 120112 120112 0 0.0
.rsvd 4 4 0 0.0
.sha_ocram 72 72 0 0.0
.shstrtab 304 304 0 0.0
.stack 2048 2048 0 0.0
.strtab 640877 640877 0 0.0
.symtab 193424 193424 0 0.0
.tcm_data 28 28 0 0.0
.tcmcode 3358 3358 0 0.0
.text 1037316 1037314 -2 -0.0
cc32xx lock CC3235SF_LAUNCHXL 0 0 0 0.0
(read only) 604866 604866 0 0.0
(read/write) 204156 204156 0 0.0
.ARM.attributes 44 44 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 197568 197568 0 0.0
.comment 206 206 0 0.0
.data 1468 1468 0 0.0
.debug_abbrev 957005 957005 0 0.0
.debug_aranges 101104 101104 0 0.0
.debug_frame 341416 341416 0 0.0
.debug_info 19522698 19522698 0 0.0
.debug_line 2666219 2666219 0 0.0
.debug_line_str 513 513 0 0.0
.debug_loc 33340 33340 0 0.0
.debug_loclists 1488771 1488771 0 0.0
.debug_ranges 4984 4984 0 0.0
.debug_rnglists 94291 94291 0 0.0
.debug_str 3100491 3100491 0 0.0
.ramVecs 780 780 0 0.0
.resetVecs 64 64 0 0.0
.rodata 104346 104346 0 0.0
.shstrtab 265 265 0 0.0
.stack 2048 2048 0 0.0
.strtab 482872 482872 0 0.0
.symtab 287120 287120 0 0.0
.text 498396 498396 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2494848 2494848 0 0.0
.bss 216296 216296 0 0.0
.data 5144 5144 0 0.0
.text 1457532 1457532 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1167816 1167816 0 0.0
.bss 99632 99632 0 0.0
.data 856 856 0 0.0
.text 614916 614916 0 0.0
lock-app qpg6105+debug (read/write) 1137176 1137176 0 0.0
.bss 94784 94784 0 0.0
.data 852 852 0 0.0
.text 584272 584272 0 0.0

@yufengwangca yufengwangca merged commit 4b04598 into project-chip:master May 25, 2023
@arkq arkq deleted the mdns-resolver-tester branch May 26, 2023 08:44
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