Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0 |
| 2 | # Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. |
| 3 | |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 4 | """ Test for bind command """ |
| 5 | |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 6 | import re |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 7 | import pytest |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 8 | |
| 9 | def in_tree(response, name, uclass, drv, depth, last_child): |
Tom Rini | caae73a | 2025-05-08 15:34:43 -0600 | [diff] [blame^] | 10 | """A helper function to confirm contents of the device tree """ |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 11 | lines = [x.strip() for x in response.splitlines()] |
| 12 | leaf = '' |
| 13 | if depth != 0: |
| 14 | leaf = ' ' + ' ' * (depth - 1) |
| 15 | if not last_child: |
| 16 | leaf = leaf + r'\|' |
| 17 | else: |
| 18 | leaf = leaf + '`' |
Patrice Chotard | f0c9d1a | 2020-07-28 09:13:34 +0200 | [diff] [blame] | 19 | |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 20 | leaf = leaf + '-- ' + name |
| 21 | line = (r' *{:10.10} *[0-9]* \[ [ +] \] {:20.20} [` |]{}$' |
| 22 | .format(uclass, drv, leaf)) |
| 23 | prog = re.compile(line) |
| 24 | for l in lines: |
| 25 | if prog.match(l): |
| 26 | return True |
| 27 | return False |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 28 | |
Michal Simek | 901f5ba | 2022-07-07 12:52:26 +0200 | [diff] [blame] | 29 | @pytest.mark.boardspec('sandbox') |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 30 | @pytest.mark.buildconfigspec('cmd_bind') |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 31 | def test_bind_unbind_with_node(ubman): |
Tom Rini | caae73a | 2025-05-08 15:34:43 -0600 | [diff] [blame^] | 32 | """Test the bind and unbind commands of a node |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 33 | |
Tom Rini | caae73a | 2025-05-08 15:34:43 -0600 | [diff] [blame^] | 34 | Verify that the dm tree output contains some expected nodes, and then bind |
| 35 | and unbind a USB via node device while verifying that the dm tree output |
| 36 | matches the expected values at each step. |
| 37 | """ |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 38 | tree = ubman.run_command('dm tree') |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 39 | assert in_tree(tree, 'bind-test', 'simple_bus', 'simple_bus', 0, True) |
| 40 | assert in_tree(tree, 'bind-test-child1', 'phy', 'phy_sandbox', 1, False) |
| 41 | assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'simple_bus', 1, True) |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 42 | |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 43 | #bind usb_ether driver (which has no compatible) to usb@1 node. |
| 44 | ##New entry usb_ether should appear in the dm tree |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 45 | response = ubman.run_command('bind /usb@1 usb_ether') |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 46 | assert response == '' |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 47 | tree = ubman.run_command('dm tree') |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 48 | assert in_tree(tree, 'usb@1', 'ethernet', 'usb_ether', 1, True) |
Patrice Chotard | 4ffd03a | 2021-09-10 16:16:24 +0200 | [diff] [blame] | 49 | |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 50 | #Unbind child #1. No error expected and all devices should be there except for bind-test-child1 |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 51 | response = ubman.run_command('unbind /bind-test/bind-test-child1') |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 52 | assert response == '' |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 53 | tree = ubman.run_command('dm tree') |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 54 | assert in_tree(tree, 'bind-test', 'simple_bus', 'simple_bus', 0, True) |
| 55 | assert 'bind-test-child1' not in tree |
| 56 | assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'simple_bus', 1, True) |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 57 | |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 58 | #bind child #1. No error expected and all devices should be there |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 59 | response = ubman.run_command('bind /bind-test/bind-test-child1 phy_sandbox') |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 60 | assert response == '' |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 61 | tree = ubman.run_command('dm tree') |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 62 | assert in_tree(tree, 'bind-test', 'simple_bus', 'simple_bus', 0, True) |
| 63 | assert in_tree(tree, 'bind-test-child1', 'phy', 'phy_sandbox', 1, True) |
| 64 | assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'simple_bus', 1, False) |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 65 | |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 66 | #Unbind child #2. No error expected and all devices should be there except for bind-test-child2 |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 67 | response = ubman.run_command('unbind /bind-test/bind-test-child2') |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 68 | assert response == '' |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 69 | tree = ubman.run_command('dm tree') |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 70 | assert in_tree(tree, 'bind-test', 'simple_bus', 'simple_bus', 0, True) |
| 71 | assert in_tree(tree, 'bind-test-child1', 'phy', 'phy_sandbox', 1, True) |
| 72 | assert 'bind-test-child2' not in tree |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 73 | |
| 74 | |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 75 | #Bind child #2. No error expected and all devices should be there |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 76 | response = ubman.run_command('bind /bind-test/bind-test-child2 simple_bus') |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 77 | assert response == '' |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 78 | tree = ubman.run_command('dm tree') |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 79 | assert in_tree(tree, 'bind-test', 'simple_bus', 'simple_bus', 0, True) |
| 80 | assert in_tree(tree, 'bind-test-child1', 'phy', 'phy_sandbox', 1, False) |
| 81 | assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'simple_bus', 1, True) |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 82 | |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 83 | #Unbind parent. No error expected. All devices should be removed and unbound |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 84 | response = ubman.run_command('unbind /bind-test') |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 85 | assert response == '' |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 86 | tree = ubman.run_command('dm tree') |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 87 | assert 'bind-test' not in tree |
| 88 | assert 'bind-test-child1' not in tree |
| 89 | assert 'bind-test-child2' not in tree |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 90 | |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 91 | #try binding invalid node with valid driver |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 92 | response = ubman.run_command('bind /not-a-valid-node simple_bus') |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 93 | assert response != '' |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 94 | tree = ubman.run_command('dm tree') |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 95 | assert 'not-a-valid-node' not in tree |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 96 | |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 97 | #try binding valid node with invalid driver |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 98 | response = ubman.run_command('bind /bind-test not_a_driver') |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 99 | assert response != '' |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 100 | tree = ubman.run_command('dm tree') |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 101 | assert 'bind-test' not in tree |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 102 | |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 103 | #bind /bind-test. Device should come up as well as its children |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 104 | response = ubman.run_command('bind /bind-test simple_bus') |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 105 | assert response == '' |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 106 | tree = ubman.run_command('dm tree') |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 107 | assert in_tree(tree, 'bind-test', 'simple_bus', 'simple_bus', 0, True) |
| 108 | assert in_tree(tree, 'bind-test-child1', 'phy', 'phy_sandbox', 1, False) |
| 109 | assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'simple_bus', 1, True) |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 110 | |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 111 | response = ubman.run_command('unbind /bind-test') |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 112 | assert response == '' |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 113 | |
| 114 | def get_next_line(tree, name): |
Tom Rini | caae73a | 2025-05-08 15:34:43 -0600 | [diff] [blame^] | 115 | """A helper function to strip content out of dm tree output""" |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 116 | treelines = [x.strip() for x in tree.splitlines() if x.strip()] |
| 117 | child_line = '' |
| 118 | for idx, line in enumerate(treelines): |
| 119 | if '-- ' + name in line: |
| 120 | try: |
| 121 | child_line = treelines[idx+1] |
| 122 | except: |
| 123 | pass |
| 124 | break |
| 125 | return child_line |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 126 | |
Michal Simek | 901f5ba | 2022-07-07 12:52:26 +0200 | [diff] [blame] | 127 | @pytest.mark.boardspec('sandbox') |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 128 | @pytest.mark.buildconfigspec('cmd_bind') |
Simon Glass | ae3db3d | 2022-08-06 17:51:48 -0600 | [diff] [blame] | 129 | @pytest.mark.singlethread |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 130 | def test_bind_unbind_with_uclass(ubman): |
Tom Rini | caae73a | 2025-05-08 15:34:43 -0600 | [diff] [blame^] | 131 | """Test the bind and unbind commands of a class |
| 132 | |
| 133 | Bind and unbind the simple_bus class while verifying that the dm tree |
| 134 | output matches the expected values at each step. |
| 135 | """ |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 136 | #bind /bind-test |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 137 | response = ubman.run_command('bind /bind-test simple_bus') |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 138 | assert response == '' |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 139 | |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 140 | #make sure bind-test-child2 is there and get its uclass/index pair |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 141 | tree = ubman.run_command('dm tree') |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 142 | child2_line = [x.strip() for x in tree.splitlines() if '-- bind-test-child2' in x] |
| 143 | assert len(child2_line) == 1 |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 144 | |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 145 | child2_uclass = child2_line[0].split()[0] |
| 146 | child2_index = int(child2_line[0].split()[1]) |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 147 | |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 148 | #bind simple_bus as a child of bind-test-child2 |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 149 | response = ubman.run_command( |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 150 | 'bind {} {} simple_bus'.format(child2_uclass, child2_index)) |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 151 | |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 152 | #check that the child is there and its uclass/index pair is right |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 153 | tree = ubman.run_command('dm tree') |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 154 | |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 155 | child_of_child2_line = get_next_line(tree, 'bind-test-child2') |
| 156 | assert child_of_child2_line |
| 157 | child_of_child2_index = int(child_of_child2_line.split()[1]) |
| 158 | assert in_tree(tree, 'simple_bus', 'simple_bus', 'simple_bus', 2, True) |
| 159 | assert child_of_child2_index == child2_index + 1 |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 160 | |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 161 | #unbind the child and check it has been removed |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 162 | response = ubman.run_command('unbind simple_bus {}'.format(child_of_child2_index)) |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 163 | assert response == '' |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 164 | tree = ubman.run_command('dm tree') |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 165 | assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'simple_bus', 1, True) |
| 166 | assert not in_tree(tree, 'simple_bus', 'simple_bus', 'simple_bus', 2, True) |
| 167 | child_of_child2_line = get_next_line(tree, 'bind-test-child2') |
| 168 | assert child_of_child2_line == '' |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 169 | |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 170 | #bind simple_bus as a child of bind-test-child2 |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 171 | response = ubman.run_command( |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 172 | 'bind {} {} simple_bus'.format(child2_uclass, child2_index)) |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 173 | |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 174 | #check that the child is there and its uclass/index pair is right |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 175 | tree = ubman.run_command('dm tree') |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 176 | treelines = [x.strip() for x in tree.splitlines() if x.strip()] |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 177 | |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 178 | child_of_child2_line = get_next_line(tree, 'bind-test-child2') |
| 179 | assert child_of_child2_line |
| 180 | child_of_child2_index = int(child_of_child2_line.split()[1]) |
| 181 | assert in_tree(tree, 'simple_bus', 'simple_bus', 'simple_bus', 2, True) |
| 182 | assert child_of_child2_index == child2_index + 1 |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 183 | |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 184 | #unbind the child and check it has been removed |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 185 | response = ubman.run_command( |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 186 | 'unbind {} {} simple_bus'.format(child2_uclass, child2_index)) |
| 187 | assert response == '' |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 188 | |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 189 | tree = ubman.run_command('dm tree') |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 190 | assert in_tree(tree, 'bind-test-child2', 'simple_bus', 'simple_bus', 1, True) |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 191 | |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 192 | child_of_child2_line = get_next_line(tree, 'bind-test-child2') |
| 193 | assert child_of_child2_line == '' |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 194 | |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 195 | #unbind the child again and check it doesn't change the tree |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 196 | tree_old = ubman.run_command('dm tree') |
| 197 | response = ubman.run_command( |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 198 | 'unbind {} {} simple_bus'.format(child2_uclass, child2_index)) |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 199 | tree_new = ubman.run_command('dm tree') |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 200 | |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 201 | assert response == '' |
| 202 | assert tree_old == tree_new |
Jean-Jacques Hiblot | e83a31b | 2018-08-09 16:17:46 +0200 | [diff] [blame] | 203 | |
Simon Glass | ddba520 | 2025-02-09 09:07:14 -0700 | [diff] [blame] | 204 | response = ubman.run_command('unbind /bind-test') |
Heinrich Schuchardt | deccc81 | 2022-04-30 11:26:23 +0200 | [diff] [blame] | 205 | assert response == '' |