Skip to contentSkip to conversation

xfstests: add aio-dio-regress tests

PATCH In review Eric Sandeen 2 participants 2 messages Jun 2, 2009 – Jun 3, 2009

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 xfstests: add aio-dio-regress tests

Pull in the aio-dio-regress test suite from
http://git.kernel.org/?p=linux/kernel/git/zab/aio-dio-regress.git

This now has all the right copyright signoffs too.

---

 .gitignore                                                          |    6 
 207                                                                 |   57 ++
 207.out                                                             |    3 
 208                                                                 |   57 ++
 208.out                                                             |    3 
 209                                                                 |   57 ++
 209.out                                                             |    3 
 210                                                                 |   57 ++
 210.out                                                             |    3 
 211                                                                 |   57 ++
 211.out                                                             |    3 
 212                                                                 |   58 +++
 212.out                                                             |    3 
 group                                                               |    6 
 src/Makefile                                                        |    6 
 src/aio-dio-regress/Makefile                                        |   20 +
 src/aio-dio-regress/SOURCE                                          |    7 
 src/aio-dio-regress/aio-dio-extend-stat.c                           |  181 +++++++++
 src/aio-dio-regress/aio-dio-invalidate-failure.c                    |  174 +++++++++
 src/aio-dio-regress/aio-dio-invalidate-readahead.c                  |  191 ++++++++++
 src/aio-dio-regress/aio-dio-subblock-eof-read.c                     |  115 ++++++
 src/aio-dio-regress/aio-free-ring-with-bogus-nr-pages.c             |   85 ++++
 src/aio-dio-regress/aio-io-setup-with-nonwritable-context-pointer.c |   51 ++
.gitignore +6 -0
index 2cd722b..d7cbab1 100644
@@ -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
207 new file +57 -0

57 lines not on this page · raw message

207.out new file +3 -0
new file mode 100644
index 0000000..1841efb
@@ -0,0 +1,3 @@
+QA output created by 207
+==aio-dio-extend-stat==
+4000 iterations of racing extensions and collection passed
208 new file +57 -0

57 lines not on this page · raw message

208.out new file +3 -0
new file mode 100644
index 0000000..c222c41
@@ -0,0 +1,3 @@
+QA output created by 208
+==aio-dio-invalidate-failure==
+ran for 200 seconds without error, passing
209 new file +57 -0

57 lines not on this page · raw message

209.out new file +3 -0
new file mode 100644
index 0000000..db90b67
@@ -0,0 +1,3 @@
+QA output created by 209
+==aio-dio-invalidate-readahead==
+test ran for 30 seconds without error
210 new file +57 -0

57 lines not on this page · raw message

210.out new file +3 -0
new file mode 100644
index 0000000..01012fb
@@ -0,0 +1,3 @@
+QA output created by 210
+==aio-dio-subblock-eof-read==
+AIO read of last block in file succeeded.
211 new file +57 -0

57 lines not on this page · raw message

211.out new file +3 -0
new file mode 100644
index 0000000..bec76b7
@@ -0,0 +1,3 @@
+QA output created by 211
+==aio-free-ring-with-bogus-nr-pages==
+aio-free-ring-with-bogus-nr-pages: Success!
212 new file +58 -0

58 lines not on this page · raw message

212.out new file +3 -0
new file mode 100644
index 0000000..259d895
@@ -0,0 +1,3 @@
+QA output created by 212
+==aio-io-setup-with-nonwritable-context-pointer==
+aio-io-setup-with-nonwritable-context-pointer: Success!
group +6 -0
index 0551d06..b72fe7b 100644
@@ -311,3 +311,9 @@ atime
 204 metadata rw auto
 205 metadata rw auto
 206 growfs auto quick
+207 generic auto aio quick
+208 generic auto aio
+209 generic auto aio
+210 generic auto aio quick
+211 generic auto aio quick
+212 generic auto aio quick
src/Makefile +5 -1
index 634e1b3..6e68b79 100644
@@ -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
new file mode 100644
index 0000000..9968093
@@ -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/SOURCE new file +7 -0
new file mode 100644
index 0000000..b45ff0b
@@ -0,0 +1,7 @@
+From:
+http://www.kernel.org/pub/scm/linux/kernel/git/zab/aio-dio-regress.git
+
+description	AIO and DIO regression tests
+owner	Zach Brown
+URL	git://git.kernel.org/pub/scm/linux/kernel/git/zab/aio-dio-regress.git
+	http://www.kernel.org/pub/scm/linux/kernel/git/zab/aio-dio-regress.git
src/aio-dio-regress/aio-dio-extend-stat.c new file +181 -0

181 lines not on this page · raw message

src/aio-dio-regress/aio-dio-invalidate-failure.c new file +174 -0

174 lines not on this page · raw message

src/aio-dio-regress/aio-dio-invalidate-readahead.c new file +191 -0

191 lines not on this page · raw message

src/aio-dio-regress/aio-dio-subblock-eof-read.c new file +115 -0

115 lines not on this page · raw message

src/aio-dio-regress/aio-free-ring-with-bogus-nr-pages.c new file +85 -0

85 lines not on this page · raw message

src/aio-dio-regress/aio-io-setup-with-nonwritable-context-pointer.c new file +51 -0

51 lines not on this page · raw message

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by on v3 1/1
#1 lore raw

207 line 53

Quoted 5 lines · Eric Sandeen
207 new file +5 -0
+AIO_TEST=aio-dio-extend-stat
+
+rm -f $TEST_DIR/aio-testfile
+echo "==${AIO_TEST}=="
+src/aio-dio-regress/$AIO_TEST $TEST_DIR/aio-testfile 2>&1

the AIO_TEST variable seems superflous in all these tests. Also the echo isn't really strictly needed if only running one thing anyway.

Modulo these nitpicks looks good to me,