@@ -64,7 +64,7 @@ def EnsurePrivateState():
64
64
sys .exit (1 )
65
65
66
66
67
- def CreateNamespacesForAppTest (wifi_ble_config : bool = False ):
67
+ def CreateNamespacesForAppTest (ble_wifi : bool = False ):
68
68
"""
69
69
Creates appropriate namespaces for a tool and app binaries in a simulated
70
70
isolated network.
@@ -106,7 +106,7 @@ def CreateNamespacesForAppTest(wifi_ble_config: bool = False):
106
106
"ip link set dev eth-ci-switch up" ,
107
107
]
108
108
109
- if not wifi_ble_config :
109
+ if not ble_wifi :
110
110
COMMANDS += [
111
111
"ip link add eth-app-direct type veth peer name eth-tool-direct" ,
112
112
"ip link set eth-app-direct netns app" ,
@@ -144,7 +144,7 @@ def CreateNamespacesForAppTest(wifi_ble_config: bool = False):
144
144
logging .warn ("Some addresses look to still be tentative" )
145
145
146
146
147
- def RemoveNamespaceForAppTest (wifi_ble_config : bool = False ):
147
+ def RemoveNamespaceForAppTest (ble_wifi : bool = False ):
148
148
"""
149
149
Removes namespaces for a tool and app binaries previously created to simulate an
150
150
isolated network. This tears down what was created in CreateNamespacesForAppTest.
@@ -165,12 +165,11 @@ def RemoveNamespaceForAppTest(wifi_ble_config: bool = False):
165
165
"ip netns del app" ,
166
166
]
167
167
168
- if not wifi_ble_config :
168
+ if not ble_wifi :
169
169
COMMANDS += [
170
170
"ip link set dev eth-app-direct down" ,
171
171
"ip link set dev eth-tool-direct down" ,
172
172
"ip link delete eth-tool-direct" ,
173
- "ip link delete eth-app-direct" ,
174
173
]
175
174
176
175
for command in COMMANDS :
@@ -181,17 +180,17 @@ def RemoveNamespaceForAppTest(wifi_ble_config: bool = False):
181
180
sys .exit (1 )
182
181
183
182
184
- def PrepareNamespacesForTestExecution (in_unshare : bool , wifi_ble_config : bool = False ):
183
+ def PrepareNamespacesForTestExecution (in_unshare : bool , ble_wifi : bool = False ):
185
184
if not in_unshare :
186
185
EnsureNetworkNamespaceAvailability ()
187
186
elif in_unshare :
188
187
EnsurePrivateState ()
189
188
190
- CreateNamespacesForAppTest (wifi_ble_config )
189
+ CreateNamespacesForAppTest (ble_wifi )
191
190
192
191
193
- def ShutdownNamespaceForTestExecution (wifi_ble_config : bool = False ):
194
- RemoveNamespaceForAppTest (wifi_ble_config )
192
+ def ShutdownNamespaceForTestExecution (ble_wifi : bool = False ):
193
+ RemoveNamespaceForAppTest (ble_wifi )
195
194
196
195
197
196
class DbusTest :
0 commit comments