mirror of
https://github.com/espressif/openthread.git
synced 2026-06-05 21:14:49 +00:00
73b6b13678
This commit adds a brief 0.1-second sleep delay immediately after spawning node processes (rcp, cli, and mtd types) in the expect test harness. Under high CPU load on GitHub Actions runner VMs, the PTY file descriptors can take a fraction of a second to fully initialize. If commands are sent immediately after spawn without delay, the initial expect match can fail with an instant timeout. This triggers duplicate retransmissions in wait_for, leaving extra "Done" strings in expect's PTY read buffer. The leftover "Done" strings desynchronize subsequent assertions, causing tests to match cached output instead of waiting for actual command execution (e.g., sending "diag stats" during an active "diag send" command, which fails). Adding a 100ms delay gives the PTY and child process enough time to fully initialize and stabilize, avoiding instant timeouts and subsequent test harness desynchronization.