sed -i 's/Release:[[:print:]]*/Release: $(RELEASE)/' \
$(distdir)/META
-checkstyle: cstyle shellcheck flake8 commitcheck mancheck
+checkstyle: cstyle shellcheck flake8 commitcheck mancheck testscheck
commitcheck:
@if git rev-parse --git-dir > /dev/null 2>&1; then \
- scripts/commitcheck.sh; \
+ ${top_srcdir}/scripts/commitcheck.sh; \
fi
cstyle:
@find ${top_srcdir} -name '*.[hc]' ! -name 'zfs_config.*' \
- ! -name '*.mod.c' -type f -exec scripts/cstyle.pl -cpP {} \+
+ ! -name '*.mod.c' -type f \
+ -exec ${top_srcdir}/scripts/cstyle.pl -cpP {} \+
shellcheck:
@if type shellcheck > /dev/null 2>&1; then \
shellcheck --exclude=SC1090 --format=gcc \
- $$(find scripts/*.sh -type f) \
- $$(find cmd/zed/zed.d/*.sh -type f) \
- $$(find cmd/zpool/zpool.d/* -executable); \
+ $$(find ${top_srcdir}/scripts/*.sh -type f) \
+ $$(find ${top_srcdir}/cmd/zed/zed.d/*.sh -type f) \
+ $$(find ${top_srcdir}/cmd/zpool/zpool.d/* -executable); \
fi
mancheck:
@if type mandoc > /dev/null 2>&1; then \
- for file in zfs zpool zdb zgenhostid; do \
- mandoc -Tlint -Werror ${top_srcdir}/man/man8/$$file.8; \
- done \
+ find ${top_srcdir}/man/man8 -type f -name 'zfs.8' \
+ -o -name 'zpool.8' -o -name 'zdb.8' \
+ -o -name 'zgenhostid.8' | \
+ xargs mandoc -Tlint -Werror; \
fi
+testscheck:
+ @find ${top_srcdir}/tests/zfs-tests/tests -type f \
+ \( -name '*.ksh' -not -executable \) -o \
+ \( -name '*.kshlib' -executable \) -o \
+ \( -name '*.cfg' -executable \) | \
+ xargs -r stat -c '%A %n' | \
+ awk '{c++; print} END {if(c>0) exit 1}'
+
lint: cppcheck paxcheck
cppcheck:
@if type cppcheck > /dev/null 2>&1; then \
- cppcheck --quiet --force --error-exitcode=2 \
+ cppcheck --quiet --force --error-exitcode=2 --inline-suppr \
--suppressions-list=.github/suppressions.txt \
- -UHAVE_SSE2 -UHAVE_AVX512F \
- ${top_srcdir}; \
+ -UHAVE_SSE2 -UHAVE_AVX512F -UHAVE_UIO_ZEROCOPY \
+ -UHAVE_DNLC ${top_srcdir}; \
fi
paxcheck:
@if type scanelf > /dev/null 2>&1; then \
- scripts/paxcheck.sh ${top_srcdir}; \
+ ${top_srcdir}/scripts/paxcheck.sh ${top_srcdir}; \
fi
flake8: