Sync usage with man page.
[netbsd-mini2440.git] / regress / sys / fs / lfs / ckckp / Makefile
blobbbce6f9c306da464373a969ca4db8ac280597628
1 # $NetBSD: Makefile,v 1.6 2006/07/21 00:29:23 perseant Exp $
3 # Note: this test must be run with LFSDEV defined, e.g. "LFSDEV=wd0g".
4 # It will destroy the existing contents of $LFSDEV to perform the test.
5 # The test also requires the availability of two files each the size
6 # of ${LFSDEV} to store temporary filesystem images in, during the course
7 # of the run.
9 # This test requires that Perl be installed to run.
12 NOMAN= # defined
13 TMPMP= /tmp/lfsregresstest_mount
14 SRCDIR?= ${.CURDIR}
15 CLEAN= clean
16 LFSBDEV="/dev/${LFSDEV}"
17 LFSCDEV="/dev/r${LFSDEV}"
18 GFILE?= "good_fs.img" # "Good" file - will be as large as the FS
19 WFILE?= "work_fs.img" # Work file - will also be as large as the FS
20 COUNT?= 5
21 PLEX?= 2
22 FSIZE?= 16384
24 regress: test_ckckp
26 .ifndef REGRESS_LOG
27 REGRESS_LOG=/dev/null
28 .endif
30 test_ckckp: ckckp cleanalot_async run_ckckp
31 .ifndef LFSDEV
32 @echo "*** Checkpoint validity test skipped"
33 @echo ${.CURDIR} SKIPPED "LFSDEV not defined" >> ${REGRESS_LOG}
34 .else
35 @echo "*** Checkpoint validity test"
36 @echo "*** WARNING: will newfs_lfs ${LFSCDEV} in 10 seconds"
37 @sleep 10
38 newfs_lfs ${LFSCDEV}
39 -mkdir ${TMPMP}
40 mount -o-n ${LFSBDEV} ${TMPMP}
41 /libexec/lfs_cleanerd -b -n4 -t5 ${TMPMP}
42 ./run_ckckp ${TMPMP} ${LFSCDEV} ${GFILE} ${WFILE} ${PLEX} ${COUNT} ${FSIZE} || \
43 echo ${.CURDIR} FAILED | tee -a ${REGRESS_LOG}
44 umount ${TMPMP}
45 rmdir ${TMPMP}
46 echo ${.CURDIR} PASSED | tee -a ${REGRESS_LOG}
47 .endif
49 abort:
50 -kill -9 `ps auxww | grep ckckp | grep -v grep | awk '{print $$2}'`
51 umount ${TMPMP}
53 clean:
54 rm -f *.o ckckp cleanalot_async *~ *.core check-all.log ${GFILE} ${WFILE}
56 .include <bsd.prog.mk>