Fix Docker timestamp fractional seconds, snprintf buffer bug, LxtLogError args, and misc code/script cleanup#40489
Closed
Copilot wants to merge 2 commits into
Closed
Fix Docker timestamp fractional seconds, snprintf buffer bug, LxtLogError args, and misc code/script cleanup#40489Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
Agent-Logs-Url: https://github.com/microsoft/WSL/sessions/ecbf759e-67f1-44a3-b447-1cdee661a8b3 Co-authored-by: benhillis <17727402+benhillis@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix Docker timestamp parsing for fractional seconds
Fix Docker timestamp fractional seconds, snprintf buffer bug, LxtLogError args, and misc code/script cleanup
May 10, 2026
Member
|
@copilot - I think this should be split into separate prs for each change. |
5 tasks
Contributor
Author
|
@benhillis I've opened a new pull request, #40492, to work on those changes. Once the pull request is ready, I'll request review from you. |
This was referenced May 11, 2026
Member
|
Closing in favor of the split-out, focused PRs:
|
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.
Multiple correctness bugs and code quality issues across WSLCContainer, WSLCSession, lxtfs tests, and tooling scripts.
Summary of the Pull Request
Fixes a timestamp parsing failure for Docker ISO 8601 timestamps with fractional seconds, a
snprintfbuffer size mismatch (potential overflow), missing format arguments inLxtLogError, and several code clarity/correctness issues in PowerShell scripts.PR Checklist
Detailed Description of the Pull Request / Additional comments
WSLCContainer.cppParseDockerTimestamp:%FT%H:%M:%S%Zfails on fractional seconds (e.g.2026-03-05T10:30:00.123456789Z). Now strips the fractional part before parsing, handlingZ,+, and-timezone offsets correctly.waitForStop: ExtractisKillSignalnamed bool for clarity; removes the opaque one-liner.WSLCSession.cppIndentLines: Replaced manual index+bounds loop with iterator +std::next().c_dockerdReadyLogLine: Moved from insideOnProcessLog(called on every log line) to file scope.c_logId: Moved fromstatic constexprinside a lambda toconstexpr autoat function scope; style now matches other file-scope constants.std::accumulate: Removed redundant explicit template args; init value changed tosize_t{0}(type-safe).test/linux/unit_tests/lxtfs.csnprintfbuffer bug:snprintf(ExpectedCombinedOptions, sizeof(ExpectedOptions), ...)used the wrong size — corrected tosizeof(ExpectedCombinedOptions).LxtLogErrorargs: Format string"%lld.%.9ld not greater than %lld.%.9ld"was passed struct pointers instead of the fourtv_sec/tv_nsecmembers — now passesTimestamp1->tv_sec,Timestamp1->tv_nsec,Timestamp2->tv_sec,Timestamp2->tv_nsecwith correct casts.tools/setup-dev-env.ps1Test-Pathguard on$configPathbefore callingwinget configure; surfaces a clear error instead of a cryptic winget failure when the config file is missing.$configPath(full path) instead of$configFile.tools/test/run-tests.ps1.\wsl.msixbut actual default is.\installer.msix.!$?→$LASTEXITCODE -ne 0; exit propagates$LASTEXITCODEinstead of hardcoded1.Validation Steps Performed
snprintfandLxtLogErrorfixes verified against their variable declarations in context.Original prompt