test_interrupt.py 文件源码

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

项目:deb-kazoo 作者: openstack 项目源码 文件源码
def test_interrupted_systemcall(self):
        '''
        Make sure interrupted system calls don't break the world, since we
        can't control what all signals our connection thread will get
        '''
        if 'linux' not in platform:
            raise SkipTest('Unable to reproduce error case on'
                           ' non-linux platforms')

        path = 'interrupt_test'
        value = b"1"
        self.client.create(path, value)

        # set the euid to the current process' euid.
        # glibc sends SIGRT to all children, which will interrupt the
        # system call
        os.seteuid(os.geteuid())

        # basic sanity test that it worked alright
        assert self.client.get(path)[0] == value
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号