From ebc2092c421774fa8c5d7fdba852518edf278914 Mon Sep 17 00:00:00 2001 From: Andrew Zaborowski Date: Sun, 26 Mar 2017 03:16:54 +0200 Subject: [PATCH] autotests: Pass wiphy whitelist in iwd command line Pass the -p parameter to the iwd process started by iwd.py (only used by testKnownNetworks) same as when iwd is started by test-runner.c --- autotests/util/iwd.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/autotests/util/iwd.py b/autotests/util/iwd.py index a7c77207..3de6490b 100755 --- a/autotests/util/iwd.py +++ b/autotests/util/iwd.py @@ -12,6 +12,8 @@ import time from abc import ABCMeta, abstractmethod from enum import Enum +import wiphy + IWD_STORAGE_DIR = '/var/lib/iwd' IWD_CONFIG_DIR = '/etc/iwd' @@ -521,8 +523,14 @@ class IWD(AsyncOpAbstract): if not start_iwd_daemon: return + iwd_wiphys = [wname for wname, wiphy in wiphy.wiphy_map.items() + if any(intf for intf in wiphy.values() + if intf.use == 'iwd')] + whitelist = ','.join(iwd_wiphys) + import subprocess - iwd_proc = subprocess.Popen(['iwd', '-c', iwd_config_dir]) + iwd_proc = subprocess.Popen(['iwd', '-c', iwd_config_dir, '-p', + whitelist]) tries = 0 while not self._bus.name_has_owner(IWD_SERVICE):