diff --git a/test/py/tests/test_dfu.py b/test/py/tests/test_dfu.py
index 8649d8731b73dd364384d04af82c58783424e47a..585e6b29d7f8b470efe303ab5776a370194727c9 100644
--- a/test/py/tests/test_dfu.py
+++ b/test/py/tests/test_dfu.py
@@ -136,6 +136,8 @@ def test_dfu(u_boot_console, env__usb_dev_port, env__dfu_config):
             Nothing.
         """
 
+        u_boot_utils.wait_until_file_open_fails(
+            env__usb_dev_port['host_usb_dev_node'], True)
         fh = u_boot_utils.attempt_to_open_file(
             env__usb_dev_port['host_usb_dev_node'])
         if fh: