tests: Use cmd_execute() for iw reg set 00
The hwsim tests used to execute shell commands in the tests using the subprocess python module. Use the cmd_execute() general function for executing "iw reg set 00" so that this would also work on remote setups. Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
This commit is contained in:
parent
fb120f1652
commit
a548c37bad
2 changed files with 5 additions and 6 deletions
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
import subprocess
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import hostapd
|
import hostapd
|
||||||
|
@ -144,7 +143,7 @@ def test_ap_acs_5ghz(dev, apdev):
|
||||||
dev[0].request("DISCONNECT")
|
dev[0].request("DISCONNECT")
|
||||||
if hapd:
|
if hapd:
|
||||||
hapd.request("DISABLE")
|
hapd.request("DISABLE")
|
||||||
subprocess.call(['iw', 'reg', 'set', '00'])
|
hostapd.cmd_execute(apdev[0], ['iw', 'reg', 'set', '00'])
|
||||||
dev[0].flush_scan_cache()
|
dev[0].flush_scan_cache()
|
||||||
|
|
||||||
def test_ap_acs_5ghz_40mhz(dev, apdev):
|
def test_ap_acs_5ghz_40mhz(dev, apdev):
|
||||||
|
@ -173,7 +172,7 @@ def test_ap_acs_5ghz_40mhz(dev, apdev):
|
||||||
dev[0].request("DISCONNECT")
|
dev[0].request("DISCONNECT")
|
||||||
if hapd:
|
if hapd:
|
||||||
hapd.request("DISABLE")
|
hapd.request("DISABLE")
|
||||||
subprocess.call(['iw', 'reg', 'set', '00'])
|
hostapd.cmd_execute(apdev[0], ['iw', 'reg', 'set', '00'])
|
||||||
dev[0].flush_scan_cache()
|
dev[0].flush_scan_cache()
|
||||||
|
|
||||||
def test_ap_acs_vht(dev, apdev):
|
def test_ap_acs_vht(dev, apdev):
|
||||||
|
@ -204,7 +203,7 @@ def test_ap_acs_vht(dev, apdev):
|
||||||
dev[0].request("DISCONNECT")
|
dev[0].request("DISCONNECT")
|
||||||
if hapd:
|
if hapd:
|
||||||
hapd.request("DISABLE")
|
hapd.request("DISABLE")
|
||||||
subprocess.call(['iw', 'reg', 'set', '00'])
|
hostapd.cmd_execute(apdev[0], ['iw', 'reg', 'set', '00'])
|
||||||
dev[0].flush_scan_cache()
|
dev[0].flush_scan_cache()
|
||||||
|
|
||||||
def test_ap_acs_bias(dev, apdev):
|
def test_ap_acs_bias(dev, apdev):
|
||||||
|
|
|
@ -112,7 +112,7 @@ def test_ap_country(dev, apdev):
|
||||||
dev[0].request("DISCONNECT")
|
dev[0].request("DISCONNECT")
|
||||||
if hapd:
|
if hapd:
|
||||||
hapd.request("DISABLE")
|
hapd.request("DISABLE")
|
||||||
subprocess.call(['iw', 'reg', 'set', '00'])
|
hostapd.cmd_execute(apdev[0], ['iw', 'reg', 'set', '00'])
|
||||||
dev[0].flush_scan_cache()
|
dev[0].flush_scan_cache()
|
||||||
|
|
||||||
def test_ap_acl_accept(dev, apdev):
|
def test_ap_acl_accept(dev, apdev):
|
||||||
|
@ -247,7 +247,7 @@ def test_ap_spectrum_management_required(dev, apdev):
|
||||||
dev[0].request("DISCONNECT")
|
dev[0].request("DISCONNECT")
|
||||||
if hapd:
|
if hapd:
|
||||||
hapd.request("DISABLE")
|
hapd.request("DISABLE")
|
||||||
subprocess.call(['iw', 'reg', 'set', '00'])
|
hostapd.cmd_execute(apdev[0], ['iw', 'reg', 'set', '00'])
|
||||||
dev[0].flush_scan_cache()
|
dev[0].flush_scan_cache()
|
||||||
|
|
||||||
def test_ap_max_listen_interval(dev, apdev):
|
def test_ap_max_listen_interval(dev, apdev):
|
||||||
|
|
Loading…
Reference in a new issue