Skip to content

Commit

Permalink
Add Makefile dependencies for scripts/zfs-tests.sh -c
Browse files Browse the repository at this point in the history
The explicit dependencies force make to build all outputs before
running the script to populate `tests/zfs-tests/bin`. Really this only
needs to depend on targets in `tests/zfs-tests/include/commands.cfg`
but waiting for all primary targets is more straightforward.

Without this, parallel make may install symlinks before all outputs
are built. This is problematic if also doing `sudo make install` as
some files end up owned by root. This confuses ZTS into adding
non-root test users to the root group causing tests to break.

Fixes openzfs#16030

Signed-off-by: Robert Evans <[email protected]>
  • Loading branch information
rrevans committed Jan 3, 2025
1 parent d35f9f2 commit efdb793
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ CLEANFILES += %D%/common.sh
-$(AM_V_at)echo "$$SCRIPTS_EXTRA_ENVIRONMENT" >>$@

ALL_LOCAL += scripts-all-local
scripts-all-local: %D%/common.sh
scripts-all-local: %D%/common.sh $(PROGRAMS) $(SCRIPTS) $(DATA)
-SCRIPT_COMMON=$< $(srcdir)/%D%/zfs-tests.sh -c

CLEAN_LOCAL += scripts-clean-local
Expand Down

0 comments on commit efdb793

Please sign in to comment.