445 Commits

Author SHA1 Message Date
Simon Lin fc513b298d [otci] fix parse dataset security policy (#6661) 2021-05-21 08:27:38 -07:00
kangping 6f2b818381 [srp-server] add API for getting LEASE and KEY-LEASE (#6517) 2021-05-07 21:26:36 -07:00
Simon Lin c9f1643883 [backbone-router] add cli command for MLR listeners (#6542)
This commit makes the CLI command for printing MLR listeners available
for non Reference Devices.
2021-04-30 08:07:16 -07:00
Simon Lin 8168d7a403 [thci] dump syslog when reset (#6185) 2021-04-26 13:03:00 -07:00
Simon Lin 3128a8e7d5 [otci] add SRP server & client utilities (#6512) 2021-04-26 09:17:05 -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
Simon Lin ce725f8070 [otci] fix test random fails (#6478) 2021-04-19 07:48:33 -07:00
kangping 423575fceb [meshcop] support Thread 1.2 Security Policy flags (#6320) 2021-04-14 08:16:08 -07:00
Simon Lin d5855ab74b [style] bump yapf version to 0.31.0 (#6434) 2021-04-12 07:30:27 -07:00
Jonathan Hui 414cba3048 [cli] add more output to eidcache command (#6408) 2021-04-07 08:41:08 -07:00
whd a145d24352 [ping-sender] let ping return statistics in OTCI (#6370)
- Ping command in CLI will print Done in the end, after printing
  replies and statistics. The old behavior is, ping command prints
  Done before any replies.
- In OTCI, let ping function return statistics.
- Support timeout parameter in ping command.
- Fix a bug that the arguments are not properly passed to ping in
  node.py.
- Adjust timeouts in tests.
2021-04-07 08:40:18 -07:00
Abtin Keshavarzian 0c003844b0 [docs] fix typos in documentations/comments and small style changes (#6374) 2021-03-31 17:05:10 -07:00
whd bbbeee17fb [ping-sender] show ping reply statistics (#6341) 2021-03-30 09:54:14 -07:00
Eduardo Montoya 9265876f15 [harness-thci] remove pylint issues from THCI file (#6219)
Remove some `pylint` issue and fix `ValidateDeviceFirmware` method.
2021-03-01 08:02:59 -08:00
Eduardo Montoya 1d03d71a20 [harness-thci] remove pylint issues from THCI file (#6136) 2021-02-04 13:51:59 -08:00
Simon Lin e49d20ff02 [otci] get prefixes/routes/services in thread network data (#6060)
This commit changes these methods to return corresponding entries from
Thread Network Data rather than local network data.
- get_prefixes
- get_routes
- get_services

Added local version to retrieve entries from local network data.
- get_local_prefixes
- get_local_routes
2021-01-29 07:30:36 -08:00
Simon Lin de62590edb [otci] get router link information (#6105)
This commit adds link information to the router table
(i.e. get_router_table()).
2021-01-22 11:59:55 -08:00
Simon Lin 22b043bf62 [otci] add OpenThread Controller Interface library (#5779)
This commit introduces the Proof of Concept implementation of the
OpenThread Controller Interface (OTCI) which can be used to connect
and manage various kinds of OT devices.

This commit also adds the tests to verify that OTCI works for both
simulation and real OT devices.

- Device Connectors
  - CLI Virtual Time Simulation
  - CLI Real Time Simulation
  - CLI SOC Device
  - NCP Virtual Time Simulation (not all APIs work)
  - Real device via SSH
- OTCI tests of simulation devices are executed in Github Actions
- OTCI tests of real devices can be executed like below:

# Install otci python library
cd tests/scripts/thread-cert/otci && python3 setup.py install --user
# Test OT CLI SOC device at /dev/ttyACM0
REAL_DEVICE=1 OT_CLI_SERIAL=/dev/ttyACM0 python3 tests/test_otci.py
# Test OTBR device via SSH
REAL_DEVICE=1 OTBR_SSH=172.16.243.151 python3 tests/test_otci.py
2020-12-30 11:29:27 -08:00
Zhangwx e0ff88879f [harness-automation] fix the result parsed uncorrectly using Chrome 80 (#5958) 2020-12-21 07:13:44 -08:00
Zhanglong Xia 0d14e85439 [mle] let the command partitionid return the current partition id (#5872)
If user doesn't set the Partition Id using the command
'leaderpartitionid xxx', the current cli command 'leaderpartitionid'
always return 0. This commit renames the command 'leaderpartitionid'
to partitionid and let the command partitionid returns the current
leader Partition Id and add command partitionid preferred to set or
get preferred Partition Id.
2020-11-30 21:15:18 -08:00
Li Cao 39e6a881c5 [thci] add low power thci (#5835)
This commit adds THCI for Thread 1.2 low power features.
2020-11-25 08:34:25 -08:00
Simon Lin c0cae3477a [thci] add ssh connection support on OpenThread_BR.py (#5758) 2020-11-02 07:13:27 -08:00
Jing Ma 487ec3aa94 [harness-automation] update readme (#5646)
Update latest supported Test Harness version in README file.
2020-10-14 10:16:13 -07:00
Jonathan Hui dc9b032dad [mle] remove secure data request mode bit (#5560)
- Always set to 1 on transmission.
- Always ignore on reception.
2020-09-29 15:30:37 -07:00
Simon Lin 1d0af0d202 [thci] support network name with space for wpanctl (#5515) 2020-09-21 19:42:23 -07:00
Jonathan Hui 0d8a99bd05 [cli] implement network data print (#5543)
- Print human-readable network data.
- Create network data sub-command.
2020-09-19 10:28:17 -07:00
Jonathan Hui 42d76a0a4e [cli] change 'binary' arg to '-x' for consistency (#5543) (#5549) 2020-09-19 08:53:34 -07:00
Jonathan Hui 5bffd8bc4d [mac-filter] change whitelist/blacklist to allowlist/denylist (#5507)
To promote inclusivity and eliminate any unintentional bias.
2020-09-11 16:03:39 -07:00
Simon Lin d251a743fc [thci] avoid globbing in scanJoiner (#5513)
This commit avoids globbing in scanJoiner since xEUI can be "*".
2020-09-11 08:52:24 -07:00
Simon Lin d7343c877b [style] change python yapf column_limit to 119 (#5339) 2020-08-06 21:40:24 -07:00
Simon Lin fd66f2399f [thci] add OpenThread_BR THCI for OTBR CLI (#5085) 2020-07-23 16:34:19 -07:00
Jing Ma 75e21adcec [harness-automation] add a parser tool for TopologyConfig file (#4975)
- parse TopologyConfig file in Thread Certification Test Harness
- list multi-vendor device numbers by case
- list needed vendor device numbers for the whole certification testbed
2020-06-08 10:15:59 -07:00
Simon Lin 578b29fa60 [thci] fix address filter code issues (#4986)
This commit fixes existing issues in address filters.

- Fix misuse of address filter modes
  - disabled should be disable
  - Whitelist should be whitelist
  - Blacklist should be blacklist
- Fix errors in removing macfilter entries

Impact on 1.1 certification:

This commit does not impact 1.1 certification because only
OpenThread_WpanCtl.py is changed. In 1.1 certification, all golden
devices are controlled by OpenThread.py. OpenThread_WpanCtl.py is used
to control OTBR DUT, and mac filter feature is not useful for a
DUT.
2020-05-28 11:23:00 -07:00
Jing Ma 204308f4a7 [harness-automation] fix browser stuck in navigating to url (#5005) 2020-05-27 22:43:57 -07:00
Jonathan Hui dd0fa0d34c [shell] resolve shellcheck warnings (#4966) 2020-05-19 13:04:42 -07:00
Jonathan Hui cb9b353fb3 [scripts] apply shfmt changes (#4966) 2020-05-19 13:04:42 -07:00
kangping 092eb186e1 [joiner] add validation of joiner PSKd (#4934) 2020-05-14 08:41:51 -07:00
doublemis1 2153f5a4f4 [harness-automation] add another PDU Controller for EATON by SNMP (#4688)
Another PDU Controller used to power cycle between tests. Based by
SNMP protocol. To use EATON_PDU_CONTROLLER is needed PySNMP module
(added to requirements.txt). Also extend settings_sample.py by
comments with needed parameters to create EATON_PDU_CONTROLLER.
2020-05-04 14:43:34 -07:00
Jonathan Hui 082f7e9fdc [docs] apply prettier changes (#4881) 2020-04-24 16:22:00 -07:00
Jing Ma 8d5fc20eda [harness-automation] fix case selection issue when using Chrome 80 (#4648)
elem.txt might be null when the required reference devices could not
be met (either due to the quantity or the type) for specific test.
perform() will throw exceptions if elem.text is null since Chrome and
chromedriver 80. If elem is not shown in current case list window,
move_to_element() will not work either.
2020-04-08 11:34:41 -07:00
Jonathan Hui 2f63f74693 [thci] remove unused assignments (#4719) 2020-03-23 00:09:13 -07:00
Yakun Xu 34b83ae6c5 [script] simplify pretty (#4660)
* No need to bootstrap and configure for make pretty
* Use parallel to speed up make pretty
2020-03-10 22:15:07 -07:00
Eduardo Montoya 15f6808206 [cli] allow to escape separators (#4608) 2020-03-02 08:48:31 -08:00
Simon Lin c8dff09d3a [python] remove unnecessary calls to dict.keys() (#4576) 2020-02-18 10:16:06 -08:00
Yakun Xu 33808ebfba [style] apply google python style guide (#4501)
This commit applies and enforces Google's python style for tests.
2020-02-04 10:27:50 -08:00
周瑞祺 bfa84c26b0 [harness-sniffer] add OT sniffer support in Thread Test Harness (#4233)
Run Test Harness with OT sniffer.
2020-01-10 08:43:37 -08:00
Abtin Keshavarzian 0215527358 [spi-hdlc-adapter] fix undefined config macro warnings (#4458) 2020-01-09 11:45:39 -08:00
Jing Ma e79bb5557e [thci] add configurable device connection type for OpenThread_WpanCtl (#4364) 2019-12-16 21:00:12 -08:00
Jing Ma 554407d107 [harness-automation] support RF-shield test cases (#4231)
- RF-shield needed cases 6.3.2, 5.6.7, 9.2.9, 9.2.10 automation both
  on CV and IV testbed

- Added DUT2_DEVICE and SHIELD_GOLDEN_DEVICES in settings file which
  list the second DUT and golden devices in RF-box. The emulation of
  the required shielding/unshielding test environment is achieved by
  controlling the programmable RF-switch (example: Agilent 3499B + HP
  44476A microwave switch module) via scripts (configure
  SHIELD_CONTROLLER_TYPE and SHIELD_CONTROLLER_PARAMS in settings
  file) and final impacting the IN/OUT signal of the devices in the
  box.

- Added case_need_shield and device_order parameters in RF-shield
  needed case scripts for checking if test case needs to use RF-shield
  box and its device order on the Test Harness Testbed page.
2019-12-11 09:14:37 -08:00
Simon Lin 6275173bab [thci] fix wrong call to .lstrip('0x') (#4383)
Wpanctl THCI might return the wrong RLOC address when RLOC16 == 0 due
to incorrect call to .lstrip('0x').  We use .lstrip('0x') to strip
'0x' at the beginning of a hex string, however this is not correct
when the hex string is '0x0', because '0x0'.lstrip('0x') == ''

This commit fixes all incorrect calls to .lstrip('0x'). There are 3
different kinds of fix:

- s.lstrip('0x') replaced by self.__lstrip0x(s) (lstrip_0x is a
  correct implementation of stripping '0x' at the beginning of a
  string)

- hex(v).rstrip('L').lstrip('0x') replaced by '%x' % v

- hex(v).lstrip('0x').zfill(4) replaced by '%04x' % v
2019-12-10 08:56:52 -08:00