Commit Graph

397 Commits

Author SHA1 Message Date
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
Moandor acbd38a5f1 [posix] add radio URL parameter cca-threshold (#5832) 2020-11-20 16:01:57 -08:00
Jing Ma 5bd9aba799 [thread-cert] refactor case 5.2.7 using pktverify (#5786) 2020-11-17 23:01:28 -08:00
Rongli Sun e73882255f [tests] fix tun-realm-local-multicast.exp (#5821)
This commit introduces short wait time per new router
to allow link/route establishment.
2020-11-16 22:32:40 -08:00
Jing Ma 1484847c55 [thread-cert] refactor case 5.2.6 using pktverify (#5777) 2020-11-16 22:29:25 -08:00
Jing Ma 4e696af655 [thread-cert] refactor case 5.2.4 using pktverify (#5790) 2020-11-16 22:28:59 -08:00
Jing Ma 1fc75aee9c [thread-cert] refactor case 5.2.5 using pktverify (#5798) 2020-11-16 22:28:21 -08:00
Jing Ma 580d649e97 [thread-cert] refactor case 5.3.3 using pktverify (#5809) 2020-11-16 18:10:14 -08:00
Jing Ma 503f72dfc1 [thread-cert] refactor case 5.3.4 using pktverify (#5811) 2020-11-16 17:18:23 -08:00
Jing Ma 1fc0a7be77 [thread-cert] refactor case 5.3.2 using pktverify (#5803) 2020-11-16 17:17:48 -08:00
Jing Ma 515b2bb067 [thread-cert] refactor case 5.3.5 using pktverify (#5814) 2020-11-16 08:57:36 -08:00
Jing Ma 8e705b0ada [thread-cert] refactor case 5.3.1 using pktverify (#5800) 2020-11-16 08:53:26 -08:00
Moandor 5bc7e7d6a0 [posix] add radio URL parameter fem-lnagain (#5788) 2020-11-09 10:43:46 -08:00
Yakun Xu 6fda0786ed [posix] forkpty-arg value as a single argument (#5772) 2020-11-08 23:31:11 -08:00
Rongli Sun 59b4a51f99 [tests] fix tun-realm-local-multicast.exp (#5776)
Given the linear topology in this test, this commit
introduces wait time so that the Thread Links are
synced well before ping happens.
2020-11-07 19:46:21 -08:00
Jing Ma ebb2fd53ef [thread-cert] refactor case 5.2.3 using pktverify (#5775) 2020-11-05 21:11:05 -08:00
Simon Lin d5ee7ddbd4 [scripts] enhance cert_suite to run multiple tests concurrently (#5586) 2020-11-05 09:04:58 -08:00
Jing Ma 014b4fbe70 [thread-cert] refactor case 5.1.4 using pktverify (#5723) 2020-11-04 20:47:02 -08:00
Jing Ma f6f76b74a3 [thread-cert] refactor case 5.1.8 using pktverify (#5739) 2020-11-04 20:45:01 -08:00
Jing Ma 9fa2c70742 [thread-cert] refactor case 5.1.9 using pktverify (#5743) 2020-11-04 19:24:51 -08:00
Jing Ma 606573d134 [thread-cert] refactor case 5.2.1 using pktverify (#5770) 2020-11-04 10:46:48 -08:00
Jing Ma a698677dd4 [thread-cert] refactor case 5.1.13 using pktverify (#5766) 2020-11-04 10:42:56 -08:00
Jing Ma a60cc488df [thread-cert] add more info and tlv checks in case 5.1.7 (#5740) 2020-11-04 10:42:22 -08:00
Jing Ma 2fb64c6055 [thread-cert] refactor case 5.1.6 using pktverify (#5730) 2020-11-02 23:34:19 -08:00
Jing Ma 5dd9aec1cd [thread-cert] refactor case 5.1.10 using pktverify (#5757) 2020-11-02 23:26:41 -08:00
Jing Ma e21864df16 [thread-cert] refactor case 5.1.12 using pktverify (#5765) 2020-11-02 23:00:52 -08:00
Jing Ma 3da49e6f8f [thread-cert] refactor case 5.1.11 using pktverify (#5756) 2020-11-02 22:59:37 -08:00
Simon Lin 61cf7c9a48 [dua] implement ND Proxy callbacks (#5595)
This commit:
- Add callback for Domain Prefix events
- Add callback for ND Proxy events
- Add corresponding test to verify ND Proxy works
- Some misc enhancements to the Backbone tests
  - Run sudo modprobe ip6table_filter in Docker host so that ip6tables
    works in ubuntu docker instances.
  - Use -DOTBR_REST=OFF -DOTBR_WEB=OFF for building OTBR Docker image
    since these features are not used in tests.
  - Setup radvd on Host to send Router Advertisements for the Domain
    Prefix using configuration: AdvOnLink on; AdvAutonomous off;
    AdvRouterAddr off;
  - Set sysctl net.ipv6.conf.eth0.accept_ra=2 for BBR and Host
2020-11-02 08:06:45 -08:00
Jing Ma 33ea36f28e [thread-cert] refactor case 5.1.5 using pktverify (#5728) 2020-11-02 07:04:27 -08:00
Simon Lin 050129a819 [virtual-time-simulator] optimize ACK radio events (#5559)
This commit optimizes Virtual Time Simulator by only sending ACK to
nodes that are expecting it.
2020-10-30 12:28:39 -07:00
Simon Lin 903f677215 [dua] implement Backbone query and answer (#5664)
This commit implements DUA features of Thread 1.2 DUA that involves
sending and processing Backbone query and answer:

- Extend address query to the Backbone Link
  - Send BB.qry for Thread address query
  - Send ADDR_ANS.ntf for BB.ans
- DAD process
  - PBBR to send BB.qry on the Backbone link (3 times if not answered)
  - PBBR to receive and handle BB.qry and sends BB.ans
  - PBBR to receive BB.ans and sends ADDR_ERR.ntf if duplicated
- PRO_BB.ntf
  - Send PRO_BB.ntf when DUA registration is updated
  - Handle PRO_BB.ntf
- Add test_dua_dad.py to test the DAD process when it was successful
  or duplicated
  - Verify the normal DAD process
  - Verify Address Query can be extended to the Backbone link
  - Verify DAD duplicate is handled correctly
  - Verify PRO_BB.ntf for duplicated DUA is handled correctly
2020-10-30 11:18:05 -07:00
Li Cao 42fb2e44be [low-power] implement forward tracking series (#5608)
This commit implements the Forward Tracking Series feature in Link Metrics.

- Two new apis are added:
  - otLinkMetricsSendMgmtRequestForwardTrackingSeries, which is used
    to send an MLE Link Metrics Management Request
  - otLinkMetricsSendLinkProbe, which is used to send an MLE Link Probe

- A new class LinkMetricsSeriesInfo is used to maintain the data of
  one Series configured by a neighbor. This class inherits
  LinkedListEntry and each Neighbor has a list of
  LinkMetricsSeriesInfo. All LinkedListEntrys are allocated and freed
  by a Pool in LinkMetrics.

- To specify SeriesFlags in cli command for Forward Tracking Series, a
  similar approach with LinkMetricsFlags is used. Another character
  flags is used to represent SeriesFlags.

- Whenever the node receives a frame (including ACK) from a neighbor,
  it would call Neighbor::AggregateLinkMetrics which goes through each
  LinkMetricsSeriesInfo entry in the neighbor's list and aggregate the
  data if the frame type matches the entry.

- Two test scripts are added to test this function:
  - v1_2_LowPower_7_2_01_ForwardTrackingSeries.py
  - v1_2_LowPower_test_forward_tracking_series.py
2020-10-29 20:04:39 -07:00
Yakun Xu 0603ed1c14 [test] verify realm-local multicast on POSIX (#5738) 2020-10-29 10:37:51 -07:00
Moandor 713662bf80 [continuous-integration] use lcov to generate coverage data (#5635) 2020-10-29 08:34:37 -07:00
Jing Ma 305bdd8897 [thread-cert] refactor case 5.1.3 using pktverify (#5708) 2020-10-28 08:41:05 -07:00
Jing Ma 3e776b0c46 [thread-cert] refactor case 5.1.2 using pktverify (#5686) 2020-10-27 22:58:20 -07:00
Simon Lin 8707b63894 [scripts] add MLR Backbone multicast routing test (#5578)
- backbone/test_mlr_multicast_routing.py verifies the basic features
  of Backbone multicast routing

- backbone/test_mlr_multicast_routing_timeout.py verifies that MLR
  timeout works

- backbone/test_mlr_multicast_routing_commissioner_timeout.py verifies
  that Commissioner MLR timeout works
2020-10-26 22:46:48 -07:00
Jing Ma 7b18147e03 [thread-cert] refactor case 5.1.1 using pktverify (#5680) 2020-10-26 08:16:51 -07:00
Simon Lin f192c6dd00 [posix] fix MLE sends ICMPv6 destination unreachable (#5585) 2020-10-23 11:07:34 -07:00
Simon Lin e00e5b3d70 [backbone-router] backbone TMF enhancements (#5660)
This commit enhances Backbone TMF:

- Subscribe Backbone TMF on multicast addresses on the Backbone
  interface
  - All Network BBRs Multicast Address
  - All Domain BBRs Multicast Address

- Thread Netif no longer subscribe these two addresses, because BBR
  Multicast Addresses are only defined for the Backbone Link in Thread
  Spec 9.4.8.1

- Make sure backbone messages are using link local src addresses
  - Verify src addr for b/bmr messages
2020-10-23 08:48:54 -07:00
Yakun Xu ff76aac3db [cli] add energy scan channel (#5677) 2020-10-21 12:17:28 -07:00
Simon Lin 913037b508 [simulation] add configuration MAX_NETWORK_SIZE (#5565)
Currently, the WELLKNOWN_NODE_ID = 34 is not properly defined.

- In virtual time simulation, WELLKNOWN_NODE_ID limits the number of
  ports each PORT_OFFSET can occupy. The virtual time simulator
  listens at the nodeid=0 port rather than nodeid=34 port. So, there
  is no such thing as wellknown node ID in virtual time simulation.

- In real time simulation, the sniffer listens at the nodeid=34
  port. This PR changes it to nodeid=0 port to be consistent with
  other parts.

- In posix virtual time, the simulator listens at the nodeid=0
  port. So, there is no such thing as wellknown node ID in Posix
  virtual time.

This commit changes it to MAX_NETWORK_SIZE = 33 and make it
(configuration OPENTHREAD_SIMULATION_MAX_NETWORK_SIZE) configurable in
simulation by:

- Makefile configuration: MAX_NETWORK_SIZE
- Cmake configuration: OT_SIMULATION_MAX_NETWORK_SIZE
2020-10-16 10:57:03 -07:00
Jing Ma c2903713a1 [thread-cert] refactor case 9.2.12 and 9.2.13 using pktverify (#5442) 2020-10-14 12:23:55 -07:00
Jing Ma 690ddbf881 [thread-cert] enhance case 5.6.7 for data version increment (#5643) 2020-10-13 22:40:57 -07:00
Jintao Lin eee652cc9e [cli] add command to set/get external FEM's LNA gain (#5563) 2020-10-13 08:12:14 -07:00
Yakun Xu d0d2b71af3 [ip6] no anycast as source address (#5632)
- Check source address of packets from users
- Determine anycast address by MLE API for accuracy
- Replace anycast address with a valid unicast address when sending
  with platform UDP in UDP layer
- Replace anycast address with a valid unicast address in IP layer
2020-10-13 08:10:29 -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
Simon Lin 8642f998cc [thread-cert] set node addr64 to EXTENDED_ADDRESS_BASE + nodeid (#5601)
This commit sets nodes' extaddrs to 0x166e0a0000000000 + nodeid, which
does not change node behavior but makes it easier for us to analyze
pcaps.
2020-10-11 23:02:29 -07:00
Jing Ma f01f4d96a3 [thread-cert] refactor case 9.2.7 using pktverify (#5459) 2020-10-11 16:26:13 -07:00
Jing Ma d2d4df6260 [thread-cert] refactor case 5.5.3 using pktverify (#5448) 2020-10-11 16:25:32 -07:00