From b4c76b3e170a729f9bdb57ddaa6d05b73e541ce2 Mon Sep 17 00:00:00 2001 From: Eduardo Montoya Date: Fri, 12 Nov 2021 22:31:58 +0100 Subject: [PATCH] [thci] allow for sufficient time after a ping from OTBR (#7158) Some certification tests are failing because not enough delay is applied after a Linux ping command is sent and the capture misses the ICMP transaction. Also removing unneeded check for Thread 1.2 harness version when reconnecting to the serial port after a reset. --- tools/harness-thci/OpenThread.py | 4 ++-- tools/harness-thci/OpenThread_BR.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/harness-thci/OpenThread.py b/tools/harness-thci/OpenThread.py index d1d3d7524..3fc345ae8 100644 --- a/tools/harness-thci/OpenThread.py +++ b/tools/harness-thci/OpenThread.py @@ -1369,7 +1369,7 @@ class OpenThreadTHCI(object): while time.time() < start_time + timeout: time.sleep(0.3) - if TESTHARNESS_VERSION == TESTHARNESS_1_2 and not self.IsBorderRouter: + if not self.IsBorderRouter: self._disconnect() self._connect() try: @@ -1493,7 +1493,7 @@ class OpenThreadTHCI(object): start_time = time.time() while time.time() < start_time + timeout: time.sleep(0.3) - if TESTHARNESS_VERSION == TESTHARNESS_1_2 and not self.IsBorderRouter: + if not self.IsBorderRouter: self._disconnect() self._connect() try: diff --git a/tools/harness-thci/OpenThread_BR.py b/tools/harness-thci/OpenThread_BR.py index 49de6d0e6..47a25f327 100644 --- a/tools/harness-thci/OpenThread_BR.py +++ b/tools/harness-thci/OpenThread_BR.py @@ -423,7 +423,7 @@ class OpenThread_BR(OpenThreadTHCI, IThci): ) self.bash(cmd) - time.sleep(1) + time.sleep(timeout) def multicast_Ping(self, destination, length=20): """send ICMPv6 echo request with a given length to a multicast destination