fix: non-disruptive env check — drop wifi reload + misleading hop warning
- STA uplink disable now uses uci commit + ip link set wlan0 down instead of wifi reload, so the env check never bounces radios/APs/drops monitors - Removed the wlan0mon 'hop is off' warning: field-verified hop=0 is normal (wlan1mon also reports 0 while scanning both bands); the STA/AP pinning checks are the real signals - recon/status drops wlan0_hopping; UI keeps wlan0_sta + wlan0_pinned pills
This commit is contained in:
+3
-27
@@ -30,10 +30,6 @@ class EnvCheckTest(unittest.TestCase):
|
||||
self.daemon_ok = True
|
||||
self.iface_up = {'wlan0mon': True, 'wlan1mon': True}
|
||||
self.uci_state = {}
|
||||
self.interface_list = (
|
||||
'Interface #ch Bands Type Hop Chan Pkts \n'
|
||||
'wlan1mon 25 5 max fast hop 21567\n'
|
||||
'wlan0mon 11 2 max fast hop 452\n')
|
||||
server.ENV_CHECK_STATE.update({'report': None, 'overall': None, 'updated': 0,
|
||||
'pool_runtime': None})
|
||||
self.old_iface_up = server._iface_up
|
||||
@@ -81,8 +77,6 @@ class EnvCheckTest(unittest.TestCase):
|
||||
return (0, ''.join("%s=%s\n" % (k, v) for k, v in self.uci_state.items()
|
||||
if k.startswith(sec + '.')), '')
|
||||
if a[0] == '_pineap':
|
||||
if len(a) > 1 and a[1] == 'INTERFACE':
|
||||
return (0, self.interface_list, '')
|
||||
return (0, '', '')
|
||||
if a[0] in ('ip', '/etc/init.d/pineapd'):
|
||||
return (0, '', '')
|
||||
@@ -197,26 +191,6 @@ class EnvCheckTest(unittest.TestCase):
|
||||
report = server.env_check()
|
||||
self.assertEqual(self.steps(report, 'no radio0 AP pins wlan0mon')[0]['ok'], 'pass')
|
||||
|
||||
def test_wlan0_starved_warns(self):
|
||||
self.safe_set()
|
||||
self.interface_list = (
|
||||
'Interface #ch Bands Type Hop Chan Pkts \n'
|
||||
'wlan1mon 25 5 max fast hop 21567\n'
|
||||
'wlan0mon 11 2 max 0 hop 452\n')
|
||||
report = server.env_check()
|
||||
self.assertEqual(self.steps(report, 'wlan0mon hopping is off')[0]['ok'], 'warn')
|
||||
|
||||
def test_wlan0_hopping_unknown_warns(self):
|
||||
self.safe_set()
|
||||
self.interface_list = ''
|
||||
report = server.env_check()
|
||||
self.assertEqual(self.steps(report, 'could not read pineapd interface state')[0]['ok'], 'warn')
|
||||
|
||||
def test_wlan0_hopping_pass(self):
|
||||
self.safe_set()
|
||||
report = server.env_check()
|
||||
self.assertEqual(self.steps(report, 'wlan0mon hopping on')[0]['ok'], 'pass')
|
||||
|
||||
def test_sta_uplink_disabled_when_enabled(self):
|
||||
self.safe_set()
|
||||
self.uci_state['wireless.dummy_radio0.mode'] = 'sta'
|
||||
@@ -225,7 +199,9 @@ class EnvCheckTest(unittest.TestCase):
|
||||
report = server.env_check()
|
||||
self.assertEqual(self.steps(report, 'dummy_radio0 STA uplink disabled')[0]['ok'], 'fixed')
|
||||
self.assertEqual(self.uci_state['wireless.dummy_radio0.disabled'], '1')
|
||||
self.assertIn(['wifi', 'reload'], self.runs)
|
||||
self.assertIn(['ip', 'link', 'set', 'wlan0', 'down'], self.runs)
|
||||
self.assertNotIn(['wifi', 'reload'], self.runs,
|
||||
'STA fix must not bounce the radios')
|
||||
|
||||
def test_sta_uplink_pass_when_absent(self):
|
||||
self.safe_set()
|
||||
|
||||
Reference in New Issue
Block a user