diff options
author | Sage Weil <sage.weil@dreamhost.com> | 2011-06-14 12:53:33 -0700 |
---|---|---|
committer | Sage Weil <sage.weil@dreamhost.com> | 2011-06-14 12:53:33 -0700 |
commit | 954e09661fa73895226418cc801314181cbd22f9 (patch) | |
tree | 0b57be6e0928d6bcbcab114ba6acbf5f0dc9beaf | |
parent | 40f5ab965900fb48194023ac79956364fddbbb3f (diff) | |
download | ceph-954e09661fa73895226418cc801314181cbd22f9.tar.gz |
qa: do not use automake for workunit makefiles
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | qa/Makefile | 4 | ||||
-rw-r--r-- | qa/Makefile.am | 3 | ||||
-rw-r--r-- | qa/workunits/Makefile | 4 | ||||
-rw-r--r-- | qa/workunits/Makefile.am | 2 | ||||
-rw-r--r-- | qa/workunits/direct_io/Makefile | 11 | ||||
-rw-r--r-- | qa/workunits/direct_io/Makefile.am | 14 | ||||
-rw-r--r-- | qa/workunits/direct_io/test_short_dio_read.c | 6 | ||||
-rw-r--r-- | qa/workunits/direct_io/test_sync_io.c | 30 | ||||
-rw-r--r-- | src/.gitignore | 2 |
12 files changed, 43 insertions, 41 deletions
diff --git a/.gitignore b/.gitignore index 73a9ea05dfa..79369627031 100644 --- a/.gitignore +++ b/.gitignore @@ -18,7 +18,7 @@ core.* vgcore.* src/Makefile Makefile.in -Makefile +/Makefile aclocal.m4 autom4te.cache config.log diff --git a/Makefile.am b/Makefile.am index b2200d9d442..7e79c1f8bcc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,13 +1,14 @@ AUTOMAKE_OPTIONS = gnu EXTRA_DIST = autogen.sh ceph.spec.in # the "." here makes sure check-local builds gtest before it is used -SUBDIRS = . src qa man +SUBDIRS = . src man EXTRA_DIST += \ src/test/run-cli-tests \ src/test/cli \ src/test/downloads \ udev/50-rbd.rules + check-local: # Build gtest before we build our own tests. Doing this instead # of SUBDIRS because with that, gtest's own tests would be run diff --git a/configure.ac b/configure.ac index ea5eb07a425..ff3b8d35a7c 100644 --- a/configure.ac +++ b/configure.ac @@ -348,8 +348,5 @@ AC_CONFIG_HEADERS([src/acconfig.h]) AC_CONFIG_FILES([Makefile src/Makefile man/Makefile - qa/Makefile - qa/workunits/Makefile - qa/workunits/direct_io/Makefile ceph.spec]) AC_OUTPUT diff --git a/qa/Makefile b/qa/Makefile new file mode 100644 index 00000000000..05dc834adbd --- /dev/null +++ b/qa/Makefile @@ -0,0 +1,4 @@ +DIRS= workunits + +all: + for d in $(DIRS) ; do ( cd $$d ; $(MAKE) all ) ; done diff --git a/qa/Makefile.am b/qa/Makefile.am deleted file mode 100644 index 0b8869af836..00000000000 --- a/qa/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -SUBDIRS = . workunits diff --git a/qa/workunits/Makefile b/qa/workunits/Makefile new file mode 100644 index 00000000000..d79ecd7f8b1 --- /dev/null +++ b/qa/workunits/Makefile @@ -0,0 +1,4 @@ +DIRS = direct_io + +all: + for d in $(DIRS) ; do ( cd $$d ; $(MAKE) all ) ; done diff --git a/qa/workunits/Makefile.am b/qa/workunits/Makefile.am deleted file mode 100644 index 5e77ccc23a8..00000000000 --- a/qa/workunits/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -AUTOMAKE_OPTIONS = gnu -SUBDIRS = direct_io diff --git a/qa/workunits/direct_io/Makefile b/qa/workunits/direct_io/Makefile new file mode 100644 index 00000000000..637b8d9046a --- /dev/null +++ b/qa/workunits/direct_io/Makefile @@ -0,0 +1,11 @@ +CFLAGS=-Wall -Wextra + +TARGETS= direct_io_test test_sync_io test_short_dio_read + +.c: + $(CC) $(CFLAGS) $@.c -o $@ + +all: $(TARGETS) + +clean: + rm $(TARGETS) diff --git a/qa/workunits/direct_io/Makefile.am b/qa/workunits/direct_io/Makefile.am deleted file mode 100644 index d41c4be6442..00000000000 --- a/qa/workunits/direct_io/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -SUBDIRS = -bin_PROGRAMS = - -AM_CFLAGS = -Wall - -direct_io_test_SOURCES = direct_io_test.c -test_sync_io_SOURCES = test_sync_io.c -test_short_dio_read_SOURCES = test_short_dio_read.c - -if WITH_DEBUG -bin_PROGRAMS += direct_io_test test_sync_io test_short_dio_read -endif diff --git a/qa/workunits/direct_io/test_short_dio_read.c b/qa/workunits/direct_io/test_short_dio_read.c index f9cce468ec5..e262201e3eb 100644 --- a/qa/workunits/direct_io/test_short_dio_read.c +++ b/qa/workunits/direct_io/test_short_dio_read.c @@ -5,15 +5,15 @@ #include <fcntl.h> #include <stdio.h> -int main(int argc, char **argv) +int main() { char buf[409600]; int fd = open("shortfile", O_WRONLY|O_CREAT, 0644); ssize_t r; printf("writing first 3 bytes of 10k file\n"); - write(fd, "foo", 3); - ftruncate(fd, 10000); + r = write(fd, "foo", 3); + r = ftruncate(fd, 10000); fsync(fd); close(fd); diff --git a/qa/workunits/direct_io/test_sync_io.c b/qa/workunits/direct_io/test_sync_io.c index c9042011a85..a5e4713c70d 100644 --- a/qa/workunits/direct_io/test_sync_io.c +++ b/qa/workunits/direct_io/test_sync_io.c @@ -25,9 +25,10 @@ void write_pattern() int fd = open("foo", O_CREAT|O_WRONLY, 0644); uint64_t i; + int r; for (i=0; i<1048576 * sizeof(i); i += sizeof(i)) { - write(fd, &i, sizeof(i)); + r = write(fd, &i, sizeof(i)); } close(fd); @@ -66,12 +67,12 @@ int read_direct(int buf_align, uint64_t offset, int len) (unsigned long long)offset, len); int fd = open("foo", O_RDONLY|O_DIRECT); void *rawbuf; - posix_memalign(&rawbuf, 4096, len + buf_align); + int r = posix_memalign(&rawbuf, 4096, len + buf_align); void *buf = (char *)rawbuf + buf_align; memset(buf, 0, len); - pread(fd, buf, len, offset); + r = pread(fd, buf, len, offset); close(fd); - int r = verify_pattern(buf, len, offset); + r = verify_pattern(buf, len, offset); free(rawbuf); return r; } @@ -83,12 +84,12 @@ int read_sync(int buf_align, uint64_t offset, int len) int fd = open("foo", O_RDONLY); ioctl(fd, CEPH_IOC_SYNCIO); void *rawbuf; - posix_memalign(&rawbuf, 4096, len + buf_align); + int r = posix_memalign(&rawbuf, 4096, len + buf_align); void *buf = (char *)rawbuf + buf_align; memset(buf, 0, len); - pread(fd, buf, len, offset); + r = pread(fd, buf, len, offset); close(fd); - int r = verify_pattern(buf, len, offset); + r = verify_pattern(buf, len, offset); free(rawbuf); return r; } @@ -101,19 +102,20 @@ int write_direct(int buf_align, uint64_t offset, int len) void *rawbuf; posix_memalign(&rawbuf, 4096, len + buf_align); void *buf = (char *)rawbuf + buf_align; + int r; generate_pattern(buf, len, offset); - pwrite(fd, buf, len, offset); + r = pwrite(fd, buf, len, offset); close(fd); fd = open("foo", O_RDONLY); void *buf2 = malloc(len); memset(buf2, 0, len); - pread(fd, buf2, len, offset); + r = pread(fd, buf2, len, offset); close(fd); - int r = verify_pattern(buf2, len, offset); + r = verify_pattern(buf2, len, offset); unlink("foo"); free(rawbuf); @@ -128,21 +130,21 @@ int write_sync(int buf_align, uint64_t offset, int len) int fd = open("foo", O_WRONLY|O_CREAT, 0644); ioctl(fd, CEPH_IOC_SYNCIO); void *rawbuf; - posix_memalign(&rawbuf, 4096, len + buf_align); + int r = posix_memalign(&rawbuf, 4096, len + buf_align); void *buf = (char *)rawbuf + buf_align; generate_pattern(buf, len, offset); - pwrite(fd, buf, len, offset); + r = pwrite(fd, buf, len, offset); close(fd); fd = open("foo", O_RDONLY); void *buf2 = malloc(len); memset(buf2, 0, len); - pread(fd, buf2, len, offset); + r = pread(fd, buf2, len, offset); close(fd); - int r = verify_pattern(buf2, len, offset); + r = verify_pattern(buf2, len, offset); unlink("foo"); free(buf2); diff --git a/src/.gitignore b/src/.gitignore index 21d5fa80357..69d4bc5bc32 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -67,6 +67,8 @@ crush/CrushWrapper_wrap.cxx /psim /sample.fetch_config +Makefile + /gtest/build-aux/config.h /gtest/build-aux/config.h.in /gtest/lib/ |