Skip to content

Follow up to PR #41512 - #41642

Open
Feng Wang (chemwolf6922) wants to merge 1 commit into
masterfrom
user/chemwolf6922/follow-up-to-41512
Open

Feng Wang (chemwolf6922) wants to merge 1 commit into
masterfrom
user/chemwolf6922/follow-up-to-41512

Conversation

@chemwolf6922

Copy link
Copy Markdown
Contributor

Summary of the Pull Request

This is a follow up to PR #41512

  1. Remove the redundant restore cgroup namespace code.
  2. Simplify the cgroup check logic by moving the retry inside the debug shell.
  3. Add a new systemd boot timeout test.

PR Checklist

  • Closes: Link to issue #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated if needed and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated if needed
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

Add / modified tests:
UnitTests::UnitTests::SystemdBootTimeout
UnitTests::UnitTests::IsolatedCgroupLayout
UnitTests::UnitTests::IsolatedCgroupLayoutSystemd
UnitTests::UnitTests::IsolatedCgroupLayoutOverridesV1

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The reviewed changes contain an unresolved build failure and a test cleanup failure risk.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

This follow-up simplifies cgroup cleanup handling and adds systemd boot-timeout regression coverage.

Changes:

  • Moves cgroup cleanup retry logic into the debug shell.
  • Removes redundant cgroup namespace restoration.
  • Adds SystemdBootTimeout coverage.
File summaries
File Summary
test/windows/UnitTests.cpp Adds timeout coverage and updates cgroup cleanup validation; keep-alive reset may fail after VM shutdown (moderate, 1 vote).
src/linux/init/init.cpp Removes namespace restoration but leaves an unused variable, causing a -Wall -Werror build failure (critical, 1 vote).
Review details

Suppressed comments (1)

test/windows/UnitTests.cpp:8172

  • The guest script powers off the VM while keepAlive2 is still active, but the next line calls WslKeepAlive::Reset(). That method unconditionally writes to the keep-alive process's stdin and throws on a broken pipe (test/windows/Common.cpp:1217-1224), so once the forced shutdown terminates that wsl.exe process this test can fail during cleanup. Avoid resetting a keep-alive after tearing down its VM, or make the cleanup tolerate an already-terminated process.
        keepAlive2.Reset();
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/linux/init/init.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants