Patrick Welche <prlw1@cam.ac.uk>
[netbsd-mini2440.git] / regress / sys / fs / lfs / newfs_fsck / Makefile
blob0cd1f714eaba9abceb614fb6129d6bafcf375efe
1 # $NetBSD: Makefile,v 1.3 2003/02/03 07:45:05 perseant Exp $
3 NOMAN= # defined
5 TMPMP= /tmp/lfsregresstest_mount
6 TMPIM= /var/tmp/lfsregresstest.im
7 SRCDIR?= ${.CURDIR}
9 VND?= vnd0
10 MPART?= a
11 .if (${MACHINE_ARCH} == "i386")
12 RPART?= d
13 .else
14 RPART?= c
15 .endif
16 BVND= /dev/${VND}
17 CVND= /dev/r${VND}
19 CLEAN= clean
21 regress: test_mkfs_mount .WAIT test_smallfiles .WAIT test_rename_hardlink .WAIT ${CLEAN}
24 # Basic regression tests for LFS.
27 test_smallfiles:
28 @echo "*** Basic small files test"
29 ./smallfiles ${TMPMP}
30 ${MAKE} TMPMP=${TMPMP} VND=${VND} MPART=${MPART} fsck
32 # rename(a, b) where a is a hard-link to b.
33 test_rename_hardlink:
34 @echo "*** Hard link rename"
35 cd ${TMPMP} && : > foo && ln foo bar && mv foo bar
36 sync
37 rm -f bar
38 ${MAKE} TMPMP=${TMPMP} VND=${VND} MPART=${MPART} fsck
40 # Trivial newfs & fsck test
41 test_mkfs_mount:
42 VND=${VND} TMPMP=${TMPMP} TMPIM=${TMPIM} SRCDIR=${SRCDIR} MPART=${MPART} RPART=${RPART} ./mkfs_mount
45 # Utility targets.
47 fsck:
48 umount ${TMPMP}
49 fsck_lfs -f -n ${CVND}${MPART}
50 mount ${BVND}${MPART} ${TMPMP}
52 clean:
53 -umount ${TMPMP}
54 sleep 2
55 vnconfig -u ${BVND}${RPART}
56 rmdir ${TMPMP}
57 rm -f ${TMPIM}
59 .include <bsd.prog.mk>