[test] add tests for DNS forwarding (#8847)

This commit adds a new file
`tests/scripts/thread-cert/border_router/nat64/test_upstream_dns.py`
to test scripts for testing the DNS forwarding functions.

The test adds a record `test.domain` to the bind9 interface since when
adding to DNSSD tests, the OpenThread's DNSSD server will be conflict
with the Docker's DNS forwarding functions.
This commit is contained in:
Song GUO
2023-03-30 15:06:55 -07:00
committed by GitHub
parent 59277d0925
commit fa6824c9cb
7 changed files with 161 additions and 2 deletions
+6 -1
View File
@@ -321,8 +321,8 @@ do_build_otbr_docker()
"-DOT_SRP_CLIENT=ON"
"-DOT_FULL_LOGS=ON"
"-DOT_UPTIME=ON"
"-DOTBR_DNS_UPSTREAM_QUERY=ON"
"-DOTBR_DUA_ROUTING=ON"
"-DCMAKE_CXX_FLAGS='-DOPENTHREAD_CONFIG_DNSSD_SERVER_BIND_UNSPECIFIED_NETIF=1'"
)
local args=(
"BORDER_ROUTING=${BORDER_ROUTING}"
@@ -338,6 +338,11 @@ do_build_otbr_docker()
"MDNS=${OTBR_MDNS:-mDNSResponder}"
)
if [[ ${NAT64} != 1 ]]; then
# We are testing upstream DNS forwarding in the NAT64 tests, and OPENTHREAD_CONFIG_DNSSD_SERVER_BIND_UNSPECIFIED_NETIF will block OpenThread's DNSSD server since we already have bind9 running.
otbr_options+=("-DCMAKE_CXX_FLAGS='-DOPENTHREAD_CONFIG_DNSSD_SERVER_BIND_UNSPECIFIED_NETIF=1'")
fi
if [[ ${TREL} == 1 ]]; then
otbr_options+=("-DOTBR_TREL=ON")
else