Commit Graph

679 Commits

Author SHA1 Message Date
Simon Lin d266f90fbf [tests] mcast6.py to receive UDP messages without JOIN_GROUP (#7757)
`mcast6.py` is used by GitHub Actions CI to send or receive UDP
messages in multicast groups.

This commit adds a `-u` argument to allow `mcast6.py` to receive UDP
messages without joining a multicast group.
2022-05-26 08:57:42 -07:00
Jonathan Hui 56db0d3eff [routing-manager] remove vicarious router discovery feature (#7727)
The vicarious router discovery feature depends on the ability to
receive Router Advertisement messages sent in response to Router
Solicitation messages from other hosts. However, this does not work
since Router Advertisement messages are often sent unicast in
response.
2022-05-23 13:26:04 -07:00
Simon Lin 65c6f39300 [routing-manager] handle deprecated OMR prefix (#7703)
This commit enhances routing-manager to avoid using deprecated
(i.e. P_preferred=false) OMR prefixes as the winning OMR prefix, but
still sends RA RIO for the deprecating OMR prefixes.
2022-05-23 11:07:40 -07:00
Jonathan Hui fcbc4bef9b [srp-client] add API to specify TTL (#7735) 2022-05-20 15:34:50 -07:00
Yakun Xu 36b2a173f9 [simulation] simulate energy scan (#7393)
This commit implements energy scan in simulation platform.

Verified locally
```bash
> ifconfig up
Done
> scan energy 100
| Ch | RSSI |
+----+------+
| 11 |  -98 |
| 12 |  -98 |
| 13 |  -98 |
| 14 |  -98 |
| 15 |  -30 |
| 16 |  -30 |
| 17 |  -98 |
| 18 |  -98 |
| 19 |  -30 |
| 20 |  -98 |
| 21 |  -98 |
| 22 |  -98 |
| 23 |  -30 |
| 24 |  -30 |
| 25 |  -30 |
| 26 |  -98 |
Done
```
2022-05-20 11:00:44 -07:00
Jonathan Hui 5fbf1bec88 [tests] use common definition for border router startup delay (#7721) 2022-05-20 08:53:34 -07:00
Jonathan Hui 5107ee6238 [thread-cert] update Cert_5_5_05_SplitMergeREED to expect 16 routers (#7719)
Cert_5_5_05_SplitMergeREED.py was intermittently failing to find an
MLE Advertisement that had a Route TLV with 15 entries. However, the
test topology has 16 routers in steady state. Update packet filter to
look for 16 routers.
2022-05-19 09:15:54 -07:00
Rongli Sun a51a6311e9 [tests] add wait time in test_border_router_as_fed.py (#7714)
This commit adds some wait time before connectivity
validation to mitigate the impact of #7660 which
introduces some random delay before publishing
external route into network data.
2022-05-18 14:08:14 -07:00
Abtin Keshavarzian 8440b5f85d [test] relax wait time in test_nat64_multi_border_routers.py (#7660)
This commit increases the wait time in `nat64_multi_border_routers`
test to accommodate for the fact that prefixes are added and removed
using  `NetworkData::Publisher` which can add additional initial
random wait time (before adding the prefix into network data).
2022-05-17 15:43:44 -07:00
Jonathan Hui 282b85fa9c [routing-manager] derive on-link prefix from Extended PAN ID (#7695)
To align with latest Thread Specification.
2022-05-16 22:12:08 -07:00
Simon Lin 8330e708d1 [routing-manager] prefer OMR prefix with higher Pref (#7688)
This commit fixes the issue that the OMR prefix with higher Pref is not preferred.
2022-05-16 22:09:13 -07:00
Jonathan Hui 512d072889 [tests] set routereligible to False for FED (#7694) 2022-05-13 12:59:24 -07:00
Jonathan Hui edd65d5cf0 [tests] use common definition for router startup delay (#7685) 2022-05-12 10:20:16 -07:00
Simon Lin 6a6a1e2b25 [thread-cert] run LowPower cert tests for OTBR Posix (#7683)
This commit runs LowPower cert test cases for OTBR Posix (Docker).

Tests include:
- v1_2_LowPower_5_3_01_SSEDAttachment.py
- v1_2_LowPower_7_1_01_SingleProbeLinkMetricsWithEnhancedAcks.py
- v1_2_LowPower_7_2_01_ForwardTrackingSeries.py

Note: OTBR Posix plays FTD DUT roles .
2022-05-12 10:13:11 -07:00
Jonathan Hui c2dd7eb66d [mesh-local-prefix] remove coupling to Extended PAN ID (#7686)
Deriving the Mesh Local Prefix from the Extended PAN ID was carried
forward from legacy implementations. Removing this coupling to conform
to the existing Thread Specification.
2022-05-11 18:21:09 -07:00
Simon Lin fcf40d7087 [routing-manager] BR not to use P_on_mesh=0 or P_stable=0 prefixes as OMR prefixes (#7676)
This commit fixes the bug that BRs would recognize `P_on_mesh=0` or
`P_stable=0` prefixes as OMR prefixes.
2022-05-11 16:00:02 -07:00
Yakun Xu 5b1a3189ce [rcp] add enable-coex switch (#7675)
This commit adds a new option of radio url to enable/disable RCP coex
feature on boot without changing the RCP firmware.
2022-05-09 14:56:49 -07:00
Jonathan Hui 85382902ac [tests] initialize mesh-local prefix instead of extended pan id (#7668) 2022-05-09 09:15:11 -07:00
Jonathan Hui 3a125c66d2 [cli] add command to set mesh-local prefix (#7663)
Also add an expect test for getting/setting mesh-local prefix.
2022-05-05 21:42:58 -07:00
Diego Ismirlian fa939be97b [commissioner] add command line option to specify commissioner ID (#7520) 2022-05-05 16:23:06 -07:00
whd b0e532b138 [tests] verify meshcop service after a factoryreset (#7592) 2022-05-01 19:17:36 -07:00
Abtin Keshavarzian a08e627419 [srp-client] update how auto-start mode prefers netdata entries (#7503)
This commit updates the auto-start behavior in `Srp::Client` which
monitors the Thread Network Data entries to discover and select SRP
sever to register with. There are three types of entries in Network
Data and are selected in the order below:

1) Preferred unicast entries with address in service data,
2) Anycast entries (each having a seq number,
3) Unicast entries with address info included in server data.

This commit also defines `AutoStart` class which includes all the
state and data variables related to auto-start feature. It also
updates `test_srp_auto_start_mode` test to cover the newly added
behaviors.
2022-04-15 10:01:52 -07:00
Zhanglong Xia 5e9f6f1e67 [diag] add diag rcp echo command (#7585)
There is no command that can generate different sizes of Spinel frames
for testing the SPI/UART interface. This commit adds a diag command
`diag rcp echo` to RCP for testing SPI/UART interface.
2022-04-14 09:06:49 -07:00
Abtin Keshavarzian fbba1e4ede [test] update SRP name conflict test to cover more cases (#7588)
This commit updates `test_srp_name_conflicts.py` to cover the
situation where different clients try to register services with the
same service instance label but under different services.
2022-04-12 09:24:27 -07:00
Abtin Keshavarzian e71dc7bfc1 [test] update Cert_9_2_17_Orphan to make it more robust (#7581)
This commit updates `Cert_9_2_17_Orphan` packet verification to check
that the two leaders are sending MLE advertisement before checking
for child attach (Child ID response). The current test checked this
after the child attach but leader 1 is turned off 5 seconds after
the child is attached which may not be enough time to ensure rx
of an advertisement (which every 30 seconds on average).
2022-04-11 11:08:19 -07:00
Eduardo Montoya 47fd27be3e [mac] remove beacons payload (#7472)
Thread Specification v1.2.1 removes support for Thread Beacons payload.
2022-04-06 12:18:22 -07:00
whd a8b4fbb189 [tests] disable check in test_firewall.py (#7569)
The test failed when verifying that HOST sends a ping packet to BR
while the destination is a link local address. That requires adding a
route on HOST before the ping. In this specific step, HOST added a
route to link local prefix going to BR. However, HOST failed to send
the echo request to BR using this newly added route. Since the impact
of disabling this step is small, I'll skip this step as for now and
look for a long term fix in the future.
2022-04-05 21:22:19 -07:00
Kangping bc6ce12f03 [routing-manager] resend failed RS messages in 4 seconds (#7504)
Current `Routing Manager` implementation will try to send the failed
RS messages in 60 seconds.  RS failures happen often when the infra
interface is re-enabled which is the case of rebooting, and it could
not be acceptable for the border router to take 1 minute to recover
the IPv6 connectivity after reboot.

To resolve this issue, this commit changes the delay to
`kRtrSolicitationInterval` (4 seconds) which is the interval between
two successful RS messages.
2022-03-22 14:26:12 -07:00
Simon Lin 549b02e11c [routing-manager] add minimal delay between RAs (#7473)
This commit adds minimal delay (3 seconds) between consecutive Router
Advertisements according to `6.2.6.  Processing Router Solicitations,
RFC4861`.
2022-03-15 12:47:26 -07:00
Yi b34f2a3fd3 [tests] replace ifconfig command with ip command in node.py (#7471)
This commit replaces `ifconfig` command with `ip` command in node.py
for testing. `ifconfig` is not available on BR when bind9 is disabled.
2022-03-10 06:54:50 -08:00
Eduardo Montoya 465518ec64 [thci] find IPv6 border agents only (#7452)
Without this fix some Border Agents will not send mDNS responses
with AAAA record for IPv6 link local address.
2022-03-08 17:25:35 -08:00
Abtin Keshavarzian 05d8e81988 [dns-client] add support address resolution query for IPv4 directly (#7441)
This commit adds a new mechanism in `Dns::Client` along with a new
public OT API `otDnsClientResolveIp4Address()` and its related CLI
sub-command to allow a user to request an address resolution DNS
query specifically for A records or IPv4 addresses for a given host
name.

This API requires `OPENTHREAD_CONFIG_DNS_CLIENT_NAT64_ENABLE` to be
enabled. Upon receiving a successful query response the addresses are
reported to user (in callback) as NAT64 IPv6 translated version of
the IPv4 addresses from the received query response.

The new API is added in addition to the existing behavior where address
resolution query from `otDnsClientResolveAddress()` first queries for
IPv6 addresses and only if no IPv6 address is found and NAT64 is
enabled and allowed by the query config, `Dns::Client` implementation
tries to perform an IPv4 query. The new API directly starts with IPv4
query and can be useful in situations where Thread devices are
connected through BRs to a network without global IPv6 connectivity.
2022-03-08 17:18:44 -08:00
whd dbf475f066 [tests] add a multi-BR DNS-SD server test case (#7453)
I just found that we don't have a test case covers the scenario of
DNS-SD when there are multiple BRs. Specially, one of the BRs starts
with no mDNS cache.

There was a time that our mDNS publisher answered the queries
correctly, even when there was a bug in mDNS publisher that it
cancelled resolving/browsing too early (was fixed in
https://github.com/openthread/ot-br-posix/pull/1120). That bug was
hidden because mDNS cache already contained the needed information.
2022-03-07 22:07:00 -08:00
Kangping 4275b26935 [tests] add advertising test case of removing a host (#7440) 2022-02-28 12:47:14 -08:00
Abtin Keshavarzian 564982c818 [log] implement new logging model with module name support (#7385)
This commit implements new logging model in OpenThread. Each core
module can specify its own module name using `RegisterLogModule()`.
The registered log module name is then included in the all the log
messages emitted from the specific file. This model replaces and
enhances the log region model.
2022-02-17 15:50:45 -08:00
Eduardo Montoya a727275259 [thci] move zeroconf execution to the commissioner device (#7419)
So far zeroconf was running on the Windows Harness server and there
was no control on which Ethernet interface to scan.
2022-02-16 10:24:13 -08:00
whd 6b6edf53f3 [tests] add a test case of mDNS service restarting (#7363) 2022-02-15 13:41:10 -08:00
Yi a201e9d5d0 [tests] add tests for NAT64 prefix advertisement (#7361)
This commit adds tests for NAT64 prefix
advertisement. BORDER_ROUTING_NAT64 is set to 1 to enable the feature
in tests.

It also adjusted some util functions for prefixes and routes in
netdata.

Testing outbound connectivity to IPv4 hosts is not covered yet. It
will be added after we update OTBR.
2022-02-11 00:08:10 -08:00
Simon Lin 9fcdbed9c5 [tests] make sure BRs not sending disallowed ICMPv6 in Thread traffic (#7357) 2022-02-09 20:21:16 -08:00
Sam Kumar 404093d9fe [tcp] add basic CLI-based test (#7336) 2022-01-31 20:33:06 -08:00
Simon Lin 40b5fd3749 [trel] small updates and adding trel test (#7205)
- Adds platform API `trelDnssdInitialize` to initialize TREL
  DNS-SD module.
- Adds `test_trel_connectivity.py` test.
- Fixed `Border Router` TREL test to really use TREL.
2022-01-28 12:07:42 -08:00
Simon Lin 22bb1346fa [github-actions] add BR --radio-version test (#7345) 2022-01-24 09:48:40 -08:00
Simon Lin 167ffe9393 [srp-client] add lease changing test (#7280) 2022-01-18 08:52:03 -08:00
Kangping 395d502576 [cli] fix invalid commissioner mgmtget cli arguments in tests (#7325)
This commit fixex the wrong commissioner mgmt cli args which uses
"binary" to indicate following binary args in HEX string - the format
has been changed to "-x" in #5549.

The reason why cli-commissioner.exp doesn't fail consistently is not
fixed by this commit.
2022-01-15 16:38:29 -08:00
whd 7a1c843ffd [github-actions] run MATN test cases as an individual job (#7308)
MATN test cases often takes long time. We'd better move them to a
separate job so that we don't have to rerun MATN cases every time a
border router test fails.
2022-01-13 10:53:44 -08:00
Simon Lin 3c260bd7c7 [thread-cert] cache Border Router test results (#7303)
This commit caches Border Router test results so that success BR tests
will be skipped when re-running the workflow.

The cache keys are chosen in a way that:
- Each new PR push will trigger cache miss and run the tests
- Each ot-br-posix change will trigger cache miss and run the tests
2022-01-11 23:25:21 -08:00
Simon Lin cb31c67e54 [thread-cert] misc enhancements to improve reliability (#7298)
This commit introduces a number of enhancements to `thread-cert`
Border Router tests to improve reliability:
- Checks `ot-rcp` process status for OTBR tests to help catch errors
  earlier
- Make sure `ot-rcp` processes are terminated after one test to avoid
  corrupting subsequent tests
- Upload core dump as artifacts if otbr-agent crashed
2022-01-11 23:23:14 -08:00
Simon Lin e736d2488d [tests] add test steps to verify case-insensitive query works (#7198) 2022-01-03 21:24:08 -08:00
Eduardo Montoya a65afcdbb0 [border-router] add test to verify multicast traffic on a SBBR (#7183)
Make sure a SBBR handles own multicast traffic routing.
2021-12-29 22:57:40 -08:00
Simon Lin ca6cbba472 [tests] add ping test using LLA source (#7260) 2021-12-28 12:21:24 -08:00