Page MenuHomeFreeBSD

mk: Move vm stack test debug symbols
ClosedPublic

Authored by jlduran on Feb 1 2025, 4:11 PM.
Tags
None
Referenced Files
F133616192: D48796.id.diff
Mon, Oct 27, 1:21 AM
Unknown Object (File)
Fri, Oct 24, 4:58 AM
Unknown Object (File)
Sep 25 2025, 12:39 PM
Unknown Object (File)
Sep 24 2025, 10:56 AM
Unknown Object (File)
Sep 18 2025, 12:12 AM
Unknown Object (File)
Sep 16 2025, 10:33 AM
Unknown Object (File)
Sep 11 2025, 6:23 AM
Unknown Object (File)
Sep 8 2025, 2:01 AM
Subscribers

Details

Summary

Avoid the creation of a /usr/tests/sys/vm/stack/.debug directory by
placing sys/vm/stack test debug symbols under /usr/lib/debug.

Test Plan

Let someone who actually understands our make system, fix this issue.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 62234
Build 59118: arc lint + arc unit

Event Timeline

bsd.prog.mk has:

# Use ${DEBUGDIR} for base system debug files, else .debug subdirectory
.if defined(BINDIR) && (\
    ${BINDIR} == "/bin" ||\
    ${BINDIR:C%/libexec(/.*)?%/libexec%} == "/libexec" ||\
    ${BINDIR} == "/sbin" ||\
    ${BINDIR:C%/usr/(bin|bsdinstall|libexec|lpr|sendmail|sm.bin|sbin|tests)(/.*)?%/usr/bin%} == "/usr/bin" ||\
    ${BINDIR} == "/usr/lib" \
     )
DEBUGFILEDIR=   ${DEBUGDIR}${BINDIR}
.else
DEBUGFILEDIR?=  ${BINDIR}/.debug
.endif

presumably the affected test here is the first case that installs a test .so other than under /usr/tests/lib/....

If we assume any .so under /usr/tests is a base system component I'd suggest just removing (tests/)? from the existing expression and adding ${SHLIBDIR:C%/usr/tests(/.*)?%/usr/tests%} == "/usr/tests"

bsd.prog.mk has:

# Use ${DEBUGDIR} for base system debug files, else .debug subdirectory
.if defined(BINDIR) && (\
    ${BINDIR} == "/bin" ||\
    ${BINDIR:C%/libexec(/.*)?%/libexec%} == "/libexec" ||\
    ${BINDIR} == "/sbin" ||\
    ${BINDIR:C%/usr/(bin|bsdinstall|libexec|lpr|sendmail|sm.bin|sbin|tests)(/.*)?%/usr/bin%} == "/usr/bin" ||\
    ${BINDIR} == "/usr/lib" \
     )
DEBUGFILEDIR=   ${DEBUGDIR}${BINDIR}
.else
DEBUGFILEDIR?=  ${BINDIR}/.debug
.endif

presumably the affected test here is the first case that installs a test .so other than under /usr/tests/lib/....

Yes, so far it is the only one. libsoxstack.so required by tests/sys/vm/stack/stack_dlopen_exec_test.c

If we assume any .so under /usr/tests is a base system component I'd suggest just removing (tests/)? from the existing expression and adding ${SHLIBDIR:C%/usr/tests(/.*)?%/usr/tests%} == "/usr/tests"

That works as well... Will do. Thank you!

etc/mtree/BSD.debug.dist
60–65

Is this required? None of the other tests paths are explicitly specified, but are created as expected, afaict?

jlduran marked an inline comment as done.

Remove wrong mtree entries:

  • Test entries are populated from BSD.tests.dist
This revision is now accepted and ready to land.Feb 4 2025, 2:41 PM