Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7c08072bc9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
test/lib/tpunit++.cpp
Outdated
| lock_guard<recursive_mutex> lock(_shortOutputMutex); | ||
| if (_shortOutputColumn >= 80) { |
There was a problem hiding this comment.
Serialize short pass output with test failure logging
In tpunit_detail_do_tests, the short-output pass path now locks _shortOutputMutex instead of the shared fixture mutex m, while assertion/exception/failure diagnostics still print under m; in parallel runs (-threads > 1 or parallel fixtures), this allows green check writes to race with failure-detail writes and can interleave pass markers into failure context, making debugging output unreliable compared to the previous single-lock behavior. Consider using a lock ordering that still serializes all stdout writes for status/error lines.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1bf0b5324d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
test/lib/tpunit++.cpp
Outdated
| namespace tpunit { | ||
| void tpunit_break_check_line() { | ||
| if (!_TestFixture::_verboseOutput) { | ||
| lock_guard<recursive_mutex> lock(*(currentTestPtr->_mutex)); |
There was a problem hiding this comment.
Guard tpunit_break_check_line against unset currentTestPtr
tpunit_break_check_line now dereferences currentTestPtr whenever short-output mode is active, but tpunit_detail_do_run executes -before/-after fixtures on the main thread without assigning currentTestPtr; if a BEFORE_CLASS/AFTER_CLASS method throws, the new exception-path calls to tpunit_break_check_line() will hit this null pointer and crash the test process instead of recording the exception as a normal failure.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
@tylerkaraszewski this seems worth taking a look.
| // Dump the test buffer if the test included any log lines. | ||
| f->printTestBuffer(); | ||
| printf("\xE2\x9D\x8C !FAILED! \xE2\x9D\x8C %s %s\n\n", t->_name, time); | ||
| } |
There was a problem hiding this comment.
can we print all failures at the end instead? The current output is a little hard to read, where we have a bunch of passed checks then a random failure in the middle of the check marks
Details
Fixed Issues
Fixes GH_LINK
Tests
Internal Testing Reminder: when changing bedrock, please compile auth against your new changes