Commit Graph

172 Commits

Author SHA1 Message Date
Bob MacDonald 742b4e8cc3
[gcov] use __gcov_dump() instead for clang 12/13 (#7880)
Use gcov_dump when using clang on MacOS and the version is 13 or above
or when using clang on a non MacOS system and the version is 12 or
above.
2022-07-07 21:28:29 -07:00
Jonathan Hui 0c48ade2ff
[tests] change 1.2 builds to 1.3 (#7756) 2022-06-08 11:44:23 -07:00
Jonathan Hui dbb8a5801f
[codecov] migrate to v2 uploader (#7718) 2022-05-19 10:32:31 -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 d068df82a6
[github-actions] do not delete artifacts if coverage upload fails (#7678)
Coverage upload can fail intermittently for various reasons. Do not
delete coverage artifacts if upload fails to avoid needing to re-run
the entire workflow.
2022-05-09 21:31:19 -07:00
Jonathan Hui d144202e2c
[github-actions] remove pyspinel tests (#7662) 2022-05-04 20:33:40 -07:00
Simon Lin 961baa53d9
[github-actions] remove caching OTBR test results (#7637)
Caching OTBR test results to avoid re-running all tests is no longer
necessary now that GitHub Actions supports it natively.
2022-05-02 09:37:52 -07:00
Yakun Xu 013ab41291
[gcov] use __gcov_dump() instead for gcc 11 (#7629)
__gcov_flush is removed from gcc 11. This commit moves reset setup to a
single header file.
2022-04-25 06:23:00 -07:00
Jonathan Donald a9b4e637f9
[docs] community discussion change (#7507)
Replace link to openthread-users Google Group with link to GitHub
OpenThread Discussions, clarify issue reporting links.
2022-04-07 13:29:08 -07:00
Abtin Keshavarzian 255a326b10
[toranj] add support for CLI based test-cases (#7258)
This commit updates `toranj` test framework to add support for writing
CLI based test-cases (in addition to existing model which uses OT NCP
build along with `wpantund`/`wpanctl`).
2022-03-22 14:28:08 -07:00
Simon Lin fba6bc90e6
[github-actions] set `fail-fast: false` for matrix (#7490)
This commit sets `fail-fast: false` for matrix in GitHub Actions so
that tests in a matrix do not fail all at once. It's more convenient
now that we can re-run failed tests.
2022-03-17 21:36:46 -07:00
AdityaHPatwardhan ff848e7a20
[meshcop] update the DEPRECATED function `mbedtls_ssl_conf_curves` (#7415)
The commit updates the `mbedtls_ssl_conf_curves` with the new
alternative - `mbedtls_ssl_conf_groups`. The API has been deprecated
in `mbedtls-3.1` and will be removed in a future release. The code is
also kept backward compatible to support older versions.
2022-02-18 16:12:12 -08:00
Jonathan Donald afc55a384b
[docker] remove `codelab_otsim` Dockerfile (#7396)
* Delete obsolete codelab_otsim Dockerfile
* Remove codelab_otsim from git Docker Action
2022-02-07 21:55:41 -08:00
Jonathan Hui 074814be87
[github-actions] fix branch filter in OTNS workflow (#7382)
Also pin ubuntu image to 20.04.
2022-01-31 20:30:52 -08:00
Simon Lin ce77ab3c1d
[github-actions] add OTNS stress tests (#5308)
This commit runs OTNS stress tests in OpenThread CI.
2022-01-29 10:32:14 -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 aa1cf21bcf
[github-actions] set fail-fast=false for border router tests (#7332) 2022-01-21 09:55:25 -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 55af6ce2c8
[github-actions] set MAX_JOBS=3 for `Border Router` tests (#7301)
This commit sets `MAX_JOBS` to 3 for Border Router tests (using OTBR
Docker) to improve reliability.

The original `MAX_JOBS` value is 10.

Related metrics:
- Border Router tests takes 12 minutes with MAX_JOBS=10
- Border Router tests takes 24 minutes with MAX_JOBS=3
2022-01-10 21:25:11 -08:00
Jonathan Hui d82a678322
Revert "[github-actions] push `README.md` to Dockerhub (#7194)" (#7197)
This reverts commit 3b438fd18f.

Current method does not work with personal access tokens.
2021-11-23 15:53:52 -08:00
Jonathan Hui 3b438fd18f
[github-actions] push `README.md` to Dockerhub (#7194) 2021-11-23 12:51:12 -08:00
Simon Lin ee649b141b
[github-actions] fix macOS builds (#7086)
This commit fixes macOS build failures by downgrading to macOS 10.15.
2021-10-20 09:36:45 -07:00
Yakun Xu 71e4df9820
[daemon] add environment to allow all users access (#7076)
This commit adds an environment variable to allow all users access
Thread daemon via ot-ctl.
2021-10-18 13:02:50 -07:00
Simon Lin d39fce1fa6
[uptime] enable `uptime` by default on posix and simulation (#7052)
This commit enables OPENTHREAD_CONFIG_UPTIME_ENABLE and
OPENTHREAD_CONFIG_LOG_PREPEND_UPTIME by default on posix and
simulation platforms.
2021-10-12 12:02:19 -07:00
Simon Lin dc7676a032
[br-tests] enable BR tests with TREL (#7022)
This commit runs all Border Router (OTBR) tests with TREL enabled.
2021-09-28 09:10:26 -07:00
Simon Lin aad4aebdd0
[github-actions] upgrade to macOS-11 (#7024) 2021-09-22 11:07:42 -07:00
Łukasz Duda 00da94e20d
[mbedtls] add support for version 3.0.0 (#7001)
This commit adds forward compatibility with mbedTLS 3.0.

Changes that affected OpenThread implementation:

- Rename mbedtls_*_ret() cryptography functions whose deprecated
  variants have been removed (migration guide)

- Replace MBEDTLS_SSL_MAX_CONTENT_LEN with MBEDTLS_SSL_IN_CONTENT_LEN
  and MBEDTLS_SSL_OUT_CONTENT_LEN options (migration guide)

- Signature functions now require the hash length to match the
  expected value (migration guide)

- SSL key export interface change (migration guide) - this change
  affected us a little bit more, since Key Block for KEK generation is
  not part of mbedTLS callback anymore. I was able, however, to
  retrieve it from Master secret (did successfully commissioning
  between 2.2x vs 3.0). By the way, I clean up the code for KEK
  generation - I don't know why we also executed it for application
  CoAP secure?

- Separated MBEDTLS_SHA224_C and MBEDTLS_SHA256_C (migration guide)

- Most structure fields are now private (migration guide) - we use
  private fields just in two files in dtls.cpp and ecdsa.cpp. For now,
  I used a workaround by defining MBEDTLS_PRIVATE macro but we should
  request the mbedTLS team to provide us support for public
  getters.
2021-09-20 13:19:07 -07:00
jinran-google ee58635945
[radio] use stack reset in RCP (#6645)
This commit makes RCP use a stack reset instead of doing a hard reset
when a reset command is received.
2021-09-17 18:36:26 -07:00
Jonathan Hui b9fadd227b
[github-actions] use `--no-check-certificates` when invoking `wget` (#7011) 2021-09-15 19:58:03 -07:00
Jonathan Hui 6aac6708a7
[script] update `scan-build` to use cmake/ninja (#6982) 2021-09-09 15:48:53 -07:00
whd 88c2f0f7ed
[github-actions] fix brew install issue on macOS (#6990)
When brew install ninja, python 3.9 is being installed as a
dependency. However, the installation failed because there is a
conflict on binary /usr/local/bin/2to3.
2021-09-08 13:29:04 -07:00
Abtin Keshavarzian 2798cc9c05
[utils] adding `HistoryTracker` module (#6807)
This commit adds History Tracker feature and its CLI support. This
feature records history of different events as the Thread network
operates (e.g., history of RX and TX IPv6 messages or network info
changes).

Recorded entries are timestamped. When the history list is read, the
timestamps are given as the entry age relative to the time the list
is being read. For example in CLI a timestamp can be shown as
`02:31:50.628 ago` indicating the entry was recorded 2 hours, 31 min,
50 sec, and 628 msec ago. Number of days is added for events that are
older than 24 hours, e.g., `31 days 03:00:23.931 ago`. Timestamps use
millisecond accuracy and are tacked up to 49 days. If an event is
older than 49 days, the entry is still tracked in the list but the
timestamp is shown as old or `more than 49 days ago`.

The `HistoryTracker` currently maintains 3 lists. The Network Info
history tracks changes to Device Role, Mode, RLOC16 and Partition ID.
The RX/TX history list records information about the received/sent
IPv6 messages:
- Message type (UDP, TCP, ICMP6 (and its subtype), etc.)
- Source and destination IPv6 addresses and port numbers
- IPv6 payload length
- The message checksum (for UDP, TCP, or ICMP6).
- Whether or not the link-layer security was used
- Message priority: low, norm, high, net (for control messages)
- Short address (RLOC16) of neighbor who send/received the msg
- Received Signal Strength (in dBm) for RX only
- Radio link info (15.4/TREL) on which msg was sent/received
  (useful when `OPENTHREAD_CONFIG_MULTI_RADIO` is enabled)

Config `HISTORY_TRACKER_EXCLUDE_THREAD_CONTROL_MESSAGES` can be used
to configure `HistoryTracker` to exclude Thread Control message
(e.g., MLE, TMF) from TX and RX history.

The number of entries recorded for each history list is configurable
through a set of OpenThread config options, e.g., number of entries
in Network Info history list is specified by OpenThread config option
`OPENTHREAD_CONFIG_HISTORY_TRACKER_NET_INFO_LIST_SIZE`. The
`HistoryTracker` will keep the most recent entries overwriting oldest
ones when the list gets full.

This commit also adds support for `HistoryTracker` in CLI. The CLI
commands provide two style for printing the history information: A
table format (more human-readable) and list style (better suited for
parsing by machine/code). `README_HISTORY.md` is added to document
the commands and the info provided by each history list entry.

This commit also adds `test_history_tracker.py` test-case which
covers the behavior of `HistoryTracker`.
2021-08-12 15:47:26 -07:00
Yakun Xu 354387c931
[test] fix reporting expect failure (#6869)
This commit fixes reporting expect failures by adding fail on error
flag to the ot_exec_expect_script function in script/test script.

This commit also fixes failing expect tests and removes expect tests
on macOS for unstable issues.
2021-08-02 20:26:32 -07:00
Jonathan Hui aaabf25ff2
[network-key] change name from `master` to `network` (#6721) 2021-06-16 23:07:23 -07:00
whd df4423e14c
[github-actions] enable Avahi in OTBR CI tests (#6710) 2021-06-08 07:35:44 -07:00
Yakun Xu 907c9bdcaf
[github-actions] show parameter name in cli-sim (#6682) 2021-05-26 14:36:40 -07:00
Jonathan Hui d0812fb4a0 [github-actions] add markdown lint check (#6669) 2021-05-24 16:56:39 -07:00
Jonathan Hui 516ae7df34
[github-actions] pin to clang-10 for coverage (#6652)
To avoid llvm gcov version mismatch.
2021-05-20 11:50:33 -07:00
Yakun Xu 1b72b2d82e [docker] correct commit to build otsim (#6634) 2021-05-14 23:43:56 -07:00
Jonathan Hui c74ba05c44
[github-actions] fix bootstrap for i386 build (#6622) 2021-05-13 15:05:34 -07:00
Yakun Xu b9ba3558f8
[meshcop] support native commissioner (#6541)
This commit adds native commissioner support with the following changes:
* Accept unsecure traffic when Thread is not enabled.
* Accept traffic to border agent service when native commissioner is
  allowed.
2021-05-05 11:14:02 -07:00
Simon Lin ccedef530e
[github-actions] add more packet verification tests (#6508)
Packet verification of some test scripts were not executed. This
commit runs these tests in packet verification checks.
2021-04-25 21:36:01 -07:00
Yakun Xu 33012716ee
[github-actions] download size reporter in workflow file (#6475) 2021-04-20 07:30:37 -07:00
Jonathan Hui 3e05438d32
[github-actions] install ninja in cli-ftd-otns (#6487) 2021-04-19 19:30:28 -07:00
jinran-google 0c5053d0ae
[codecov] use Codecov GitHub Action to upload coverage (#6467) 2021-04-19 07:32:58 -07:00
Yakun Xu f81c0b50f0
[posix] remove NCP app (#6428)
The POSIX NCP app(ot-ncp) is simulating of NCP with an RCP. With the
latest otbr-agent, this is not needed any more. It is only used in CI
tests. This commit removes the app to save maintenance efforts.
2021-04-16 07:42:14 -07:00
Jonathan Hui 0cdc3f1444
[github-actions] run `brew update` (#6439) 2021-04-12 17:26:22 -07:00
Simon Lin d5855ab74b
[style] bump yapf version to 0.31.0 (#6434) 2021-04-12 07:30:27 -07:00