diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-10-03 08:56:54 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2021-10-03 08:56:54 +0000 |
commit | 34576ac03b936cfaeb71fd1552bd8ce87b58abbc (patch) | |
tree | 5b0d2f60b946ea8384ad1eb2369c9d796c7ff8d0 | |
parent | 20f9d3fef863c53be01015987cedbd068e37317f (diff) |
Extend filesystem tests to test mfs and tmpfs. Hook up mfs but leave tmpfs
out for now since it is not enabled by default.
mfs reports the same errors as ffs (no real surprise), tmpfs has a few
different errors.
OK bluhm@
-rw-r--r-- | regress/sys/ffs/Makefile | 4 | ||||
-rw-r--r-- | regress/sys/ffs/mfs/Makefile | 33 | ||||
-rw-r--r-- | regress/sys/ffs/tmpfs/Makefile | 33 |
3 files changed, 68 insertions, 2 deletions
diff --git a/regress/sys/ffs/Makefile b/regress/sys/ffs/Makefile index e12d979c61f..78a5df1a587 100644 --- a/regress/sys/ffs/Makefile +++ b/regress/sys/ffs/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.7 2017/01/13 01:19:13 bluhm Exp $ +# $OpenBSD: Makefile,v 1.8 2021/10/03 08:56:53 claudio Exp $ -SUBDIR= ffs nfs +SUBDIR= ffs nfs mfs PROG= fstest NOMAN= yes diff --git a/regress/sys/ffs/mfs/Makefile b/regress/sys/ffs/mfs/Makefile new file mode 100644 index 00000000000..0afa414fdf4 --- /dev/null +++ b/regress/sys/ffs/mfs/Makefile @@ -0,0 +1,33 @@ +# $OpenBSD: Makefile,v 1.1 2021/10/03 08:56:53 claudio Exp $ + +TESTS= chflags chmod chown link mkdir mkfifo open rename rmdir \ + symlink truncate unlink + +.PHONY: mount umount unconfig clean + +REGRESS_SETUP_ONCE+= mount +mount: + mkdir -p /mnt/regress-mfs + mount_mfs -s 4096 swap /mnt/regress-mfs + +REGRESS_CLEANUP+= umount +umount: + umount /mnt/regress-mfs + +REGRESS_CLEANUP+= unconfig +unconfig: + -umount -f /mnt/regress-mfs 2>/dev/null || true + -rmdir /mnt/regress-mfs 2>/dev/null || true + +REGRESS_SETUP+= ${.OBJDIR}/../fstest +${.OBJDIR}/../fstest: + ${.MAKE} -C ${.CURDIR}/.. fstest + +.for t in ${TESTS} +REGRESS_TARGETS+= run-$t +run-$t: + cd /mnt/regress-mfs && env FSTEST=${.OBJDIR}/../fstest \ + /bin/sh ${.CURDIR}/../run ${.CURDIR}/../tests/$t/*.t +.endfor + +.include <bsd.regress.mk> diff --git a/regress/sys/ffs/tmpfs/Makefile b/regress/sys/ffs/tmpfs/Makefile new file mode 100644 index 00000000000..0ec8a68aa40 --- /dev/null +++ b/regress/sys/ffs/tmpfs/Makefile @@ -0,0 +1,33 @@ +# $OpenBSD: Makefile,v 1.1 2021/10/03 08:56:53 claudio Exp $ + +TESTS= chflags chmod chown link mkdir mkfifo open rename rmdir \ + symlink truncate unlink + +.PHONY: mount umount unconfig clean + +REGRESS_SETUP_ONCE+= mount +mount: + mkdir -p /mnt/regress-tmpfs + mount_tmpfs -s 2M swap /mnt/regress-tmpfs + +REGRESS_CLEANUP+= umount +umount: + umount /mnt/regress-tmpfs + +REGRESS_CLEANUP+= unconfig +unconfig: + -umount -f /mnt/regress-tmpfs 2>/dev/null || true + -rmdir /mnt/regress-tmpfs 2>/dev/null || true + +REGRESS_SETUP+= ${.OBJDIR}/../fstest +${.OBJDIR}/../fstest: + ${.MAKE} -C ${.CURDIR}/.. fstest + +.for t in ${TESTS} +REGRESS_TARGETS+= run-$t +run-$t: + cd /mnt/regress-tmpfs && env FSTEST=${.OBJDIR}/../fstest \ + /bin/sh ${.CURDIR}/../run ${.CURDIR}/../tests/$t/*.t +.endfor + +.include <bsd.regress.mk> |