From 569689933dd278e2016085107a33549d2bb6ebf6 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 19 Jul 2019 14:17:56 +0800 Subject: [PATCH] test/old/test_*seek_read: remove this test no need to test `lseek64()` and `read()` APIs in Ceph. Signed-off-by: Kefu Chai --- src/test/old/test_seek_read.c | 63 -------------------------- src/test/old/test_short_seek_read.c | 70 ----------------------------- 2 files changed, 133 deletions(-) delete mode 100644 src/test/old/test_seek_read.c delete mode 100644 src/test/old/test_short_seek_read.c diff --git a/src/test/old/test_seek_read.c b/src/test/old/test_seek_read.c deleted file mode 100644 index c63ed34d77e..00000000000 --- a/src/test/old/test_seek_read.c +++ /dev/null @@ -1,63 +0,0 @@ -#include "include/types.h" -#include "common/Clock.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -int main(int argc, char **argv) -{ - char *fn = argv[1]; - - int fd = ::open(fn, O_RDWR|O_DIRECT);//|O_SYNC|O_DIRECT); - if (fd < 0) return 1; - - uint64_t bytes = 0; - int r = ioctl(fd, BLKGETSIZE64, &bytes); - uint64_t numblocks = bytes / 4096; - - //uint64_t numblocks = atoll(argv[2]) * 4;// / 4096; - int count = 1000; - - cout << "fn " << fn << endl; - cout << "numblocks " << numblocks << endl; - - int blocks = 1; - while (blocks <= 1024) { - //cout << "fd is " << fd << endl; - - void *buf; - ::posix_memalign(&buf, 4096, 4096*blocks); - - int s = blocks*4096; - - utime_t start = ceph_clock_now(); - for (int i=0; i -#include -#include -#include -#include -#include -#include -#include - -int main(int argc, char **argv) -{ - char *fn = argv[1]; - - int fd = ::open(fn, O_RDWR|O_DIRECT);//|O_SYNC|O_DIRECT); - if (fd < 0) return 1; - - uint64_t bytes = 0; - int r = ioctl(fd, BLKGETSIZE64, &bytes); - uint64_t numblocks = bytes / 4096; - - //uint64_t numblocks = atoll(argv[2]) * 4;// / 4096; - int count = 1000; - - cout << "fn " << fn << endl; - cout << "numblocks " << numblocks << endl; - - int blocks = 1; - while (blocks <= 1024) { - //cout << "fd is " << fd << endl; - - void *buf; - ::posix_memalign(&buf, 4096, 4096*blocks); - - int s = blocks*4096; - - double timeper = 0.0; - for (int i=0; i