diff --git a/debug/testlib.py b/debug/testlib.py index ba6057dc8..baa778308 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -796,6 +796,7 @@ def command(self, command, ops=1, reset_delays=0): timeout = max(1, ops) * self.timeout self.active_child.sendline(command) try: + self.active_child.expect(re.escape(command), timeout=timeout) self.active_child.expect("\n", timeout=timeout) except pexpect.exceptions.TIMEOUT as exc: raise CommandSendTimeout(command) from exc