From 2f51cababfee1cf2654af3a68d0459d87e4b7231 Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Wed, 11 Sep 2024 07:25:32 -0700 Subject: [PATCH] [github-actions] migrate version 1.3 checks to 1.4 (#10694) --- .github/workflows/otbr.yml | 4 +- .github/workflows/otci.yml | 2 +- ...{simulation-1.2.yml => simulation-1.4.yml} | 46 +++++++++---------- script/check-arm-build | 2 +- script/check-gn-build | 4 +- script/check-simulation-build-cmake | 22 ++++----- script/make-pretty | 6 +-- script/test | 20 ++++---- src/cli/cli.cpp | 2 +- .../border_router/nat64/test_upstream_dns.py | 4 +- .../border_router/test_firewall.py | 6 +-- .../border_router/test_multi_ail.py | 6 +-- tests/scripts/thread-cert/config.py | 1 + tests/scripts/thread-cert/node.py | 12 ++--- .../thread-cert/pktverify/packet_verifier.py | 2 +- tests/scripts/thread-cert/thread_cert.py | 6 +-- 16 files changed, 73 insertions(+), 72 deletions(-) rename .github/workflows/{simulation-1.2.yml => simulation-1.4.yml} (94%) diff --git a/.github/workflows/otbr.yml b/.github/workflows/otbr.yml index 018a7f282..2fe3243d8 100644 --- a/.github/workflows/otbr.yml +++ b/.github/workflows/otbr.yml @@ -51,7 +51,7 @@ jobs: REFERENCE_DEVICE: 1 VIRTUAL_TIME: 0 PACKET_VERIFICATION: 1 - THREAD_VERSION: 1.3 + THREAD_VERSION: 1.4 INTER_OP: 1 COVERAGE: 1 MULTIPLY: 1 @@ -170,7 +170,7 @@ jobs: REFERENCE_DEVICE: 1 VIRTUAL_TIME: 0 PACKET_VERIFICATION: ${{ matrix.packet_verification }} - THREAD_VERSION: 1.3 + THREAD_VERSION: 1.4 INTER_OP: 1 COVERAGE: 1 MULTIPLY: 1 diff --git a/.github/workflows/otci.yml b/.github/workflows/otci.yml index c6342231f..0ec7c13ef 100644 --- a/.github/workflows/otci.yml +++ b/.github/workflows/otci.yml @@ -73,7 +73,7 @@ jobs: PYTHONPATH=./tests/scripts/thread-cert pytype tools/otci - name: Build run: | - ./script/cmake-build simulation -DOT_THREAD_VERSION=1.3 -DOT_DUA=ON -DOT_MLR=ON -DOT_BACKBONE_ROUTER=ON \ + ./script/cmake-build simulation -DOT_THREAD_VERSION=1.4 -DOT_DUA=ON -DOT_MLR=ON -DOT_BACKBONE_ROUTER=ON \ -DOT_CSL_RECEIVER=ON -DOT_SIMULATION_VIRTUAL_TIME=${VIRTUAL_TIME} - name: Install OTCI Python Library run: | diff --git a/.github/workflows/simulation-1.2.yml b/.github/workflows/simulation-1.4.yml similarity index 94% rename from .github/workflows/simulation-1.2.yml rename to .github/workflows/simulation-1.4.yml index e2a20d39f..f1c85bc14 100644 --- a/.github/workflows/simulation-1.2.yml +++ b/.github/workflows/simulation-1.4.yml @@ -26,7 +26,7 @@ # POSSIBILITY OF SUCH DAMAGE. # -name: Simulation 1.3 +name: Simulation 1.4 on: push: @@ -45,15 +45,15 @@ permissions: # added using https://github.com/step-security/secure-workflows jobs: - thread-1-3: - name: thread-1-3-${{ matrix.compiler.c }}-${{ matrix.arch }} + thread-1-4: + name: thread-1-4-${{ matrix.compiler.c }}-${{ matrix.arch }} runs-on: ubuntu-20.04 env: CFLAGS: -${{ matrix.arch }} CXXFLAGS: -${{ matrix.arch }} LDFLAGS: -${{ matrix.arch }} COVERAGE: 1 - THREAD_VERSION: 1.3 + THREAD_VERSION: 1.4 VIRTUAL_TIME: 1 INTER_OP: 1 INTER_OP_BBR: 1 @@ -98,12 +98,12 @@ jobs: - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 if: ${{ failure() }} with: - name: thread-1-3-${{ matrix.compiler.c }}-${{ matrix.arch }}-pcaps + name: thread-1-4-${{ matrix.compiler.c }}-${{ matrix.arch }}-pcaps path: "*.pcap" - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 if: ${{ failure() && env.CRASHED == '1' }} with: - name: core-packet-verification-thread-1-3 + name: core-packet-verification-thread-1-4 path: | ./ot-core-dump/* - name: Generate Coverage @@ -111,7 +111,7 @@ jobs: ./script/test generate_coverage "${{ matrix.compiler.gcov }}" - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 with: - name: cov-thread-1-3-${{ matrix.compiler.c }}-${{ matrix.arch }} + name: cov-thread-1-4-${{ matrix.compiler.c }}-${{ matrix.arch }} path: tmp/coverage.info retention-days: 1 @@ -122,7 +122,7 @@ jobs: VIRTUAL_TIME: 1 COVERAGE: 1 PACKET_VERIFICATION: 1 - THREAD_VERSION: 1.3 + THREAD_VERSION: 1.4 MAC_FILTER: 1 INTER_OP: 1 INTER_OP_BBR: 0 @@ -188,13 +188,13 @@ jobs: path: tmp/coverage.info retention-days: 1 - packet-verification-1-1-on-1-3: + packet-verification-1-1-on-1-4: runs-on: ubuntu-20.04 env: REFERENCE_DEVICE: 1 VIRTUAL_TIME: 1 PACKET_VERIFICATION: 1 - THREAD_VERSION: 1.3 + THREAD_VERSION: 1.4 INTER_OP_BBR: 1 MULTIPLY: 3 steps: @@ -223,7 +223,7 @@ jobs: - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 if: ${{ failure() }} with: - name: packet-verification-1.1-on-1.3-pcaps + name: packet-verification-1.1-on-1.4-pcaps path: | *.pcap *.json @@ -232,7 +232,7 @@ jobs: ./script/test generate_coverage gcc - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 with: - name: cov-packet-verification-1-1-on-1-3 + name: cov-packet-verification-1-1-on-1-4 path: tmp/coverage.info retention-days: 1 @@ -243,7 +243,7 @@ jobs: CXXFLAGS: -m32 LDFLAGS: -m32 COVERAGE: 1 - THREAD_VERSION: 1.3 + THREAD_VERSION: 1.4 VIRTUAL_TIME: 1 steps: - name: Harden Runner @@ -284,7 +284,7 @@ jobs: runs-on: ubuntu-20.04 env: COVERAGE: 1 - THREAD_VERSION: 1.3 + THREAD_VERSION: 1.4 VIRTUAL_TIME: 0 steps: - name: Harden Runner @@ -313,7 +313,7 @@ jobs: - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 if: ${{ failure() && env.CRASHED == '1' }} with: - name: core-expect-1-3 + name: core-expect-1-4 path: | ./ot-core-dump/* - name: Generate Coverage @@ -325,13 +325,13 @@ jobs: path: tmp/coverage.info retention-days: 1 - thread-1-3-posix: + thread-1-4-posix: runs-on: ubuntu-20.04 env: COVERAGE: 1 PYTHONUNBUFFERED: 1 READLINE: readline - THREAD_VERSION: 1.3 + THREAD_VERSION: 1.4 OT_NODE_TYPE: rcp USE_MTD: 1 VIRTUAL_TIME: 1 @@ -372,12 +372,12 @@ jobs: - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 if: ${{ failure() }} with: - name: thread-1-3-posix-pcaps + name: thread-1-4-posix-pcaps path: "*.pcap" - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 if: ${{ failure() && env.CRASHED == '1' }} with: - name: core-thread-1-3-posix + name: core-thread-1-4-posix path: | ./ot-core-dump/* - name: Generate Coverage @@ -385,17 +385,17 @@ jobs: ./script/test generate_coverage gcc - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 with: - name: cov-thread-1-3-posix + name: cov-thread-1-4-posix path: tmp/coverage.info retention-days: 1 upload-coverage: needs: - - thread-1-3 + - thread-1-4 - packet-verification-low-power - - packet-verification-1-1-on-1-3 + - packet-verification-1-1-on-1-4 - expects - - thread-1-3-posix + - thread-1-4-posix runs-on: ubuntu-20.04 steps: - name: Harden Runner diff --git a/script/check-arm-build b/script/check-arm-build index c44095829..4806d5afc 100755 --- a/script/check-arm-build +++ b/script/check-arm-build @@ -73,7 +73,7 @@ build_nrf52840() "-DOT_SNTP_CLIENT=ON" "-DOT_SRP_CLIENT=ON" "-DOT_SRP_SERVER=ON" - "-DOT_THREAD_VERSION=1.3" + "-DOT_THREAD_VERSION=1.4" "-DOT_TIME_SYNC=ON" "-DOT_UDP_FORWARD=ON" "-DOT_UPTIME=ON" diff --git a/script/check-gn-build b/script/check-gn-build index 68b17a7b7..9c44e2057 100755 --- a/script/check-gn-build +++ b/script/check-gn-build @@ -43,10 +43,10 @@ main() ninja -C gn-out test -f gn-out/obj/src/core/libopenthread-ftd.a - # Check GN build for OT1.3 + # Check GN build for OT1.4 rm gn-out -r || true mkdir gn-out - echo 'openthread_config_thread_version = "1.3"' >gn-out/args.gn + echo 'openthread_config_thread_version = "1.4"' >gn-out/args.gn gn gen --check gn-out gn args gn-out --list ninja -C gn-out diff --git a/script/check-simulation-build-cmake b/script/check-simulation-build-cmake index eaee3716b..a60e811d8 100755 --- a/script/check-simulation-build-cmake +++ b/script/check-simulation-build-cmake @@ -142,7 +142,7 @@ build_all_features() -DOT_SIMULATION_VIRTUAL_TIME=ON \ -DOT_OTNS=ON - # Thread 1.3 options + # Thread 1.4 options local options=( "-DOT_BACKBONE_ROUTER=ON" "-DOT_BORDER_ROUTING=ON" @@ -152,35 +152,35 @@ build_all_features() "-DOT_MLR=ON" "-DOT_OTNS=ON" "-DOT_SIMULATION_VIRTUAL_TIME=ON" - "-DOT_THREAD_VERSION=1.3" + "-DOT_THREAD_VERSION=1.4" ) - # Build Thread 1.3 with full features + # Build Thread 1.4 with full features reset_source CFLAGS="${cppflags[*]} ${CFLAGS}" CXXFLAGS="${cppflags[*]} ${CXXFLAGS}" \ "$(dirname "$0")"/cmake-build simulation "${options[@]}" -DOT_DUA=ON - # Build Thread 1.3 with external heap and msg pool using heap + # Build Thread 1.4 with external heap and msg pool using heap reset_source CFLAGS="${cppflags[*]} ${CFLAGS} -DOPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE=1" \ CXXFLAGS="${cppflags[*]} ${CXXFLAGS} -DOPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE=1" \ "$(dirname "$0")"/cmake-build simulation "${options[@]}" -DOT_DUA=ON - # Build Thread 1.3 with full features and no log + # Build Thread 1.4 with full features and no log reset_source CFLAGS="${cppflags[*]} ${CFLAGS}" CXXFLAGS="${cppflags[*]} ${CXXFLAGS}" \ "$(dirname "$0")"/cmake-build simulation "${options[@]}" -DOT_DUA=ON -DOT_LOG_OUTPUT=NONE - # Build Thread 1.3 with full features and full logs + # Build Thread 1.4 with full features and full logs reset_source CFLAGS="${cppflags[*]} ${CFLAGS}" CXXFLAGS="${cppflags[*]} ${CXXFLAGS}" \ "$(dirname "$0")"/cmake-build simulation "${options[@]}" -DOT_DUA=ON -DOT_FULL_LOGS=ON - # Build Thread 1.3 Backbone Router without DUA ND Proxying + # Build Thread 1.4 Backbone Router without DUA ND Proxying reset_source "$(dirname "$0")"/cmake-build simulation "${options[@]}" -DOT_BACKBONE_ROUTER_DUA_NDPROXYING=OFF - # Build Thread 1.3 Backbone Router without Multicast Routing + # Build Thread 1.4 Backbone Router without Multicast Routing reset_source "$(dirname "$0")"/cmake-build simulation "${options[@]}" -DOT_BACKBONE_ROUTER_MULTICAST_ROUTING=OFF @@ -190,11 +190,11 @@ build_all_features() -DOT_THREAD_VERSION=1.1 \ -DOT_VENDOR_EXTENSION=../../src/core/instance/extension_example.cpp - # Build Thread 1.3 with no additional features + # Build Thread 1.4 with no additional features reset_source - "$(dirname "$0")"/cmake-build simulation -DOT_THREAD_VERSION=1.3 + "$(dirname "$0")"/cmake-build simulation -DOT_THREAD_VERSION=1.4 - # Build Thread 1.3 with full features and OT_ASSERT=OFF + # Build Thread 1.4 with full features and OT_ASSERT=OFF reset_source "$(dirname "$0")"/cmake-build simulation "${options[@]}" -DOT_DUA=ON -DOT_ASSERT=OFF diff --git a/script/make-pretty b/script/make-pretty index 67885d8b0..fa8e8d280 100755 --- a/script/make-pretty +++ b/script/make-pretty @@ -137,7 +137,7 @@ OT_CLANG_TIDY_BUILD_OPTS=( '-DOT_SRP_ADV_PROXY=ON' '-DOT_SRP_CLIENT=ON' '-DOT_SRP_SERVER=ON' - '-DOT_THREAD_VERSION=1.3' + '-DOT_THREAD_VERSION=1.4' '-DOT_TREL=ON' '-DOT_COVERAGE=ON' '-DOT_LOG_LEVEL_DYNAMIC=ON' @@ -174,7 +174,7 @@ do_clang_tidy_fix() (mkdir -p ./build/cmake-tidy \ && cd ./build/cmake-tidy \ - && THREAD_VERSION=1.3 cmake "${OT_CLANG_TIDY_BUILD_OPTS[@]}" ../.. \ + && THREAD_VERSION=1.4 cmake "${OT_CLANG_TIDY_BUILD_OPTS[@]}" ../.. \ && ../../script/clang-tidy -j"$OT_BUILD_JOBS" "${OT_CLANG_TIDY_FIX_DIRS[@]}" -fix) } @@ -186,7 +186,7 @@ do_clang_tidy_check() (mkdir -p ./build/cmake-tidy \ && cd ./build/cmake-tidy \ - && THREAD_VERSION=1.3 cmake "${OT_CLANG_TIDY_BUILD_OPTS[@]}" ../.. \ + && THREAD_VERSION=1.4 cmake "${OT_CLANG_TIDY_BUILD_OPTS[@]}" ../.. \ && ../../script/clang-tidy -j"$OT_BUILD_JOBS" "${OT_CLANG_TIDY_FIX_DIRS[@]}") } diff --git a/script/test b/script/test index 0149b6f62..be04e237e 100755 --- a/script/test +++ b/script/test @@ -56,7 +56,7 @@ readonly OT_NODE_TYPE OT_NATIVE_IP="${OT_NATIVE_IP:-0}" readonly OT_NATIVE_IP -THREAD_VERSION="${THREAD_VERSION:-1.3}" +THREAD_VERSION="${THREAD_VERSION:-1.4}" readonly THREAD_VERSION INTER_OP="${INTER_OP:-0}" @@ -263,7 +263,7 @@ do_unit() do_unit_version "${THREAD_VERSION}" if [[ ${THREAD_VERSION} != "1.1" && ${INTER_OP_BBR} == 1 ]]; then - do_unit_version "1.3-bbr" + do_unit_version "1.4-bbr" fi } @@ -282,7 +282,7 @@ do_cert() esac if [[ ${THREAD_VERSION} != "1.1" ]]; then - export top_builddir_1_3_bbr="${OT_BUILDDIR}/openthread-simulation-1.3-bbr" + export top_builddir_1_4_bbr="${OT_BUILDDIR}/openthread-simulation-1.4-bbr" if [[ ${INTER_OP} == "1" ]]; then export top_builddir_1_1="${OT_BUILDDIR}/openthread-simulation-1.1" fi @@ -301,7 +301,7 @@ do_cert_suite() export top_srcdir="${OT_SRCDIR}" if [[ ${THREAD_VERSION} != "1.1" ]]; then - export top_builddir_1_3_bbr="${OT_BUILDDIR}/openthread-simulation-1.3-bbr" + export top_builddir_1_4_bbr="${OT_BUILDDIR}/openthread-simulation-1.4-bbr" if [[ ${INTER_OP} == "1" ]]; then export top_builddir_1_1="${OT_BUILDDIR}/openthread-simulation-1.1" fi @@ -505,9 +505,9 @@ ENVIRONMENTS: VERBOSE 1 to build or test verbosely. The default is 0. VIRTUAL_TIME 1 for virtual time, otherwise real time. The default value is 0 when running expect tests, otherwise default value is 1. - THREAD_VERSION 1.1 for Thread 1.1 stack, 1.3 for Thread 1.3 stack. The default is 1.3. - INTER_OP 1 to build 1.1 together. Only works when THREAD_VERSION is 1.3. The default is 0. - INTER_OP_BBR 1 to build bbr version together. Only works when THREAD_VERSION is 1.3. The default is 1. + THREAD_VERSION 1.1 for Thread 1.1 stack, 1.4 for Thread 1.4 stack. The default is 1.4. + INTER_OP 1 to build 1.1 together. Only works when THREAD_VERSION is 1.4. The default is 0. + INTER_OP_BBR 1 to build bbr version together. Only works when THREAD_VERSION is 1.4. The default is 1. COMMANDS: clean Clean built files to prepare for new build. @@ -539,7 +539,7 @@ EXAMPLES: THREAD_VERSION=1.1 VIRTUAL_TIME=0 $0 clean build cert tests/scripts/thread-cert/Cert_5_1_01_RouterAttach.py THREAD_VERSION=1.1 VIRTUAL_TIME=0 $0 cert tests/scripts/thread-cert/Cert_5_1_02_ChildAddressTimeout.py - # Test Thread 1.3 with real time, use 'INTER_OP=1' when the case needs both versions. + # Test Thread 1.4 with real time, use 'INTER_OP=1' when the case needs both versions. VIRTUAL_TIME=0 $0 clean build cert tests/scripts/thread-cert/v1_2_test_enhanced_keep_alive.py INTER_OP=1 VIRTUAL_TIME=0 $0 clean build cert tests/scripts/thread-cert/v1_2_router_5_1_1.py INTER_OP=1 VIRTUAL_TIME=0 $0 clean build cert_suite tests/scripts/thread-cert/v1_2_* @@ -646,7 +646,7 @@ envsetup() if [[ ${THREAD_VERSION} != "1.1" ]]; then export RADIO_DEVICE_1_1="${OT_BUILDDIR}/openthread-simulation-1.1/examples/apps/ncp/ot-rcp" export OT_CLI_PATH_1_1="${OT_BUILDDIR}/openthread-posix-1.1/src/posix/ot-cli" - export OT_CLI_PATH_BBR="${OT_BUILDDIR}/openthread-posix-1.3-bbr/src/posix/ot-cli" + export OT_CLI_PATH_BBR="${OT_BUILDDIR}/openthread-posix-1.4-bbr/src/posix/ot-cli" fi fi @@ -690,7 +690,7 @@ main() fi [[ ${VIRTUAL_TIME} == 1 ]] && echo "Using virtual time" || echo "Using real time" - [[ ${THREAD_VERSION} != "1.1" ]] && echo "Using Thread 1.3 stack" || echo "Using Thread 1.1 stack" + [[ ${THREAD_VERSION} != "1.1" ]] && echo "Using Thread 1.4 stack" || echo "Using Thread 1.1 stack" while [[ $# != 0 ]]; do case "$1" in diff --git a/src/cli/cli.cpp b/src/cli/cli.cpp index be6e144b8..10994ca3c 100644 --- a/src/cli/cli.cpp +++ b/src/cli/cli.cpp @@ -3661,7 +3661,7 @@ template <> otError Interpreter::Process(Arg aArgs[]) { otDeviceProperties props; bool value; - uint8_t index; + size_t index; for (index = 0; index < OT_ARRAY_LENGTH(kPowerSupplyStrings); index++) { diff --git a/tests/scripts/thread-cert/border_router/nat64/test_upstream_dns.py b/tests/scripts/thread-cert/border_router/nat64/test_upstream_dns.py index 617ea0f19..84707d280 100755 --- a/tests/scripts/thread-cert/border_router/nat64/test_upstream_dns.py +++ b/tests/scripts/thread-cert/border_router/nat64/test_upstream_dns.py @@ -72,12 +72,12 @@ class UpstreamDns(thread_cert.TestCase): 'name': 'BR', 'allowlist': [ROUTER], 'is_otbr': True, - 'version': '1.3', + 'version': '1.4', }, ROUTER: { 'name': 'Router', 'allowlist': [BR], - 'version': '1.3', + 'version': '1.4', }, HOST: { 'name': 'Host', diff --git a/tests/scripts/thread-cert/border_router/test_firewall.py b/tests/scripts/thread-cert/border_router/test_firewall.py index 54d0a1b2b..d037d9084 100755 --- a/tests/scripts/thread-cert/border_router/test_firewall.py +++ b/tests/scripts/thread-cert/border_router/test_firewall.py @@ -63,17 +63,17 @@ class Firewall(thread_cert.TestCase): 'name': 'BR_1', 'allowlist': [ROUTER1, ROUTER2], 'is_otbr': True, - 'version': '1.3', + 'version': '1.4', }, ROUTER1: { 'name': 'Router_1', 'allowlist': [BR1], - 'version': '1.3', + 'version': '1.4', }, ROUTER2: { 'name': 'Router_2', 'allowlist': [BR1], - 'version': '1.3', + 'version': '1.4', }, HOST: { 'name': 'Host', diff --git a/tests/scripts/thread-cert/border_router/test_multi_ail.py b/tests/scripts/thread-cert/border_router/test_multi_ail.py index e2d9174dd..f037dde67 100755 --- a/tests/scripts/thread-cert/border_router/test_multi_ail.py +++ b/tests/scripts/thread-cert/border_router/test_multi_ail.py @@ -58,21 +58,21 @@ class ThreeBRs_TwoInfra(thread_cert.TestCase): 'backbone_network_id': 0, 'allowlist': [BR2], 'is_otbr': True, - 'version': '1.3', + 'version': '1.4', }, BR2: { 'name': 'BR_2', 'backbone_network_id': 1, 'allowlist': [BR1, BR3], 'is_otbr': True, - 'version': '1.3', + 'version': '1.4', }, BR3: { 'name': 'BR_3', 'backbone_network_id': 1, 'allowlist': [BR2], 'is_otbr': True, - 'version': '1.3', + 'version': '1.4', } } diff --git a/tests/scripts/thread-cert/config.py b/tests/scripts/thread-cert/config.py index 3532690e6..1a8606e58 100644 --- a/tests/scripts/thread-cert/config.py +++ b/tests/scripts/thread-cert/config.py @@ -160,6 +160,7 @@ class ADDRESS_TYPE(Enum): THREAD_VERSION_1_1 = 2 THREAD_VERSION_1_2 = 3 THREAD_VERSION_1_3 = 4 +THREAD_VERSION_1_4 = 5 PACKET_VERIFICATION_NONE = 0 PACKET_VERIFICATION_DEFAULT = 1 diff --git a/tests/scripts/thread-cert/node.py b/tests/scripts/thread-cert/node.py index da1d96b1f..6da0f635b 100755 --- a/tests/scripts/thread-cert/node.py +++ b/tests/scripts/thread-cert/node.py @@ -625,8 +625,8 @@ def __init_sim(self, nodeid, mode): if self.version != '1.1' and self.is_bbr: if 'OT_CLI_PATH_BBR' in os.environ: cmd = os.environ['OT_CLI_PATH_BBR'] - elif 'top_builddir_1_3_bbr' in os.environ: - srcdir = os.environ['top_builddir_1_3_bbr'] + elif 'top_builddir_1_4_bbr' in os.environ: + srcdir = os.environ['top_builddir_1_4_bbr'] cmd = '%s/examples/apps/cli/ot-cli-%s' % (srcdir, mode) # Load Thread device of the testing environment version (may be 1.1 or 1.2) @@ -692,13 +692,13 @@ def __init_ncp_sim(self, nodeid, mode): # Load Thread 1.2 BBR device when testing Thread 1.2 scenarios # which requires device with Backbone functionality. if self.version != '1.1' and self.is_bbr: - if 'OT_NCP_PATH_1_3_BBR' in os.environ: + if 'OT_NCP_PATH_1_4_BBR' in os.environ: cmd = 'spinel-cli.py -p "%s%s" -n' % ( - os.environ['OT_NCP_PATH_1_3_BBR'], + os.environ['OT_NCP_PATH_1_4_BBR'], args, ) - elif 'top_builddir_1_3_bbr' in os.environ: - srcdir = os.environ['top_builddir_1_3_bbr'] + elif 'top_builddir_1_4_bbr' in os.environ: + srcdir = os.environ['top_builddir_1_4_bbr'] cmd = '%s/examples/apps/ncp/ot-ncp-%s' % (srcdir, mode) cmd = 'spinel-cli.py -p "%s%s" -n' % ( cmd, diff --git a/tests/scripts/thread-cert/pktverify/packet_verifier.py b/tests/scripts/thread-cert/pktverify/packet_verifier.py index 6873cf90c..7b5a1c93e 100644 --- a/tests/scripts/thread-cert/pktverify/packet_verifier.py +++ b/tests/scripts/thread-cert/pktverify/packet_verifier.py @@ -176,7 +176,7 @@ def _add_initial_vars(self): for i, topo in self.test_info.topology.items(): name = self.test_info.get_node_name(i) if topo['version']: - self._vars[name + '_VERSION'] = {'1.1': 2, '1.2': 3, '1.3': 4}[topo['version']] + self._vars[name + '_VERSION'] = {'1.1': 2, '1.2': 3, '1.3': 4, '1.4': 5}[topo['version']] def verify_attached(self, child: str, parent: str = None, child_type: str = 'FTD', pkts=None) -> VerifyResult: """ diff --git a/tests/scripts/thread-cert/thread_cert.py b/tests/scripts/thread-cert/thread_cert.py index e09b769fc..27f8d826d 100644 --- a/tests/scripts/thread-cert/thread_cert.py +++ b/tests/scripts/thread-cert/thread_cert.py @@ -511,7 +511,7 @@ def _parse_params(self, params: Optional[dict]) -> dict: if params.get('is_bbr') or params.get('is_otbr'): # BBRs must not use thread version 1.1 - version = params.get('version', '1.3') + version = params.get('version', '1.4') assert version != '1.1', params params['version'] = version params.setdefault('bbr_registration_jitter', config.DEFAULT_BBR_REGISTRATION_JITTER) @@ -520,9 +520,9 @@ def _parse_params(self, params: Optional[dict]) -> dict: assert params.get('version', '') == '', params params['version'] = '' - # use 1.3 node for 1.2 tests + # use 1.4 node for 1.2 tests if params.get('version') == '1.2': - params['version'] = '1.3' + params['version'] = '1.4' is_ftd = (not params.get('is_mtd') and not params.get('is_host'))