From 525f8293e5e74f1b19013ffa6be17ac65e4c124d Mon Sep 17 00:00:00 2001 From: Jonathan Afek Date: Thu, 23 Jun 2016 20:16:29 +0300 Subject: [PATCH] tests: Use cmd_execute() in find_wpas_process() The hwsim tests used to execute shell commands in the tests using the subprocess python module. Use the cmd_execute() general function for executing "ps ax" so that this would also work on remote setups. Signed-off-by: Jonathan Afek --- tests/hwsim/test_ap_psk.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/hwsim/test_ap_psk.py b/tests/hwsim/test_ap_psk.py index ac638374a..55f3eda2a 100644 --- a/tests/hwsim/test_ap_psk.py +++ b/tests/hwsim/test_ap_psk.py @@ -1666,8 +1666,7 @@ def test_ap_wpa2_psk_supp_proto_gtk_not_encrypted(dev, apdev): def find_wpas_process(dev): ifname = dev.ifname - cmd = subprocess.Popen(['ps', 'ax'], stdout=subprocess.PIPE) - (data,err) = cmd.communicate() + err, data = dev.cmd_execute(['ps', 'ax']) for l in data.splitlines(): if "wpa_supplicant" not in l: continue -- 2.47.3