Files
Jonathan Hui 522a665187 [thread-cert] handle BrokenPipeError on resetting node in simulator (#13495)
When a simulated node restarts (e.g. during `factoryreset`), the
child process re-executes itself via `execvp`, disconnecting its
UNIX domain socket connection to the virtual-time simulator.

If `VirtualTime._send_message()` attempts to send an event before the
socket disconnection event has been processed by `selectors`,
`sock.send()` raises `BrokenPipeError` or `ConnectionResetError`,
even though the node is marked as temporarily offline in
`_maybeoff_ports` (via `maybeoff=True`).

This commit catches `BrokenPipeError` and `ConnectionResetError` in
`VirtualTime._send_message()`, verifying that the destination port is
present in `_maybeoff_ports` and skipping delivery cleanly.
2026-08-13 10:52:07 -07:00
..
2023-06-14 20:07:24 -07:00
2023-05-04 09:59:24 -07:00
2023-05-04 09:59:24 -07:00
2023-05-04 09:59:24 -07:00
2023-05-04 09:59:24 -07:00

OpenThread Certification Tests

Inspector

Inspect nodes status by the following modification:

  1. Insert the inspector to where you want to inspect.
import debug
debug.Inspector(self).inspect()
  1. Run the test and it will stop at the line above and prompt #.
./script/test clean build cert tests/scripts/thread-cert/Cert_5_1_01_RouterAttach.py
  1. Inspect
#
# 1
> state
leader
> exit
# 2
> panid
face
> exit
# exit

CLI reference

# mode

This is selection mode. You may select the node to inspect here.

  • list - list available nodes.
  • exit - end inspecting, continue running test case.
  • <number> - select the node with id <number>. This will result in entering > mode.

> mode

This is node mode. You may run OpenThread CLI here.

  • exit - go back to # mode.