xref: /openbsd/regress/lib/libc/mkstemp/Makefile (revision cca36db2)
1#	$OpenBSD: Makefile,v 1.1 2010/02/11 07:35:38 guenther Exp $
2
3PROG=mkstemp_test
4CLEANFILES+= ; rm -rf output
5
6O = output
7
8# The ktrace/kdump/perl combo verifies that all open() calls that
9# were passed O_CREAT were also passed O_EXCL
10run-regress-${PROG}: ${PROG}
11	mkdir -p $O && cd $O && ktrace ../${PROG}
12	cd $O && kdump | perl -mFcntl -nl \
13		-e '/ open\([^,]*,([^,]+)/	or next;'	\
14		-e '$$f = oct($$1);'				\
15		-e 'if ($$f & O_CREAT && !($$f & O_EXCL)) {'	\
16		-e '	print "FAIL"; exit 1'			\
17		-e '}'
18
19.include <bsd.regress.mk>
20