Repository navigation
xls/tests: Move Testbench worker runner into testbench.cc. - #5532
Draft
copybara-service[bot] wants to merge 1 commit into
Draft
copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
copybara-service
Bot
force-pushed
the
test_1028291879
branch
from
November 23, 2026 19:00
2730b35 to
80ab61b
Compare
copybara-service
Bot
force-pushed
the
test_1028291879
branch
from
November 23, 2026 19:36
80ab61b to
c33849b
Compare
copybara-service
Bot
force-pushed
the
test_1028291879
branch
from
November 23, 2026 20:18
c33849b to
8536671
Compare
Moves `Testbench`'s non-templated worker lifecycle, range partitioning, progress logging, and synchronization out of `testbench.h` into `testbench.cc` and deletes `testbench_thread.h` (dropping its unused `xls/ir` dependency). Replaces the `TestbenchThread` busy-spin loop and `absl::CondVar` wakeup handshake with `absl::BlockingCounter` + `absl::Notification` over `xls::Thread`, fixing two races in the old state machine (`running_` started `false` so an unstarted worker could look finished, and cleared before storing `status_`) and keeping `mutex_` held only while checking/updating `started_` and `num_threads_`. PiperOrigin-RevId: 1028291879
copybara-service
Bot
force-pushed
the
test_1028291879
branch
from
November 23, 2026 20:26
8536671 to
62d6e8a
Compare
This branch has not been deployed
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.
xls/tests: Move Testbench worker runner into testbench.cc.
Moves
Testbench's non-templated worker lifecycle, range partitioning,progress logging, and synchronization out of
testbench.hintotestbench.ccand deletes
testbench_thread.h(dropping its unusedxls/irdependency).Replaces the
TestbenchThreadbusy-spin loop andabsl::CondVarwakeuphandshake with
absl::BlockingCounter+absl::Notificationoverxls::Thread, fixing two races in the old state machine (running_startedfalseso an unstarted worker could look finished, and cleared before storingstatus_) and keepingmutex_held only while checking/updatingstarted_and
num_threads_.