Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/regress/sys/fs/lfs Regression test to ensure that (1) newfs_...
details: https://anonhg.NetBSD.org/src/rev/cf7f21983e45
branches: trunk
changeset: 542442:cf7f21983e45
user: perseant <perseant%NetBSD.org@localhost>
date: Wed Jan 29 04:56:16 2003 +0000
description:
Regression test to ensure that (1) newfs_lfs and fsck_lfs agree about
what makes up a good filesystem; and that (2) the kernel and fsck_lfs
also agree. This test, like the 9994 test and like the FFS endianness
test, is not included in the main "make regress".
diffstat:
regress/sys/fs/lfs/Makefile | 4 +-
regress/sys/fs/lfs/newfs_fsck/Makefile | 50 ++++++++++++++++++++++++++++++++++
regress/sys/fs/lfs/newfs_fsck/disktab | 7 ++++
3 files changed, 59 insertions(+), 2 deletions(-)
diffs (76 lines):
diff -r 619f5a43dd93 -r cf7f21983e45 regress/sys/fs/lfs/Makefile
--- a/regress/sys/fs/lfs/Makefile Wed Jan 29 03:55:34 2003 +0000
+++ b/regress/sys/fs/lfs/Makefile Wed Jan 29 04:56:16 2003 +0000
@@ -1,5 +1,5 @@
-# $NetBSD: Makefile,v 1.1 2002/08/02 19:10:49 perseant Exp $
+# $NetBSD: Makefile,v 1.2 2003/01/29 04:56:16 perseant Exp $
-SUBDIR= 9994
+SUBDIR= 9994 newfs_fsck
.include <bsd.subdir.mk>
diff -r 619f5a43dd93 -r cf7f21983e45 regress/sys/fs/lfs/newfs_fsck/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/sys/fs/lfs/newfs_fsck/Makefile Wed Jan 29 04:56:16 2003 +0000
@@ -0,0 +1,50 @@
+# $NetBSD: Makefile,v 1.1 2003/01/29 04:56:17 perseant Exp $
+
+NOMAN= # defined
+
+TMPL=/tmp/lfstemplate
+TMPMP=/tmp/lfsregresstest_mount
+TMPIM=/var/tmp/lfsregresstest.im
+SRCDIR?= ${.CURDIR}
+
+VND?= vnd0
+BVND= /dev/${VND}
+CVND= /dev/r${VND}
+MPART?= a
+.if (${MACHINE_ARCH} == "i386")
+RPART?= d
+.else
+RPART?= c
+.endif
+
+#
+# Make a small filesystem, and fsck it.
+# This ensures that newfs_lfs and fsck_lfs play well together.
+#
+# Mount it, copy some data in, unmount, fsck.
+# This ensures that kernel and fsck_lfs play well together.
+#
+# This was based on the FFS endianness regression tests.
+#
+regress:
+ @echo "*** Creating a dummy directory tree at ${TMPMP} monted on" \
+ "${TMPIM}."
+ dd if=/dev/zero of=${TMPIM} count=5860
+ vnconfig -v ${BVND}${RPART} ${TMPIM}
+ disklabel -f ${SRCDIR}/disktab -rw ${VND} floppy288
+ newfs_lfs -B 131072 -b 4096 -f 512 ${CVND}${MPART}
+ @echo "*** Checking that newfs_lfs could be understood by fsck_lfs"
+ fsck_lfs -n ${CVND}${MPART}
+ mkdir ${TMPMP}
+ mount -t lfs ${BVND}${MPART} ${TMPMP}
+ dd if=/dev/zero of=${TMPMP}/zero bs=16384 count=100
+ umount ${TMPMP}
+ @echo "*** Checking that kernel write could be understood by fsck_lfs"
+ fsck_lfs -n ${CVND}${MPART}
+ vnconfig -u ${BVND}${RPART}
+
+clean:
+ -umount ${TMPMP}
+ vnconfig -u ${BVND}${RPART}
+
+.include <bsd.prog.mk>
diff -r 619f5a43dd93 -r cf7f21983e45 regress/sys/fs/lfs/newfs_fsck/disktab
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/regress/sys/fs/lfs/newfs_fsck/disktab Wed Jan 29 04:56:16 2003 +0000
@@ -0,0 +1,7 @@
+# $NetBSD: disktab,v 1.1 2003/01/29 04:56:17 perseant Exp $
+
+floppy288|2.88MB 3.5in Extra High Density Floppy:\
+ :ty=floppy:se#512:nt#2:rm#300:ns#36:nc#80:\
+ :pa#5760:oa#0:ba#4096:fa#512:ta=4.4LFS:\
+ :pb#5760:ob#0:\
+ :pc#5760:oc#0:
Home |
Main Index |
Thread Index |
Old Index