Changeset View
Changeset View
Standalone View
Standalone View
head/tests/sys/fs/fusefs/utils.hh
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | class FuseTest : public ::testing::Test { | ||||
/* | /* | ||||
* Create an expectation that FUSE_GETATTR will be called for the given | * Create an expectation that FUSE_GETATTR will be called for the given | ||||
* inode any number of times. It will respond with a few basic | * inode any number of times. It will respond with a few basic | ||||
* attributes, like the given size and the mode S_IFREG | 0644 | * attributes, like the given size and the mode S_IFREG | 0644 | ||||
*/ | */ | ||||
void expect_getattr(uint64_t ino, uint64_t size); | void expect_getattr(uint64_t ino, uint64_t size); | ||||
/* | /* | ||||
* Create an expectation that FUSE_GETXATTR will be called once for the | |||||
* given inode. | |||||
*/ | |||||
void expect_getxattr(uint64_t ino, const char *attr, ProcessMockerT r); | |||||
/* | |||||
* Create an expectation that FUSE_LOOKUP will be called for the given | * Create an expectation that FUSE_LOOKUP will be called for the given | ||||
* path exactly times times and cache validity period. It will respond | * path exactly times times and cache validity period. It will respond | ||||
* with inode ino, mode mode, filesize size. | * with inode ino, mode mode, filesize size. | ||||
*/ | */ | ||||
void expect_lookup(const char *relpath, uint64_t ino, mode_t mode, | void expect_lookup(const char *relpath, uint64_t ino, mode_t mode, | ||||
uint64_t size, int times, uint64_t attr_valid = UINT64_MAX, | uint64_t size, int times, uint64_t attr_valid = UINT64_MAX, | ||||
uid_t uid = 0, gid_t gid = 0); | uid_t uid = 0, gid_t gid = 0); | ||||
▲ Show 20 Lines • Show All 108 Lines • Show Last 20 Lines |