1 # wmediumd sanity checks
2 # Copyright (c) 2015, Intel Deutschland GmbH
4 # This software may be distributed under the terms of the BSD license.
5 # See README for more details.
7 import tempfile, os, subprocess, errno
8 from utils import HwsimSkip
9 from test_ap_open import _test_ap_open
21 def test_wmediumd_simple(dev, apdev):
22 """test a simple wmediumd configuration"""
23 fd, fn = tempfile.mkstemp()
25 f = os.fdopen(fd, 'w')
26 f.write(CFG % (apdev[0]['bssid'], dev[0].own_addr()))
29 p = subprocess.Popen(['wmediumd', '-c', fn],
30 stdout=open('/dev/null', 'a'),
31 stderr=subprocess.STDOUT)
33 if e.errno == errno.ENOENT:
34 raise HwsimSkip("wmediumd not available")
37 _test_ap_open(dev, apdev)
41 # test that releasing hwsim works correctly
42 _test_ap_open(dev, apdev)