Skip to content

Conversation

@dtikhonov
Copy link
Collaborator

No description provided.

Split long tests into subtests and use all available CPUs to run them.
@dtikhonov dtikhonov requested a review from Copilot November 27, 2025 13:12
Copilot finished reviewing on behalf of dtikhonov November 27, 2025 13:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR optimizes the h3_framing test suite by splitting it into multiple independent test subsets that can run in parallel, significantly reducing overall test execution time. The change enables CTest to automatically parallelize test execution based on available CPU cores.

  • Refactored the monolithic test_h3_framing into 9 independent test subsets that can run concurrently
  • Configured CTest to run tests in parallel by default using all available CPU cores
  • Added a -s command-line option to select specific test subsets

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
tests/test_h3_framing.c Refactored test structure to support subset execution via new -s flag, splitting pwritev combos and other tests into 9 independent subsets
tests/CMakeLists.txt Removed h3_framing from main test list and added 9 separate test targets (6 pwritev combos + 3 other test groups)
CMakeLists.txt Added parallel test execution configuration using ProcessorCount and CMAKE_CTEST_ARGUMENTS, plus a serial test target

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

main_test_pwritev (void)
{
/* Run all combos */
main_test_pwritev_combo(0, 6);
Copy link

Copilot AI Nov 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardcoded value 6 should be replaced with sizeof(combos) / sizeof(combos[0]) to avoid magic numbers and ensure consistency with the combos array definition. This would make the code more maintainable if the combos array size changes in the future.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback

dtikhonov and others added 2 commits November 27, 2025 08:33
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link

Copilot AI commented Nov 27, 2025

@dtikhonov I've opened a new pull request, #592, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits November 27, 2025 09:14
…ng.c (#592)

* Initial plan

* Replace hardcoded 6 with N_PWRITEV_COMBOS constant

Co-authored-by: dtikhonov <4528576+dtikhonov@users.noreply.github.com>

* Remove codeql artifact and add to gitignore

Co-authored-by: dtikhonov <4528576+dtikhonov@users.noreply.github.com>

* Simplify: move combos to file scope and use sizeof directly

Co-authored-by: dtikhonov <4528576+dtikhonov@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: dtikhonov <4528576+dtikhonov@users.noreply.github.com>
@dtikhonov dtikhonov merged commit 3ed4aa8 into master Nov 28, 2025
3 checks passed
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