hickup.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:ave 作者: sonyxperiadev 项目源码 文件源码
def t04(factory):
    pretty = '%s t4' % __file__
    print(pretty)

    ctrl  = factory.make_master('master')
    bpid  = ctrl.get_pid()
    spids = ctrl.get_session_pids()

    if [pid for pid in spids if pid < 2] != []:
        print('FAIL %s: impossible session PIDs: %d' % (pretty, spids))
        return False

    # signal the broker and wait for the hickup directory to appear. the signal
    # should be propagated to the equipment lister long before the directory is
    # created.
    os.kill(bpid, signal.SIGUSR1)
    path = os.path.join(factory.HOME.path, '.ave', 'hickup')
    wait_hickup_dir(path, 3)

    spids2 = ctrl.get_session_pids()
    if spids2 != spids:
        print('FAIL %s: sessions affected: %s != %s' % (pretty, spids2, spids))
        return False

    return True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号