mtest: avoid GTest XML filename collisions across suites#15875
mtest: avoid GTest XML filename collisions across suites#15875ChandruRavi3708 wants to merge 1 commit into
Conversation
|
Hi! I’ve submitted a fix for Issue #15757 (GTest XML filename collisions across suites). The change updates the XML filename generation to avoid collisions when tests with the same name exist in different suites. I’ve verified the reproduction case from the issue and the generated filenames are now unique across suites. Could you please take a look when you have a chance? Any feedback or suggestions for improvement would be greatly appreciated. Thank you! |
|
Most of the changes in the commit are reformatting of the code. Please do not include those in the submitted patch. |
|
Thanks for the review. I'll clean up the patch and remove the unrelated formatting changes so that the PR contains only the fix for the GTest XML filename collision issue. |
|
Also the PR description is very complicated in a confusing way -- did you use an LLM to write it? None of the details are included in the commit message, which could be a sign that you didn't think any of those details are actually useful to read, or could be a problematic omission. Which one is it? :P |
Summary
Fix gtest log filename collisions when multiple tests share the same name across different suites.
Previously, gtest XML log filenames were generated using only the test name. When the same test name appeared in multiple suites, different test instances could write to the same output file, causing file overwrites and race conditions during parallel execution.
This change makes the generated log filenames unique by incorporating the suite name in addition to the test name.
Problem
Given tests such as:
both tests could generate the same XML filename, resulting in:
Solution
Include the suite name when generating gtest log filenames so that each test instance receives a unique output file.
Testing
Fixes #15757