Add more verbose output to bsdtar to help root cause 'ImportExportStdout' test failures by OneBlue · Pull Request #13555 · microsoft/WSL
Pull Request Overview
This PR enhances debugging capabilities for the ImportExportStdout test by adding more verbose output to bsdtar operations. The changes aim to help root cause test failures by providing more detailed logging when debug mode is enabled.
Key Changes
- Added debug logging to identify when the ImportExportStdout test case starts
- Increased bsdtar verbosity from
-vto-vvand added--totalsflag for more detailed output - Updated argument handling to properly support the additional bsdtar flags
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/windows/UnitTests.cpp | Added debug logging to mark the start of ImportExportStdout test case |
| src/windows/service/exe/LxssUserSession.cpp | Enhanced bsdtar verbosity with -vv --totals flags for debug mode |
| src/linux/init/main.cpp | Updated bsdtar argument construction to support enhanced verbosity and totals output |
Comments suppressed due to low confidence (1)
src/linux/init/main.cpp:1
- The
--totalsflag is being inserted at a fixed position (begin() + 3) which assumes the vector structure won't change. This is fragile and could break if the argument order changes. Consider using a more robust approach like inserting before the nullptr terminator or building the arguments conditionally.