Page MenuHomeFreeBSD

bsd.test.mk: Attempt to work around installation race
Needs ReviewPublic

Authored by arichardson on Apr 19 2022, 9:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 11, 8:12 PM
Unknown Object (File)
Wed, Dec 11, 8:05 PM
Unknown Object (File)
Nov 28 2024, 10:17 AM
Unknown Object (File)
Nov 22 2024, 12:06 PM
Unknown Object (File)
Nov 18 2024, 12:02 PM
Unknown Object (File)
Oct 6 2024, 10:53 PM
Unknown Object (File)
Oct 3 2024, 6:46 PM
Unknown Object (File)
Sep 26 2024, 1:02 AM
Subscribers

Details

Summary

When building with -j128 I have seen multiple installation failures
when install binaries for tests. In cases where Makefiles set
BINDIR=${TESTSDIR}, it is not guaranteed that BINDIR exists when trying to
install the test binaries. This failure happens quite rarely (I guess the
mkdir usually completes before the test has been built and installed), but
I've seen it multiple times now.

Add a .ORDER directive to ensure that the bsd.dirs.mk installdirs target
runs before _proginstall from bsd.prog.mk.

Test Plan

I haven't seen the build failure since, but there might be a better solution.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 45241
Build 42129: arc lint + arc unit

Event Timeline

share/mk/bsd.test.mk
101

this does not look like the right place for this.

bsd.prog.mk already has .ORDER beforeinstall _proginstall
perhaps bsd.dirs.mk should have beforeinstall: installdirs ?

failing that I think .ORDER installdirs _proginstall probably belongs better in bsd.prog.mk