Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…STING is on libkernel includes every `tests/cmake/*.cmake` fragment at the top level of its `CMakeLists.txt`, outside `if(BUILD_TESTING)`, so each fragment has to gate itself. On `main` `520d66172a`, 2 of the 26 libkernel fragments have no `BUILD_TESTING` in them, so a `-DBUILD_TESTING=OFF` configure still defines their test executables, and a fragment that used something defined only with tests on would break that configure. This moves libkernel's `file(GLOB ...)`/`include` loop inside `if(BUILD_TESTING)`, so the fragments are read only when tests are on. A fragment that already gates itself is unchanged; its own `if(BUILD_TESTING)` just nests. This is the libkernel part of boykopovar#20899, split out so that the Windows job selects only libkernel's tests (with three libraries in one pull request it was cancelled at its 90 minute limit on 11-24 and 11-26). It is stacked on boykopovar#26695, which moves the `guest_kernel_sockname_truncation_bounds` block into the test section next to this loop; until boykopovar#26695 merges, this branch also shows that commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Change: Bug fix Merge Risk:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
libkernel includes every
tests/cmake/*.cmakefragment at the top level of itsCMakeLists.txt, outsideif(BUILD_TESTING), so each fragment has to gate itself. Onmain520d66172a, 2 of the 26 libkernel fragments have noBUILD_TESTINGin them, so a-DBUILD_TESTING=OFFconfigure still defines their test executables, and a fragment that used something defined only with tests on would break that configure.This moves libkernel's
file(GLOB ...)/includeloop insideif(BUILD_TESTING), so the fragments are read only when tests are on. A fragment that already gates itself is unchanged; its ownif(BUILD_TESTING)just nests.This is the libkernel part of boykopovar#20899, split out after the Windows job of the combined pull request was cancelled at its 90 minute limit on 11-24 and 11-26. Correction (11-27): I split these changes so that each Windows job would select only one library's tests, but that premise was wrong.
tools/build_changed_guest_tests.pytreats a change to anyCMakeLists.txtundercore/libs/as a broad change and selects every guest test, so each of boykopovar#20899, boykopovar#27716 and boykopovar#27717 still selects the full set (3,619 targets on boykopovar#27716). Whether the Windows job fits its 90 minutes may depend on the runner (I have three runs): on 11-27 it passed in 86 minutes on boykopovar#20899 and was cancelled at 90 minutes on boykopovar#27716, and on 11-28 it was cancelled at 90 minutes on boykopovar#27717 (headaaca612fae). This branch's commit message repeats the same wrong premise ("selects only libkernel's tests"); this correction applies to it too. It was stacked on boykopovar#26695, which moved theguest_kernel_sockname_truncation_boundsblock into the test section next to this loop; boykopovar#26695 merged on 11-27, and the branch now hasmainmerged in, so its diff is only this change.Tested
11-27, head
aaca612fae(main65cf7ea917merged in after boykopovar#26695 merged, so the diff is now only theif(BUILD_TESTING)wrap): with-DBUILD_TESTING=ON,ctest -Nlists the same 7,192 tests onmainand on this head; withOFFthe defaultalltarget builds 28*_testsexecutables against 30 onmain, the 2 dropped beingguest_exec_variadic_testsandguest_mkfifo_testsfrom the ungated fragments. (These are this check's measured counts; they differ from the earlier 26 against 30 below becausemainhas changed since520d66172a, including boykopovar#26695.)Earlier, configure-only checks on
main520d66172a(Linux, GCC 15.2, Ninja, Release,-DANYPS5_ENABLE_SPIRV_TOOLS=OFF), at this branch's head (boykopovar#26695 plus this change):-DBUILD_TESTING=ON:ctest -Nlists the same 7,094 tests onmainand on this branch, and the sorted test-name lists are identical.-DBUILD_TESTING=OFF: configures on both.ninja -t targets alllists 2,934*_testsexecutables here against 2,946 onmain, and the defaultalltarget (ninja -t inputs all) builds 26 of them here against 30 onmain. Of the 4 dropped fromall,guest_exec_variadic_testsandguest_mkfifo_testscome from the 2 ungated fragments, andguest_kernel_socket_type_error_readonly_bounds_testsandguest_kernel_sockname_truncation_bounds_testsfrom fix(libkernel): keep the sockname truncation bounds test inside BUILD_TESTING boykopovar/AnyPS5#26695's move.tools/check_conventions.pypasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Summary by CodeRabbit