1 1.1 perseant # $NetBSD: Makefile,v 1.2 2006/04/22 00:10:55 perseant 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.1 perseant COUNT?= 20 21 1.1 perseant PLEX?= 2 22 1.1 perseant 23 1.1 perseant regress: test_ckckp 24 1.1 perseant 25 1.2 perseant .ifndef REGRESS_LOG 26 1.2 perseant REGRESS_LOG=/dev/null 27 1.2 perseant .endif 28 1.2 perseant 29 1.1 perseant test_ckckp: ckckp cleanalot_async run_ckckp 30 1.2 perseant .ifndef LFSDEV 31 1.2 perseant @echo "*** Checkpoint validity test skipped" 32 1.2 perseant @echo ${.CURDIR} SKIPPED "LFSDEV not defined" >> ${REGRESS_LOG} 33 1.2 perseant .else 34 1.1 perseant @echo "*** Checkpoint validity test" 35 1.1 perseant @echo "*** WARNING: will newfs_lfs ${LFSCDEV} in 10 seconds" 36 1.1 perseant @sleep 10 37 1.1 perseant newfs_lfs ${LFSCDEV} 38 1.1 perseant -mkdir ${TMPMP} 39 1.1 perseant mount ${LFSBDEV} ${TMPMP} 40 1.2 perseant ./run_ckckp ${TMPMP} ${LFSCDEV} ${GFILE} ${WFILE} ${PLEX} ${COUNT} || \ 41 1.2 perseant echo ${.CURDIR} FAILED | tee -a ${REGRESS_LOG} 42 1.1 perseant umount ${TMPMP} 43 1.1 perseant rmdir ${TMPMP} 44 1.2 perseant echo ${.CURDIR} PASSED | tee -a ${REGRESS_LOG} 45 1.2 perseant .endif 46 1.2 perseant 47 1.2 perseant abort: go 48 1.2 perseant -kill -9 `ps auxww | grep ckckp | grep -v grep | awk '{print $$2}'` 49 1.2 perseant ./go ${TMPMP} 50 1.2 perseant umount ${TMPMP} 51 1.1 perseant 52 1.1 perseant clean: 53 1.2 perseant rm -f ckckp cleanalot_async *~ *.core ${GFILE} ${WFILE} 54 1.1 perseant 55 1.1 perseant .include <bsd.prog.mk> 56