Пример #1
0
def test_wmediumd_simple(dev, apdev, params):
    """test a simple wmediumd configuration"""
    fd, fn = tempfile.mkstemp()
    try:
        f = os.fdopen(fd, 'w')
        f.write(CFG % (apdev[0]['bssid'], dev[0].own_addr()))
        f.close()
        p = start_wmediumd(fn, params)
        try:
            _test_ap_open(dev, apdev)
        finally:
            stop_wmediumd(p, params)
        # test that releasing hwsim works correctly
        _test_ap_open(dev, apdev)
    finally:
        os.unlink(fn)
Пример #2
0
def test_wmediumd_simple(dev, apdev, params):
    """test a simple wmediumd configuration"""
    fd, fn = tempfile.mkstemp()
    try:
        f = os.fdopen(fd, 'w')
        f.write(CFG % (apdev[0]['bssid'], dev[0].own_addr()))
        f.close()
        p = start_wmediumd(fn, params)
        try:
            _test_ap_open(dev, apdev)
        finally:
            stop_wmediumd(p, params)
        # test that releasing hwsim works correctly
        _test_ap_open(dev, apdev)
    finally:
        os.unlink(fn)
Пример #3
0
def test_wmediumd_simple(dev, apdev):
    """test a simple wmediumd configuration"""
    fd, fn = tempfile.mkstemp()
    try:
        f = os.fdopen(fd, 'w')
        f.write(CFG % (apdev[0]['bssid'], dev[0].own_addr()))
        f.close()
        try:
            p = subprocess.Popen(['wmediumd', '-c', fn],
                                 stdout=open('/dev/null', 'a'),
                                 stderr=subprocess.STDOUT)
        except OSError, e:
            if e.errno == errno.ENOENT:
                raise HwsimSkip("wmediumd not available")
            raise
        try:
            _test_ap_open(dev, apdev)
        finally:
            p.terminate()
            p.wait()
        # test that releasing hwsim works correctly
        _test_ap_open(dev, apdev)
Пример #4
0
def test_wmediumd_simple(dev, apdev):
    """test a simple wmediumd configuration"""
    fd, fn = tempfile.mkstemp()
    try:
        f = os.fdopen(fd, 'w')
        f.write(CFG % (apdev[0]['bssid'], dev[0].own_addr()))
        f.close()
        try:
            p = subprocess.Popen(['wmediumd', '-c', fn],
                                 stdout=open('/dev/null', 'a'),
                                 stderr=subprocess.STDOUT)
        except OSError, e:
            if e.errno == errno.ENOENT:
                raise HwsimSkip("wmediumd not available")
            raise
        try:
            _test_ap_open(dev, apdev)
        finally:
            p.terminate()
            p.wait()
        # test that releasing hwsim works correctly
        _test_ap_open(dev, apdev)