]>
git.proxmox.com Git - ceph.git/blob - ceph/src/test/test_cfuse_cache_invalidate.cc
11 #include "include/ceph_assert.h"
13 #define REGION 1048576
14 int main(int argc
, char *argv
[]) {
18 memset(buf
, 0, sizeof(buf
));
22 int fd
= open(argv
[1], O_RDWR
|O_CREAT
, 0644);
30 printf("writing %d\n", i
++);
31 ceph_assert(pwrite(fd
, buf
, REGION
, 0) == REGION
);
33 int ret
= waitpid(p
, &status
, WNOHANG
);
34 ceph_assert(ret
>= 0);
42 int fd
= open(argv
[2], O_RDONLY
, 0644);
49 ceph_assert(pread(fd
, buf
, REGION
, 0) == REGION
);