Page MenuHomeFreeBSD

mk: Move vm stack test debug symbols
ClosedPublic

Authored by jlduran on Sat, Feb 1, 4:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Feb 7, 4:21 AM
Unknown Object (File)
Tue, Feb 4, 2:48 PM
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 62239
Build 59123: 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 ↗(On Diff #150448)

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.Tue, Feb 4, 2:41 PM