3 .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "ia64"
14 BINS+= ${_BINS:C/$/32/g}
23 CFLAGS+= -I${.CURDIR}/../../../sys
25 # Should be "WITHOUT_CTF=" below, but stupid infastrurture fails:
26 # "/usr/share/mk/bsd.own.mk", line 489: WITH_CTF and WITHOUT_CTF can't both be set.
34 ${CC} -m32 -DBIT=\"32\" -o ${.TARGET} ${CFLAGS} ${.ALLSRC}
38 kldstat | grep filemon
45 @echo "filemon(4) tests passed."
47 # Cannot use .OBJDIR -- 'filemontest' expects 'test_script.sh' in .
48 test01: ${BINS:Mfilemontest*} ${BINS:Msizeof_long*} clean-test
49 .for BIN in ${BINS:Mfilemontest}
51 for A in 1 2 3 4 5 6 7 8 9 0; do \
52 for B in 1 2 3 4 5 6 7 8 9 0; do \
53 for C in 1 2 3 4 5 6 7 8 9 0; do \
54 test -x ${BIN} && ${.OBJDIR}/${BIN} ;\
58 @cd ${.CURDIR} ; set +e ; egrep '(Start|Stop) .*\.' filemon_log.* | \
59 grep -q -v '\.[0-9][0-9][0-9][0-9][0-9][0-9]$$' || printf "Time stamp format OK\n\n"
61 @cd ${.CURDIR} ; set +e ; for F in filemon_log.* ; do \
62 tail -1 $$F | grep -q '# Bye bye' || echo "$$F missing filemon bye-bye" ; \
63 NL=`wc -l $$F | awk '{print $$1}'` ; \
64 if [ "$${NL}" != 97 ]; then echo "$$F BAD, contains $${NL} lines" ; exit 1 ; fi ; done
66 test02: ${BINS:Mtimed-forkb*}
67 @echo "Without filemon(4) active:"
69 @echo "With filemon(4) active:"
70 script -f typescript-timed-forkb ./timed-forkb
71 ls -l typescript-timed-forkb.filemon
74 script -f typescript.${.TARGET} ./sizeof_long32 >/dev/null
75 @tail -1 typescript.test32.filemon | grep -q '# Bye bye' || (echo '32-bit comapt filemon Missing "bye-bye"' ; exit 1)
76 @egrep -q '^X [0-9]+ 0$$' typescript.test32.filemon || (echo "32-bit binary exit ERROR" ; exit 1)
77 @printf "filemon(4) 32bit FreeBSD support passed.\n\n"
79 CLEANFILES+= typescript-timed-forkb typescript-timed-forkb.filemon
82 cd ${.CURDIR} ; rm -f filemon_log*.*
84 clean-tests: clean-test
86 .include <bsd.prog.mk>