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