3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-22 14:49:24 +01:00

auto-t: Honor valgrind flag if iwd starts from python

Before starting iwd, we check if IWD_TEST_VALGRIND was set
by test-runner, and if so, start iwd with the appropriate
valgrind options.
This commit is contained in:
James Prestwood 2018-04-26 16:24:26 -07:00 committed by Denis Kenzior
parent aed98137fb
commit a83419011e

View File

@ -617,14 +617,24 @@ class IWD(AsyncOpAbstract):
mainloop = GLib.MainLoop() mainloop = GLib.MainLoop()
if start_iwd_daemon: if start_iwd_daemon:
args = []
iwd_wiphys = [wname for wname, wiphy in wiphy.wiphy_map.items() iwd_wiphys = [wname for wname, wiphy in wiphy.wiphy_map.items()
if any(intf for intf in wiphy.values() if any(intf for intf in wiphy.values()
if intf.use == 'iwd')] if intf.use == 'iwd')]
whitelist = ','.join(iwd_wiphys) whitelist = ','.join(iwd_wiphys)
if os.environ.get('IWD_TEST_VALGRIND', None) == 'on':
args.append('valgrind')
args.append('--leak-check=full')
args.append('iwd')
args.append('-c')
args.append(iwd_config_dir)
args.append('-p')
args.append(whitelist)
import subprocess import subprocess
iwd_proc = subprocess.Popen(['iwd', '-c', iwd_config_dir, '-p', iwd_proc = subprocess.Popen(args)
whitelist])
self._iwd_proc = iwd_proc self._iwd_proc = iwd_proc