From 38ec9b882768626d6f44fae2dc5b5353e8a2e249 Mon Sep 17 00:00:00 2001 From: claudio Date: Sun, 3 Oct 2021 08:56:53 +0000 Subject: [PATCH] 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@ --- regress/sys/ffs/Makefile | 4 ++-- regress/sys/ffs/mfs/Makefile | 33 +++++++++++++++++++++++++++++++++ regress/sys/ffs/tmpfs/Makefile | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 regress/sys/ffs/mfs/Makefile create mode 100644 regress/sys/ffs/tmpfs/Makefile 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 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 -- 2.20.1