Repository navigation
Start the dns service and test name resolution in Renode - #118
Closed
JohnAmadis wants to merge 3 commits into
Closed
JohnAmadis wants to merge 3 commits into
JohnAmadis wants to merge 3 commits into
Conversation
The STM32F746G Discovery flash set now brings up the dmdns resolver with its dns unit (type=library, one for the whole system) and adds nslookup. Name servers come from the DHCP lease: dmdhcp reports option 6 through dmdns's dmdns_provide_servers DIF. The Renode network test serves option 6 in its DHCP answers and runs a small DNS server on the TAP: the board must resolve dmod-boot.test with no server given (proving dns service -> DHCP-provided server -> UDP query -> answer), the query must reach the host, and an unknown name must come back as NXDOMAIN. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SVi4u4Lf8HPw1emy5uyGSB
The Renode tests attach dmlog_monitor only after the board has been
running for a while. With DNS added, the boot log before systemd starts
is about 33 KB, so the 8 KiB ring had already overwritten
"DMOD-Boot started" and step 4 failed.
The ring size is now overridable (__dmboot_logs_size__) and the
emulation build uses 64 KiB. Board builds keep 8 KiB.
Bump lib/dmlog to the monitor fix for a stop reply that arrives before
an ack ("Unexpected GDB response: $"), which made master red.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SVi4u4Lf8HPw1emy5uyGSB
choco-technologies/dmlog#58 is merged; same tree as the commit tested before, now on dmlog master. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SVi4u4Lf8HPw1emy5uyGSB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The STM32F746G Discovery board now resolves host names: the
dnsservice starts at boot, and the Renode network test checks resolution end to end. The PR also fixes two causes of the red Renode pipeline.configs/board/stm32f746g-disco/flash.dmddns.iniis atype=libraryunit from the dmdns package. It loads and enables the resolver once for the whole system, with no per-interface rule.dmdns_provide_serversDIF on every lookup, so the board needs no DNS configuration.nslookuplets you look names up from the shell.scripts/test_renode_network.pyDnsServerthread listens on the TAP (UDP 53). It knows one name,dmod-boot.test→192.168.100.77, and answers AAAA for it with NODATA. Every other name gets NXDOMAIN.nslookup -4 dmod-boot.testwithout a server argument → must printAddress: 192.168.100.77. This checks the whole path:dnsservice → server from the DHCP lease through the DIF → UDP query → answer parsing.192.168.100.2.nslookup -4 no-such-host.test→ must reportNXDOMAIN.Fixes for the red Renode pipeline
monitor-gdbattaches only after the board has run for a while. With DNS added, the boot log up to the start of systemd is about 33 KB, so the 8 KiB ring had already overwrittenDMOD-Boot started.linker/common.ldnow takes the ring size from__dmboot_logs_size__when it is defined (default still 8192).CMakeLists.txtsets it to 64 KiB forDMBOOT_EMULATIONbuilds viaDMBOOT_EMULATION_LOGS_SIZE.Unexpected GDB response: $(master's failure after Board skill: always build and flash from build/, dmf-get's cache #117). This was a race indmlog_monitor: a late stop reply from Renode arrived before the ack. It is fixed in Monitor: skip a stop reply that arrives before an ack dmlog#58 (merged), andlib/dmlogpoints at its merge commit.Verification
scripts/run_renode_tests.shlocally withDMBOOT_TEST_NETWORK=1(Renode 1.15.3, arm-none-eabi 10.3-2021.10, TAP). All 9 steps passed, including the DNS checks above.Merge order
choco-technologies/dmdns#2 (adds
nslookupto the manifest) before this PR.🤖 Generated with Claude Code
https://claude.ai/code/session_01SVi4u4Lf8HPw1emy5uyGSB