1 # $NetBSD: Makefile,v 1.3 2006/04/27 22:37:54 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 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?= 20 21 PLEX?= 2 22 23 regress: test_ckckp 24 25 .ifndef REGRESS_LOG 26 REGRESS_LOG=/dev/null 27 .endif 28 29 test_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 47 abort: go 48 -kill -9 `ps auxww | grep ckckp | grep -v grep | awk '{print $$2}'` 49 ./go ${TMPMP} 50 umount ${TMPMP} 51 52 clean: 53 rm -f ckckp cleanalot_async go *~ *.core ${GFILE} ${WFILE} 54 55 .include <bsd.prog.mk> 56