git: bd794b9b77ec - stable/14 - Remove CDDL and ctfconvert tests when their controlling knobs are disabled
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 23 Nov 2026 02:08:02 UTC
The branch stable/14 has been updated by ngie:
URL: https://cgit.FreeBSD.org/src/commit/?id=bd794b9b77ece3314b3f1ad7a879fca5c09ccf17
commit bd794b9b77ece3314b3f1ad7a879fca5c09ccf17
Author: Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-09-22 02:46:52 +0000
Commit: Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-11-23 02:06:47 +0000
Remove CDDL and ctfconvert tests when their controlling knobs are disabled
In the event someone specified MK_CDDL == no prior to this change, all
tests under `/usr/tests/cddl` would stick around after the change,
resulting in errors. Similarly, MK_DTRACE == no removed ctfconvert,
which the ctfconvert tests relied on (but remained around after the knob
was disabled).
Remove the tests under the respective blocks now so they don't linger
around on systems where these knobs are disabled, resulting in false
positives when running the complete test suite.
The ctfconvert tests weren't specifically put under
`${MK_DTRACE_TESTS}` == no because ctfconvert was bundled separately
from the upstream provided Dtrace test suite.
MFC after: 2 weeks
MFC with: 30c20ca26 ("Remove Dtrace/ZFS tests if their knobs are disabled")
(cherry picked from commit df6131e2b74d9f334c16387e9a46cafd6e27eb78)
---
tools/build/mk/OptionalObsoleteFiles.inc | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
index a4ccaadf7037..6aaa5dbe1bcb 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -1425,6 +1425,18 @@ OLD_FILES+=usr/share/man/man1/llvm-pdbutil.1.gz
OLD_FILES+=usr/share/man/man1/opt.1.gz
.endif
+.if ${MK_CDDL} == no
+CDDL_TEST_DIRS= cddl
+. for d in ${CDDL_TEST_DIRS}
+. if exists(${DESTDIR}${TESTSBASE}/${d}/)
+TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_DIRS+=${TESTS_DIRS}
+TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_FILES+=${TESTS_FILES}
+. endif
+. endfor
+.endif
+
.if ${MK_CLANG_EXTRAS} == no && ${MK_CLANG_FORMAT} == no
OLD_FILES+=usr/bin/clang-format
.endif
@@ -1713,6 +1725,16 @@ OLD_DIRS+=usr/lib${libcompat}/dtrace
OLD_DIRS+=usr/libexec/dwatch
OLD_DIRS+=usr/share/dtrace/toolkit
OLD_DIRS+=usr/share/dtrace
+
+CTFCONVERT_TEST_DIRS= cddl/usr.bin/ctfconvert
+. for d in ${CTFCONVERT_TEST_DIRS}
+. if exists(${DESTDIR}${TESTSBASE}/${d}/)
+TESTS_DIRS!=find ${DESTDIR}${TESTSBASE}/${d}/ -type d | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_DIRS+=${TESTS_DIRS}
+TESTS_FILES!=find ${DESTDIR}${TESTSBASE}/${d}/ -type f | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_FILES+=${TESTS_FILES}
+. endif
+. endfor
.endif
.if ${MK_DTRACE_TESTS} == no