diff mbox

[2/2] tests: kill subprocess from test_ap_acs.py

Message ID 1459578262-6388-2-git-send-email-janusz.dziedzic@tieto.com
State Changes Requested
Headers show

Commit Message

Janusz.Dziedzic@tieto.com April 2, 2016, 6:24 a.m. UTC
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
---
 tests/hwsim/test_ap_acs.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/tests/hwsim/test_ap_acs.py b/tests/hwsim/test_ap_acs.py
index 6d7b5dc..5654e91 100644
--- a/tests/hwsim/test_ap_acs.py
+++ b/tests/hwsim/test_ap_acs.py
@@ -6,7 +6,6 @@ 
 
 import logging
 logger = logging.getLogger()
-import subprocess
 import time
 
 import hostapd
@@ -145,7 +144,8 @@  def test_ap_acs_5ghz(dev, apdev):
         dev[0].request("DISCONNECT")
         if hapd:
             hapd.request("DISABLE")
-        subprocess.call(['iw', 'reg', 'set', '00'])
+            hapd.host.execute("iw reg set 00")
+        dev[0].host.execute("iw reg set 00")
         dev[0].flush_scan_cache()
 
 def test_ap_acs_5ghz_40mhz(dev, apdev):
@@ -174,7 +174,8 @@  def test_ap_acs_5ghz_40mhz(dev, apdev):
         dev[0].request("DISCONNECT")
         if hapd:
             hapd.request("DISABLE")
-        subprocess.call(['iw', 'reg', 'set', '00'])
+            hapd.host.execute("iw reg set 00")
+        dev[0].host.execute("iw reg set 00")
         dev[0].flush_scan_cache()
 
 def test_ap_acs_vht(dev, apdev):
@@ -205,7 +206,8 @@  def test_ap_acs_vht(dev, apdev):
         dev[0].request("DISCONNECT")
         if hapd:
             hapd.request("DISABLE")
-        subprocess.call(['iw', 'reg', 'set', '00'])
+            hapd.host.execute("iw reg set 00")
+        dev[0].host.execute("iw reg set 00")
         dev[0].flush_scan_cache()
 
 def test_ap_acs_bias(dev, apdev):