xfstests: add aio-dio-test suite
PATCH v2 1/1 xfstests: add aio-dio-test suite
Pull in the aio-dio-regress test suite from
http://git.kernel.org/?p=linux/kernel/git/zab/aio-dio-regress.git
Changed from last time to break out into individual tests, and move it under src/aio-dio-regress
Also flagged a few as part of the "quick" group.
---
.gitignore +6 -0
@@ -88,3 +88,9 @@ src/unwritten_sync src/usemem src/writemod src/xfsctl +src/aio-dio-regress/aio-dio-extend-stat +src/aio-dio-regress/aio-dio-invalidate-failure +src/aio-dio-regress/aio-dio-invalidate-readahead +src/aio-dio-regress/aio-dio-subblock-eof-read +src/aio-dio-regress/aio-free-ring-with-bogus-nr-pages +src/aio-dio-regress/aio-io-setup-with-nonwritable-context-pointer
206 new file +44 -0
44 lines not on this page · raw message
206.out new file +3 -0
@@ -0,0 +1,3 @@ +QA output created by 206 +==aio-dio-extend-stat== +4000 iterations of racing extensions and collection passed
207 new file +44 -0
44 lines not on this page · raw message
207.out new file +3 -0
@@ -0,0 +1,3 @@ +QA output created by 207 +==aio-dio-invalidate-failure== +ran for 200 seconds without error, passing
208 new file +44 -0
44 lines not on this page · raw message
208.out new file +3 -0
@@ -0,0 +1,3 @@ +QA output created by 208 +==aio-dio-invalidate-readahead== +test ran for 30 seconds without error
209 new file +44 -0
44 lines not on this page · raw message
209.out new file +3 -0
@@ -0,0 +1,3 @@ +QA output created by 209 +==aio-dio-subblock-eof-read== +AIO read of last block in file succeeded.
210 new file +44 -0
44 lines not on this page · raw message
210.out new file +3 -0
@@ -0,0 +1,3 @@ +QA output created by 210 +==aio-free-ring-with-bogus-nr-pages== +aio-free-ring-with-bogus-nr-pages: Success!
211 new file +44 -0
44 lines not on this page · raw message
211.out new file +3 -0
@@ -0,0 +1,3 @@ +QA output created by 211 +==aio-io-setup-with-nonwritable-context-pointer== +aio-io-setup-with-nonwritable-context-pointer: Success!
group +6 -0
@@ -310,3 +310,9 @@ atime 203 ioctl auto 204 metadata rw auto 205 metadata rw auto +206 auto aio quick +207 auto aio +208 auto aio +209 auto aio quick +210 auto aio quick +211 auto aio quick
src/Makefile +5 -1
@@ -35,10 +35,14 @@ ifeq ($(PKG_PLATFORM),linux) TARGETS += t_immutable endif +ifeq ($(HAVE_AIO), true) +SUBDIRS += aio-dio-regress +endif + CFILES = $(TARGETS:=.c) LDIRT = $(TARGETS) -default: $(TARGETS) +default: $(TARGETS) $(SUBDIRS) include $(BUILDRULES) LINKTEST = $(LTLINK) [email protected] -o $@ $(CFLAGS) $(LDFLAGS)
src/aio-dio-regress/Makefile new file +20 -0
@@ -0,0 +1,20 @@ +TOPDIR = ../.. +include $(TOPDIR)/include/builddefs + +TARGETS = $(basename $(wildcard *.c)) + +CFILES = $(TARGETS:=.c) +LDIRT = $(TARGETS) + +LIBAIO = -laio -lpthread + +default: $(TARGETS) + +include $(BUILDRULES) + +$(TARGETS): %: %.c + $(CC) -g -Wall $(LIBAIO) -o $@ $*.c + +install: + $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/src/aio-dio-regress + $(INSTALL) -m 755 $(TARGETS) $(PKG_LIB_DIR)/src/aio-dio-regress
src/aio-dio-regress/aio-dio-extend-stat.c new file +163 -0
163 lines not on this page · raw message
src/aio-dio-regress/aio-dio-invalidate-failure.c new file +155 -0
155 lines not on this page · raw message
src/aio-dio-regress/aio-dio-invalidate-readahead.c new file +172 -0
172 lines not on this page · raw message
src/aio-dio-regress/aio-dio-subblock-eof-read.c new file +95 -0
95 lines not on this page · raw message
src/aio-dio-regress/aio-free-ring-with-bogus-nr-pages.c new file +65 -0
65 lines not on this page · raw message
src/aio-dio-regress/aio-io-setup-with-nonwritable-context-pointer.c new file +31 -0
@@ -0,0 +1,31 @@ +/* +* Author: Jeff Moyer +* +* Description: Pass a non-writable context pointer to io_setup to see if +* the kernel deals with it correctly. In the past, the reference counting +* in this particular error path was off and this operation would cause an +* oops. +* +* This is a destructive test. +*/ +#include <stdio.h> +#include <stdlib.h> +#include <sys/mman.h> +#include <libgen.h> +#include <libaio.h> + +int +main (int __attribute__((unused)) argc,char **argv) +{ +void *addr; + + addr =mmap (NULL ,4096 ,PROT_READ ,MAP_SHARED |MAP_ANONYMOUS ,0 ,0 ); +if (!addr) { +perror ("mmap" ); +exit (1 ); + } +io_setup (1 , addr/* un-writable pointer */ ); + +printf ("%s: Success!\n" ,basename (argv[0 ])); +return 0 ; +}
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 7 lines · Eric Sandeen
Pull in the aio-dio-regress test suite from
http://git.kernel.org/?p=linux/kernel/git/zab/aio-dio-regress.gitChanged from last time to break out into individual tests, and move it under src/aio-dio-regress
Also flagged a few as part of the "quick" group.
The xfsqa integration looks good to me. Might be worth to mention what test each test cases runs in the top of file comments instead of just the aio+dio testsuite.
Also what about keeping a file named SOURCE or similar in src/aio-dio-regress to tell exactly where we got this version from (repository + commit) so that we know what to diff against.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 4 lines · Christoph Hellwig
Quoted 3 lines · Eric Sandeen
Pull in the aio-dio-regress test suite from
http://git.kernel.org/?p=linux/kernel/git/zab/aio-dio-regress.git
Quoted 8 lines
Quoted 4 lines
Changed from last time to break out into individual tests, and move it under src/aio-dio-regress
Also flagged a few as part of the "quick" group.
The xfsqa integration looks good to me. Might be worth to mention what test each test cases runs in the top of file comments instead of just the aio+dio testsuite.
good point, I'll lift comments from the tests themselves into the scripts.
Quoted 3 lines
Also what about keeping a file named SOURCE or similar in src/aio-dio-regress to tell exactly where we got this version from (repository + commit) so that we know what to diff against.
ok, sure.
I'll ask jeff & zach to put some proper licensing on the c files, and do the same for my new scripts as well.
-Eric
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs