test_ops.py 文件源码

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

项目:tfhfs 作者: fingon 项目源码 文件源码
def test_mknod_c(oc):
    a = oc.ops.mknod(llfuse.ROOT_INODE, b'cdev',
                     stat.S_IFCHR, 42, oc.rctx_user)
    assert a.st_rdev == 42
    oc.ops.forget1(a.st_ino)
    a = oc.ops.mknod(llfuse.ROOT_INODE, b'bdev',
                     stat.S_IFBLK, 43, oc.rctx_user)
    assert a.st_rdev == 43
    oc.ops.forget1(a.st_ino)
    a = oc.ops.mknod(llfuse.ROOT_INODE, b'regfile',
                     stat.S_IFREG, 44, oc.rctx_user)
    assert not a.st_rdev
    oc.ops.forget1(a.st_ino)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号