Commit Graph

22 Commits

Author SHA1 Message Date
Yakun Xu 39ce8117a5 [simulation] support simulating radio over IPv6 (#10194)
This commit adds support to simulate Thread radio over IPv6.

With this commit, a simulation will be simulated over either IPv6 or IPv4.
If it's simulated on IPv6, it communicates with other simulation nodes
in IPv6 group `ff02::116`. And if it's simulated on IPv4, it communicates
with other simulation nodes in IPv4 group `224.0.0.116`.

Note that simulating virtual time is not included in this commit.
2024-05-13 09:27:54 -07:00
Zhanglong Xia 2a502abb88 [posix] add channel mask configurations to configuration file (#9391)
This commit allows developers to set the preferred channel mask and
the supported channel mask in the configuration file. The posix
platform selects channel masks from the configuration file based on
the region code when the region code is updated.
2023-09-18 07:17:54 -07:00
Jonathan Hui 36b1b838d9 [expect] properly configure operational dataset (#9183) 2023-06-16 11:38:09 -07:00
Lukasz Duda 1c190a4f6d [expect] split and extend tests for discovery (#8832)
Signed-off-by: Lukasz Duda <lukasz.duda@nordicsemi.no>
2023-03-30 15:02:39 -07:00
Yang Sun 82e816b82f [mle] retransmit link request after router reset (#8704)
According to Thread 1.3.0 Section 4.7.1.3, router synchronization
after reset requires the multicast link request message to be
retransmitted until a response is received, or the maximum
transmission limit has been reached. If the router was a leader or had
more than 5 children prior to reset, it MUST be retransmitted as a
critical message. Each multicast retransmission of an MLE Message on a
TL1 or TL2 Link must be delayed by MLE_MULTICAST_RETRANSMISSION_DELAY
multiplied by a random value between 0.9 and 1.1 with a resolution of
at least 1 ms.

This commit implements the above requirement. With this requirement,
in the cases when a router is reset and there is no other router to
respond to the link request then it takes longer time for the router
to join thread network. Thus some test cases are modified to allow
longer router sync time in such cases.
2023-02-06 21:10:38 -08:00
Simon Lin db2e313ef0 [cli] disallow concurrent commands (#6695)
This commit disallows concurrent commands.

With this commit, the CLI only execute a new command after it complete
the previous command. CLI can also prompt properly after the command
execution is done.

Other fixes and enhancements:
- Fixes premature command prompt
- Add ping async command for ping in async mode: output Done
  immediately but print ping responses later on.
- Fixes networkdiagnostic get outputs multiple Done by always waiting
  for 5 seconds.
2021-09-09 20:46:43 -07:00
Jonathan Hui aaabf25ff2 [network-key] change name from master to network (#6721) 2021-06-16 23:07:23 -07:00
Li Cao d4d81c39c9 [cli] add cli to get All Thread Nodes multicast address (#6500)
This commit adds APIs to get Link/Realm Local All Thread Nodes
multicast addresses. This commit also adds cli command to get
meshlocal prefix alone for writing tests.
2021-04-22 19:14:56 -07:00
Yakun Xu ad91ac3b9c [posix] enable expect tests on macOS (#5384)
This commit enables expect tests on macOS, also includes the following
required changes:

* Fixed bound to interface issue on macOS.
* Added ability to configure scan period, because macOS environment on
  GitHub Actions is much slower.
2021-02-02 21:50:18 -08:00
Yakun Xu d9acce1177 [test] enhance parsing addresses (#6045)
Expect sometimes matches the pattern before a line is fully printed to
TTY. As a result, the address returned may not be accurate. This commit
fixes this issue by matching line breaks.
2021-01-08 08:32:07 -08:00
Moandor 069e26b51e [key-manager] remove default master key (#5998)
When initializing, we should use randomly generated network parameters
instead of default ones, to eliminate the possibility of unintentional
use of default credentials.
2020-12-30 11:25:48 -08:00
Yakun Xu 7a7390b9ee [test] separate code coverage data files (#5920)
This commit ensures each node create its own profile data, so that they
can be merged after tests to produce more accurate profile data.

This commit also prints the coverage data of message.cpp after all
profile data are merged.
2020-12-07 13:23:26 -08:00
Moandor 9d9646afaa [spinel] RCP restoration on failures (#5694)
This commit implements the RCP restoration on failure feature. It
keeps the host process running while resetting and initializing the
RCP.
2020-11-26 08:57:13 -08:00
Yakun Xu 9164355b8c [ip6] enable multicast loop (#5848)
This commit enables the feature IPV6_MULTICAST_LOOP into OpenThread IPv6
stack. The default-enabled feature allows a node receives a multicast
message sent by its own.
2020-11-26 08:29:03 -08:00
Yakun Xu d33c2f12af [test] add rcp-ncp node type (#5847)
This commit enables `script/test` to run cert tests on NCP nodes of
POSIX platform.
2020-11-23 17:02:11 -08:00
Yakun Xu 0603ed1c14 [test] verify realm-local multicast on POSIX (#5738) 2020-10-29 10:37:51 -07:00
Yakun Xu 9e3b450218 [expect] refactor common functions (#5634)
* unify node creating and destroying
* simplify switching between nodes
2020-10-12 08:21:48 -07:00
Yakun Xu cbf1a19483 [cli] support joiner discerner (#5298)
This commit adds support joiner discerner in CLI. The format of joiner
discerner is `number/length`. For example `0xabc/12` means the discerner
value is `0xabc` and the length is `12`.
2020-07-27 20:27:21 -07:00
Moandor 6e98f3bb5b [test] move expect timeout settings to _common.exp (#5242)
This moves all settings of timeout to one place. Also changes the
default timeout to 10 seconds, can probably solve the occasional
timeout when dataset commit active.
2020-07-15 20:57:56 -07:00
Simon Lin b0bff4f8c3 [github-actions] fix expects fail by chance (#5157)
This commit tries to reduce expects fails in GitHub actions:
- wait_for only sends command when it's not empty
- increases the default expect timeout from 1s to 3s.
2020-06-30 11:01:10 -07:00
Moandor 5acad30791 [test] include CLI tests in RCP mode (#5159)
This makes expect run all cli-*.exp and posix-*.exp tests in RCP mode.
New scripts should use the function spawn_node in _common.exp to spawn
new processes. This is compatible with both simulation mode and RCP
mode.
2020-06-30 08:40:46 -07:00
Moandor 4b5eeadee6 [test] modularize expect scripts (#5056)
This puts the scripts setting up Thread networks into separate files
so that they can be reused by multiple test scripts. After this we can
split the tests in cli-2-nodes.exp into multiple files without having
to repeat codes in each file.
2020-06-05 22:16:54 -07:00