Skip to content

Conversation

@svmhdvn
Copy link
Contributor

@svmhdvn svmhdvn commented Oct 22, 2025

When a -DWITH_XXX or -DWITHOUT_XXX option is changed between two make invocations,
Kyuafiles that are conditionally dependent on these options do not get regenerated.
This results in unusuable Kyuafiles that list testcases that are nonexistent in an
installed world.

Since it is relatively inexpensive to generate Kyuafiles, just generate them
unconditionally.

Tested by running two consecutive incremental builds, one -DWITH_ZFS_TESTS and
one -DWITHOUT_ZFS_TESTS. Verified that in the first case,
kyua list -k /usr/tests/Kyuafile shows the ZFS tests and in the second case,
those tests are not listed.

@markjdb
Copy link
Member

markjdb commented Oct 22, 2025

Does this fix the problem where alternating incremental builds with WITH_ZFS_TESTS= and WITHOUT_ZFS_TESTS= results in an unusable kyuafile because the second build doesn't regenerate the kyuafile?

When a -DWITH_XXX or -DWITHOUT_XXX option is changed between two make invocations,
Kyuafiles that are conditionally dependent on these options do not get regenerated.
This results in unusuable Kyuafiles that list testcases that are nonexistent in an
installed world.

Since it is relatively inexpensive to generate Kyuafiles, just generate them
unconditionally.

Tested by running two consecutive incremental builds, one -DWITH_ZFS_TESTS and
one -DWITHOUT_ZFS_TESTS. Verified that in the first case,
`kyua list -k /usr/tests/Kyuafile` shows the ZFS tests and in the second case,
those tests are not listed.

Signed-off-by: Siva Mahadevan <me@svmhdvn.name>
Sponsored by: The FreeBSD Foundation
@svmhdvn svmhdvn requested review from bapt and bsdimp as code owners October 22, 2025 19:40
@svmhdvn svmhdvn changed the title tests/zfs: add KYUAFILE=yes suite.tests.mk: always regenerate Kyuafile Oct 22, 2025
@svmhdvn
Copy link
Contributor Author

svmhdvn commented Oct 22, 2025

I think v2 shows a better fix for this issue. The previous commit was wrong. Does this seem reasonable?

I tested your observation and can confirm that it was a problem prior to my patch, and now it is fixed with my patch.

@markjdb
Copy link
Member

markjdb commented Oct 22, 2025

I think v2 shows a better fix for this issue. The previous commit was wrong. Does this seem reasonable?

I tested your observation and can confirm that it was a problem prior to my patch, and now it is fixed with my patch.

Hum, but now we will regenerate kyuafiles even if nothing changed, which isn't really desirable either.

https://reviews.freebsd.org/D52011 might be a better solution in the absence of meta mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants