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)
评论列表
文章目录