Add Makefile dependencies for scripts/zfs-tests.sh -c #16922
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This updates the Makefile to be more correct for parallel make.
Adding explicit dependencies forces make to build all outputs before running the script to populate
tests/zfs-tests/bin
.Really this target only needs to depend on targets used by
tests/zfs-tests/include/commands.cfg
, but waiting for primary automake targets is easier and more straightforward.Without this, parallel make might install symlinks before all outputs are built. This is problematic when also doing
sudo make install
afterward as that step repeats this step causing some files to end up owned by root. That ultimately confuses ZTS into adding non-root test users to the root group causing test breakage.Fixes #16030
Motivation and Context
Using
make -j32
causes flakiness when also doingsudo make install
before running ZTS.See the debugging quest at #16030 for the full story, but also the Makefile should be correct for parallel builds.
Description
Adds the automake targets
PROGRAMS
,DATA
, andSCRIPTS
toscripts-all-local
to force this step to run after all of the primary targets are built.How Has This Been Tested?
Ran
make -j32
aftermake distclean
and observed thatscripts/zfs-tests.sh -c
ran after primary targets as expected.Types of changes
This is a Makefile-only change.
Checklist:
Signed-off-by
.