Skip to content

Parallel tests#2190

Draft
Johan-Liebert1 wants to merge 4 commits intobootc-dev:mainfrom
Johan-Liebert1:parallel-tests
Draft

Parallel tests#2190
Johan-Liebert1 wants to merge 4 commits intobootc-dev:mainfrom
Johan-Liebert1:parallel-tests

Conversation

@Johan-Liebert1
Copy link
Copy Markdown
Collaborator

No description provided.

@Johan-Liebert1 Johan-Liebert1 added the ci/merge Run full CI suite (all OSes) — equivalent to merge queue label May 8, 2026
@bootc-bot bootc-bot Bot requested a review from cgwalters May 8, 2026 08:36
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the tmt test runner to support parallel execution of test plans using std::thread. It introduces a RunPlanResult struct and extracts the core test logic into a run_plan function. The review feedback identifies several opportunities for improvement, including addressing interleaved console output from concurrent threads, optimizing the thread-joining logic to avoid waiting for entire batches, handling potential panics when querying system parallelism, and removing redundant clones of owned objects.

Comment thread crates/xtask/src/tmt.rs
}
}

fn run_plan(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Running tests in parallel will cause their console output (from println!, eprintln!, and xshell commands) to interleave, making the logs difficult to read. Consider capturing the output per thread and printing it only when the test completes, or using a structured logging approach.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah this is an issue, but the final pass vs fail output is logged sequentially

Comment thread crates/xtask/src/tmt.rs Outdated
Comment thread crates/xtask/src/tmt.rs Outdated
Comment thread crates/xtask/src/tmt.rs Outdated
Comment thread crates/xtask/src/tmt.rs
@Johan-Liebert1 Johan-Liebert1 marked this pull request as draft May 8, 2026 08:48
Copy link
Copy Markdown
Collaborator

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

Without any kind of deeper review, I think what we really want to do is upstream into https://github.com/teemtee/tmt support for bcvk.

I believe it already has support for concurrency (I mean I'd hope) and such - and that would make it a lot more sustainable for other projects to use tmt+bcvk (and we have many in the ecosystem that would make sense to do so)

Comment thread .github/workflows/ci.yml
- uses: actions/checkout@v6
- name: Bootc Ubuntu Setup
uses: bootc-dev/actions/bootc-ubuntu-setup@main
uses: Johan-Liebert1/bootc-actions/bootc-ubuntu-setup@main
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think we could add an option to the action which fetches bcvk's binary built from git main or so

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, that'd help

Comment thread crates/xtask/src/tmt.rs
Comment on lines +316 to +318
plan: String,
vm_name: String,
image: String,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

style nit prefer &str

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
@Johan-Liebert1
Copy link
Copy Markdown
Collaborator Author

One or two test failures, but not as good of a speedup as I'd had locally. GA seems to have 4cpu

@cgwalters
Copy link
Copy Markdown
Collaborator

Yes, we can bump to larger runners though. I was experimenting with that previously in bootc-dev/ci-sandbox#1 but it's been a while

@Johan-Liebert1 Johan-Liebert1 added ci/tier-1 Run CI for tier-1 OS (centos-10) only and removed ci/merge Run full CI suite (all OSes) — equivalent to merge queue labels May 9, 2026
Signed-off-by: Johan-Liebert1 <pragyanpoudyal41999@gmail.com>
Container for package was being rebuilt in "Unit and container
integration tests" of the CI as build args were different than an
already build container with the same target

Signed-off-by: Johan-Liebert1 <pragyanpoudyal41999@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/tier-1 Run CI for tier-1 OS (centos-10) only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants