3 .if ${MACHINE_ARCH} == "amd64"
14 BINS+= ${_BINS:C/$/32/g}
23 CFLAGS+= -I${.CURDIR}/../../../sys
25 # We don't want to genreate CTF files. Force that here.
33 ${CC} -m32 -DBIT=\"32\" -o ${.TARGET} ${CFLAGS} ${.ALLSRC}
37 kldstat | grep filemon
44 @echo "filemon(4) tests passed."
46 # Cannot use .OBJDIR -- 'filemontest' expects 'test_script.sh' in .
47 test01: ${BINS:Mfilemontest*} ${BINS:Msizeof_long*} clean-test
48 .for BIN in ${BINS:Mfilemontest}
50 for A in 1 2 3 4 5 6 7 8 9 0; do \
51 for B in 1 2 3 4 5 6 7 8 9 0; do \
52 for C in 1 2 3 4 5 6 7 8 9 0; do \
53 test -x ${BIN} && ${.OBJDIR}/${BIN} ;\
57 @cd ${.CURDIR} ; set +e ; egrep '(Start|Stop) .*\.' filemon_log.* | \
58 grep -q -v '\.[0-9][0-9][0-9][0-9][0-9][0-9]$$' || printf "Time stamp format OK\n\n"
60 @cd ${.CURDIR} ; set +e ; for F in filemon_log.* ; do \
61 tail -1 $$F | grep -q '# Bye bye' || echo "$$F missing filemon bye-bye" ; \
62 NL=`wc -l $$F | awk '{print $$1}'` ; \
63 if [ "$${NL}" != 97 ]; then echo "$$F BAD, contains $${NL} lines" ; exit 1 ; fi ; done
65 test02: ${BINS:Mtimed-forkb*}
66 @echo "Without filemon(4) active:"
68 @echo "With filemon(4) active:"
69 script -f typescript-timed-forkb ./timed-forkb
70 ls -l typescript-timed-forkb.filemon
73 script -f typescript.${.TARGET} ./sizeof_long32 >/dev/null
74 @tail -1 typescript.test32.filemon | grep -q '# Bye bye' || (echo '32-bit comapt filemon Missing "bye-bye"' ; exit 1)
75 @egrep -q '^X [0-9]+ 0$$' typescript.test32.filemon || (echo "32-bit binary exit ERROR" ; exit 1)
76 @printf "filemon(4) 32bit FreeBSD support passed.\n\n"
78 CLEANFILES+= typescript-timed-forkb typescript-timed-forkb.filemon
81 cd ${.CURDIR} ; rm -f filemon_log*.*
83 clean-tests: clean-test
85 .include <bsd.prog.mk>