diff --git a/test/py/u_boot_spawn.py b/test/py/u_boot_spawn.py
index d508075990272f3bc0f9f3ed30e169a215784381..7451455671b9b52ab6797949f4de2cfaf712f1a9 100644
--- a/test/py/u_boot_spawn.py
+++ b/test/py/u_boot_spawn.py
@@ -132,7 +132,7 @@ class Spawn(object):
                     m = pattern.search(self.buf)
                     if not m:
                         continue
-                    if earliest_m and m.start() > earliest_m.start():
+                    if earliest_m and m.start() >= earliest_m.start():
                         continue
                     earliest_m = m
                     earliest_pi = pi