head	1.1;
access;
symbols
	netbsd-11-0-RC4:1.1
	netbsd-11-0-RC3:1.1
	netbsd-11-0-RC2:1.1
	netbsd-11-0-RC1:1.1
	perseant-exfatfs-base-20250801:1.1
	netbsd-11:1.1.0.4
	netbsd-11-base:1.1
	perseant-exfatfs-base-20240630:1.1
	perseant-exfatfs:1.1.0.2
	perseant-exfatfs-base:1.1;
locks; strict;
comment	@# @;


1.1
date	2023.08.19.22.56.44;	author christos;	state Exp;
branches;
next	;
commitid	XF4kfb6ZTGneZrBE;


desc
@@


1.1
log
@Tests for the compat_linux inotify framework from GSoC 2023 (Theodore Preduta)
@
text
@#	$NetBSD$

.include <bsd.own.mk>

TESTSDIR=	${TESTSBASE}/compat/linux
TESTS_SH=	t_inotify

TC_PROGS=	h_inotify_init
TC_PROGS+=	h_inotify_directory
TC_PROGS+=	h_inotify_single_file
TC_PROGS+=	h_inotify_watch_change

.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}

LDFLAGS+=	-nostartfiles -static
CFLAGS+=	-I${.CURDIR}/../../../sys
CFLAGS+=	-I${.CURDIR}
CFLAGS+=	-D_STANDALONE

FILESDIR=	${TESTSDIR}

.for _P in ${TESTS_SH}
.if ${MACHINE_ARCH} == "x86_64"
TESTS_SH_SRC_${_P}=	h_common.sh
.else
TESTS_SH_SRC_${_P}=	h_not_supported.sh
.endif
TESTS_SH_SRC_${_P}+=	${_P}.sh
.endfor

.for _P in ${TC_PROGS}
CLEANFILES+=		${_P}
FILES+=			${_P}

.if ${MACHINE_ARCH} == "x86_64"
PROGS+=			${_P}.out
SRCS.${_P}.out=		${_P}.c
SRCS.${_P}.out+=	h_linux.c
SRCS.${_P}.out+=	h_syscall.c
MAN.${_P}.out=		# empty
FILESMODE_${_P}=	${BINMODE}

proginstall-${_P}.out:
	# Do not install

${_P}: ${_P}.out
	${_MKTARGET_CREATE}
	cp ${.ALLSRC} ${.TARGET}
	${ELFEDIT} --output-osabi Linux ${.TARGET}
.else
${_P}:
	echo '' > ${.TARGET}
.endif

realall: ${_P}
.endfor

CLEANFILES+=	${TESTS_SH}
CLEANFILES+=	Atffile

.include <bsd.test.mk>
@
