From 31209e1434815012503dafa80682a4212f6d538f Mon Sep 17 00:00:00 2001 From: Jonathan Afek Date: Tue, 7 Jun 2016 16:42:41 +0300 Subject: [PATCH] tests: Use cmd_execute() in ap_ht clear_scan_cache() The ap_ht tests used to execute shell commands in the tests using the subprocess python module. Complete the move to using the cmd_execute() general function for executing shell commands so that this would also work on remote setups. Signed-off-by: Jonathan Afek --- tests/hwsim/test_ap_ht.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/hwsim/test_ap_ht.py b/tests/hwsim/test_ap_ht.py index ce8710e88..9b93cd6b1 100644 --- a/tests/hwsim/test_ap_ht.py +++ b/tests/hwsim/test_ap_ht.py @@ -8,7 +8,6 @@ import time import logging logger = logging.getLogger() import struct -import subprocess import hostapd from utils import HwsimSkip, alloc_fail @@ -17,10 +16,11 @@ from test_ap_csa import csa_supported def clear_scan_cache(apdev): ifname = apdev['ifname'] - subprocess.call(['ifconfig', ifname, 'up']) - subprocess.call(['iw', ifname, 'scan', 'trigger', 'freq', '2412', 'flush']) + hostapd.cmd_execute(apdev, ['ifconfig', ifname, 'up']) + hostapd.cmd_execute(apdev, ['iw', ifname, 'scan', 'trigger', 'freq', '2412', + 'flush']) time.sleep(0.1) - subprocess.call(['ifconfig', ifname, 'down']) + hostapd.cmd_execute(apdev, ['ifconfig', ifname, 'down']) def set_world_reg(apdev0=None, apdev1=None, dev0=None): if apdev0: