mirror of
https://github.com/espressif/openthread.git
synced 2026-08-11 13:17:48 +00:00
[scripts] add packet verification framework (#4428)
This commit introduces the packet verification (PV) framework for certification tests. - Add packet verification framework code - Implement packet verification for cert 5.1.7 as a minimal example. There will be more 1.1/1.2 tests with PV submitted in the future. - Download pre-built thread-wireshark binaries from openthread/wireshark/releases for packet dissecting (used by pyshark) - Added a Github Action job for Packet Verification
This commit is contained in:
@@ -112,7 +112,13 @@ class RealTime(BaseSimulator):
|
||||
time.sleep(duration)
|
||||
|
||||
def stop(self):
|
||||
pass
|
||||
if self.is_running:
|
||||
# self._sniffer.stop() # FIXME: seems it blocks forever
|
||||
self._sniffer = None
|
||||
|
||||
@property
|
||||
def is_running(self):
|
||||
return self._sniffer is not None
|
||||
|
||||
|
||||
class VirtualTime(BaseSimulator):
|
||||
@@ -170,8 +176,13 @@ class VirtualTime(BaseSimulator):
|
||||
self.stop()
|
||||
|
||||
def stop(self):
|
||||
self.sock.close()
|
||||
self.sock = None
|
||||
if self.sock:
|
||||
self.sock.close()
|
||||
self.sock = None
|
||||
|
||||
@property
|
||||
def is_running(self):
|
||||
return self.sock is not None
|
||||
|
||||
def _add_message(self, nodeid, message_obj):
|
||||
addr = ('127.0.0.1', self.port + nodeid)
|
||||
|
||||
Reference in New Issue
Block a user