Commit Graph

321 Commits

Author SHA1 Message Date
Abtin Keshavarzian 5d09e9ca4f [mle] update number parent requests in an attach cycle (#7538)
This commit updates the MLE attach process so that in the first attach
cycle device tries a total of six MLE Parent Requests, the first two
to routers only followed by four to routers and REEDs. For example,
the six Parent Request message will be used before device can decide
to act the leader. An MTD in the next attach attempt (if cannot find a
parent in first attempt cycle), will go to the model of two Parent
Requests (first to routers, then to routers/REEDs).

This change impacts the time it takes for a device to start as leader
(due to increased number of Parent Request and wait time). This commit
updates different test scripts to address the change in the wait
time. It adds a new `config.LEADER_STARTUP_DELAY` constants which is
used for wait time for leader to start.
2022-07-07 16:50:21 -07:00
Simon Lin 86e642379c [thci] configure backbone netif (#7804)
The backbone netif is always set to `eth0` in the original THCI. This
commit allows to configure backbone netif via THC parameter `Param8`.
2022-06-29 13:32:00 -07:00
JaneFromSilabs 7576306553 [thci] support 1.3 border router configurations (#7826)
Adding support for 1.3 style border router configurations which are
different from the 1.2 style border router configurations.  The
'device capabilities' is used to differentiate between these 2 device
types to assign them their needed configuration parameters.

Also moving restartAgentService to the proper class.
2022-06-28 09:32:39 -07:00
Simon Lin b7c2c52d5c [thci] wait for netdata to stabilize if BORDER_ROUTING is enabled (#7798)
A BR with `BORDER_ROUTING` feature may add OMR prefix and external
routes to the network data when Thread is started.  The network data
changes may incur additional Thread communications that may interfere
with certification traffic.

This commit enhances THCI to wait for the network data to stabilize
after the BR is started.
2022-06-14 20:11:27 -07:00
JaneFromSilabs d0a7147165 [thci] add support for Thread Version 4 (1.3) (#7806) 2022-06-13 10:36:54 -07:00
Jonathan Hui 33cc75ed3b [srp-server] implement TTL processing (#7738) 2022-05-31 22:01:27 -07:00
Jonathan Hui f75d03f6cb [mle] delay sending multicast Link Request (#7745)
A device sends a multicast Link Request message after becoming a
router to quickly and efficiently establish links with neighboring
routers. However, sending a Link Request too quickly can fail in cases
where the neighboring router(s) have not yet received the updated
Router ID set from the Leader.

This commit delays sending the Link Request to allow time for
neighboring routers to receive the updated Router ID from the Leader.
2022-05-26 09:16:49 -07:00
Eduardo Montoya 7cd73f30a4 [thci] version string depending on capabilities (#7665)
Return different output of `ValidateDeviceFirmware` depending on the
device's capabilities. This allows to have a single THCI file for the
same vendor for different device's versions.
2022-05-09 20:57:00 -07:00
Eduardo Montoya 43be7f41f8 [thci] logging cleanup (#7654)
Remove excesive logging redundancy:
- `API` decorator is enough to show test script calls with arguments
- `__executeCommand` already prints all OT commands and arguments
- Command timestamp is irrelevant in most cases
- Some extra detail logging lines are left commented in case they
  are needed for some debugging

As a result test logs are much easier to follow and resulting files
are much smaller.
2022-05-05 14:03:25 -07:00
Eduardo Montoya d2f18d5ebc [thci] remove support for legacy Harness tool (#7651)
Currently the official Thread Harness has support for device
capabilities even for Thread 1.1 tests.
2022-05-02 09:42:15 -07:00
Simon Lin cbd1d50995 [otci] support filter new log formats (#7586) 2022-04-11 14:08:39 -07:00
Eduardo Montoya 5eb0537cf0 [thci] increase BBR Sequence Number when dataset changes (#7558)
Make sure BBR Sequence Number is increased when Re-registration
Delay or MLR Timeout changes.
2022-04-07 11:46:06 -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
Eduardo Montoya 01ff8952ab [thci] do not set P_slaac flag for Domain prefix (#7557)
According to the Thread Specification the `P_slaac` flag should be
set to false for the Domain prefix.
2022-04-03 18:11:38 -07:00
Eduardo Montoya f9f316314b [bbr] revert add bbr skipseqnuminc command for reference device (#7534)
This reverts commit c9066b6506 (#7283).
2022-03-29 22:16:53 -07:00
Eduardo Montoya 95aaae9fdb [thci] fix RA configuration for eth0 in the host device (#7506)
`accept_ra` was not being set properly for host reference device.

Some cleanup is added for simplification.
2022-03-22 21:25:25 -07:00
Eduardo Montoya c24e5dd6c4 [thci] selectively configure Domain Prefix advertisement on the host (#7491)
Implement changes in `setupHost` method to be able to selectively
configure the RA for the Domain Prefix.
2022-03-21 09:27:02 -07:00
Eduardo Montoya 15a9c4c0bd [thci] unify IPv6 prefix representation (#7477)
Switch to IPv6 dotted-quad format in all uses.
2022-03-14 11:25:07 -07:00
Eduardo Montoya 73eba74fc8 [thci] avoid further delay after ping command (#7457)
Test L5.3.5 is failing sometimes because there are unwanted data
requests during the second ping round. This can be mitigated by
finishing earlier with this round so there is no need for children
to synchronize CSL.
2022-03-09 08:45:38 -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
Eduardo Montoya db0833f73c [thci] fix setBbrDataset (#7455) 2022-03-07 10:17:25 -08:00
Simon Lin 417b5645be [thci] support ssh connection with root user (#7399) 2022-03-01 23:46:46 -08:00
Simon Lin 13af8ad0a5 [otci] add srp_client_clear_service (#7442) 2022-02-27 22:10:48 -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
Simon Lin 4fb966e3eb [otci] address small reliability issues (#7372)
This commit addresses several small reliability issues revealed during
testing.
2022-02-08 21:51:06 -08:00
JaneFromSilabs 9e0bf6a263 [thci] prefix fix for TH 1.1 border router 7.x.x cases (#7367) 2022-01-31 10:25:09 -08:00
Eduardo Montoya 1c6062c610 [thci] fix implementation of setKeepAliveTimeOut (#7373)
Thread 1.2 harness uses this method to set the child timeout in
DUA-TC-10, DUA-TC-21 and DUA-TC-22.
2022-01-28 12:00:53 -08:00
Karthick 9f70bafd67 [thci] update registerMulticast to align with #7253 (#7364)
Enabling registration to multiple mcast addresses on the same command
line in THCI.
2022-01-28 08:21:03 -08:00
Simon Lin 9e17e471ad [thci] print traceback and re-raise exceptions (#7356)
THCI used to catch Exceptions and print errors using
`ModuleHelper.WriteIntoDebugLogger`. However, in most of time it just
help hide the actual issue and make it harder to debug.

Re-raising the exceptions should be a better approach:
- @API decorator will print the full exception Traceback via
  `ModuleHelper.WriteIntoDebugLogger` and then re-raise.
2022-01-28 08:14:59 -08:00
Eduardo Montoya d4e041096f [bbr] implement new Sequence Number increase rules (#7342)
"BBR Sequence Number Updating" section in Thread Specification
requires special wraps when increasing BBR Dataset Sequence Number.
2022-01-25 18:20:36 -08:00
JaneFromSilabs 4af585400e [thci] reset and multicast changes (#7340)
- THCI changes for bbr reset procedure to make a better effort to
  reset and to also make sure to restart the otbr-agent prior to
  attempting a factoryreset to cover the case where the agent cannot
  currently communicate to the rcp.

- THCI change to move from sudo service restart otbr-agent to sudo
  systemctl restart otbr-agent, which is more comprehensive.

- THCI changes for multicast to use ipmaddr in both soc and bbr cases.
2022-01-24 09:49:59 -08:00
Simon Lin 0dccf05473 [otci] fix read error after close (#7331)
This commit fixes OTCI that CLI connection via serial may fail when
closing.
2022-01-20 08:56:47 -08:00
canisLupus1313 556cee64d3 [thci] add implementation of setVrCheckSkip in THCI (#7329) 2022-01-19 14:03:01 -08:00
tomaszkob89 bb658e2705 [thci] fix THCI for T1.1 9.2.4 commissioner (#7311)
During running T.1.1 tests with the T.1.2 capable sample it turned out
that 9.2.4 commissioner TC is not working when using the device that
is T.1.2 capable. The reason is that in MGMT_ACTIVE_SET
listSecurityPolicy list has only two elements and we are entering the
code, where we assume it is three element, which raises IndexError.
2022-01-13 10:38:49 -08:00
Eduardo Montoya c9066b6506 [bbr] add bbr skipseqnuminc command for reference device (#7283)
Add a command to allow skipping the increase of Sequence Number
when recovering the BBR Dataset from Network Data.
2022-01-13 09:59:30 -08:00
Eduardo Montoya 32bdcae210 [thci] discard IPv4 link local address in mDNS browsing (#7277)
When looking for the Border Agent's link local address in the mDNS
response do not consider a possible IPv4 address record.
2022-01-03 15:17:27 -08:00
Eduardo Montoya f10e662692 [thci] improve mDNS browsing using Zeroconf (#7249)
Previous approach with `dig` was not enough because it was only
parsing one mDNS response and not taking account that the response
could be from an inactive Border Router.

Use Python Zeroconf to properly parse all services.
2021-12-23 12:55:47 -08:00
tomaszkob89 4fcd48ce8c [thci] drop empty lines returned in command outout from the response (#7236)
In some cases the first element from the output from __executeCommand
might be empty line, which casues command failures like on below
trace:

__executeCommand('extaddr',) returns ['', '166e0a0000000001', '', 'Done']
FUNC getMAC failed: invalid literal for int() with base 16: ''

This commit filters out empty string from the result of
__executeCommand.
2021-12-22 22:23:02 -08:00
Eduardo Montoya 348f0a10a3 [thci] register multicast addresses on the host side (#7193)
Make use of the `mcast6.py` application in order to listen to
multicast traffic on the host side when required by the harness.
2021-12-22 09:51:47 -08:00
Simon Lin 54d848e11b [otci] add method to run shell commands (#7230) 2021-12-13 23:43:11 -08:00
Kacper Szeweńko 775c568286 [thci] fix failing Thread 1.1 Cert Tests (#7199)
This commit fixes tests of 1.1 certification: SED 6_5_1, 6_5_2, 6_5_3,
9_2_8; Commissioner 9_2_4; Leader 9_2_11
2021-11-26 22:29:44 -08:00
tomaszkob89 cf4b71d8b9 [thci] fix issue with not initialized isPowerDown flag (#7196)
When the GRL starts, it calls initialize() reset() method on each
device. Reset method call fails due to missing (uninitialized)
attribute `isPowerDown`.
2021-11-23 10:03:10 -08:00
canisLupus1313 0e8b6604cb [thci] add setCcmState method in thci (#7179)
This commit adds API method setCcmState to THCI file.
2021-11-19 10:34:13 -08:00
JaneFromSilabs e67f432284 [thci] fix for GRL TH1.1 Leader 5.5.2, Leader 5.5.3 (#7163) 2021-11-19 08:00:14 -08:00
tomaszkob89 130957d489 [thci] fix issue with isPowerDown flag and reset method (#7160)
Some certification tests are failing because otbr-agent service is not
started back after calling powerDown (isPowerDown flag is kept False
and reset function fails on checking thread state - since the service
is stopped, we can't return status).

Also minor fixes for printing logs, disabling paramiko DEBUG level.
2021-11-17 11:32:53 -08:00
Eduardo Montoya 825227a71a [thci] fix mdns_query (#7154)
Avoid parsing responses for not expected cases.

Fixes some issues with Thread 1.2 certification test cases in which
it's not required to parse the mDNS response.
2021-11-17 10:14:32 -08:00
Simon Lin 34c8c82ee4 [dnssd] add tests for Service Instance names with spaces (#7143)
This commit adds tests to make sure Service Instance names with spaces
are handled properly by SRP and DNS-SD.
2021-11-15 10:15:10 -08:00
Eduardo Montoya b4c76b3e17 [thci] allow for sufficient time after a ping from OTBR (#7158)
Some certification tests are failing because not enough delay is
applied after a Linux ping command is sent and the capture misses the
ICMP transaction.

Also removing unneeded check for Thread 1.2 harness version when
reconnecting to the serial port after a reset.
2021-11-12 13:31:58 -08:00
Simon Lin c02d111026 [otci] misc enhancements (#7104) 2021-11-10 22:30:19 -08:00