Changeset View
Changeset View
Standalone View
Standalone View
tests/sys/fs/fusefs/utils.hh
Show First 20 Lines • Show All 169 Lines • ▼ Show 20 Lines | class FuseTest : public ::testing::Test { | ||||
* Create an expectation that FUSE_READ will be called exactly once for | * Create an expectation that FUSE_READ will be called exactly once for | ||||
* the given inode, at offset offset and with size isize. It will | * the given inode, at offset offset and with size isize. It will | ||||
* return the first osize bytes from contents | * return the first osize bytes from contents | ||||
* | * | ||||
* Protocol 7.8 tests can use this same expectation method because | * Protocol 7.8 tests can use this same expectation method because | ||||
* nothing currently validates the size of the fuse_read_in struct. | * nothing currently validates the size of the fuse_read_in struct. | ||||
*/ | */ | ||||
void expect_read(uint64_t ino, uint64_t offset, uint64_t isize, | void expect_read(uint64_t ino, uint64_t offset, uint64_t isize, | ||||
uint64_t osize, const void *contents, int flags = -1); | uint64_t osize, const void *contents, int flags = -1, | ||||
uint64_t fh = FH); | |||||
/* | /* | ||||
* Create an expectation that FUSE_READIR will be called any number of | * Create an expectation that FUSE_READIR will be called any number of | ||||
* times on the given ino with the given offset, returning (by copy) | * times on the given ino with the given offset, returning (by copy) | ||||
* the provided entries | * the provided entries | ||||
*/ | */ | ||||
void expect_readdir(uint64_t ino, uint64_t off, | void expect_readdir(uint64_t ino, uint64_t off, | ||||
std::vector<struct dirent> &ents); | std::vector<struct dirent> &ents); | ||||
▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines |