[Concept,01/24] test/py: Make test_bind_unbind_with_uclass() independent

Message ID 20251018084117.1798704-2-sjg@u-boot.org
State New
Headers
Series bootctl: Expand bootctl to include a new UI |

Commit Message

Simon Glass Oct. 18, 2025, 8:40 a.m. UTC
  From: Simon Glass <sjg@chromium.org>

Unbind the test node at the start of this test, so that it can be run
independently from test_bind_unbind_with_node()

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 test/py/tests/test_bind.py | 4 ++++
 1 file changed, 4 insertions(+)
  

Patch

diff --git a/test/py/tests/test_bind.py b/test/py/tests/test_bind.py
index 16c63ae9684..4982a00fab6 100644
--- a/test/py/tests/test_bind.py
+++ b/test/py/tests/test_bind.py
@@ -121,6 +121,10 @@  def get_next_line(tree, name):
 @pytest.mark.buildconfigspec('cmd_bind')
 @pytest.mark.singlethread
 def test_bind_unbind_with_uclass(ubman):
+    # Ensure /bind-test is unbound, since it may be bound from DT or the
+    # previous tests
+    ubman.run_command('unbind /bind-test')
+
     #bind /bind-test
     response = ubman.run_command('bind  /bind-test simple_bus')
     assert response == ''