1# $NetBSD: Makefile,v 1.2 2006/04/22 00:10:55 perseant Exp $ 2# 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. 8# 9# This test requires that Perl be installed to run. 10# 11 12NOMAN= # defined 13TMPMP= /tmp/lfsregresstest_mount 14SRCDIR?= ${.CURDIR} 15CLEAN= clean 16LFSBDEV="/dev/${LFSDEV}" 17LFSCDEV="/dev/r${LFSDEV}" 18GFILE?= "good_fs.img" # "Good" file - will be as large as the FS 19WFILE?= "work_fs.img" # Work file - will also be as large as the FS 20COUNT?= 20 21PLEX?= 2 22 23regress: test_ckckp 24 25.ifndef REGRESS_LOG 26REGRESS_LOG=/dev/null 27.endif 28 29test_ckckp: ckckp cleanalot_async run_ckckp 30.ifndef LFSDEV 31 @echo "*** Checkpoint validity test skipped" 32 @echo ${.CURDIR} SKIPPED "LFSDEV not defined" >> ${REGRESS_LOG} 33.else 34 @echo "*** Checkpoint validity test" 35 @echo "*** WARNING: will newfs_lfs ${LFSCDEV} in 10 seconds" 36 @sleep 10 37 newfs_lfs ${LFSCDEV} 38 -mkdir ${TMPMP} 39 mount ${LFSBDEV} ${TMPMP} 40 ./run_ckckp ${TMPMP} ${LFSCDEV} ${GFILE} ${WFILE} ${PLEX} ${COUNT} || \ 41 echo ${.CURDIR} FAILED | tee -a ${REGRESS_LOG} 42 umount ${TMPMP} 43 rmdir ${TMPMP} 44 echo ${.CURDIR} PASSED | tee -a ${REGRESS_LOG} 45.endif 46 47abort: go 48 -kill -9 `ps auxww | grep ckckp | grep -v grep | awk '{print $$2}'` 49 ./go ${TMPMP} 50 umount ${TMPMP} 51 52clean: 53 rm -f ckckp cleanalot_async *~ *.core ${GFILE} ${WFILE} 54 55.include <bsd.prog.mk> 56