Skip to content

fix(tests): drop backup privileges for denied parent watch - #6629

Closed
srgtcauliflour wants to merge 1 commit into
boykopovar:mainfrom
srgtcauliflour:fix/kqueue-denied-parent-watch-privileges
Closed

srgtcauliflour wants to merge 1 commit into
boykopovar:mainfrom
srgtcauliflour:fix/kqueue-denied-parent-watch-privileges

Conversation

@srgtcauliflour

@srgtcauliflour srgtcauliflour commented Oct 15, 2026 •

Copy link
Copy Markdown

What

Fixes #6597.

Fixes the Windows guest_kqueue DeniedParentWatch test failing when run with elevated privileges.

Windows backup and restore privileges can bypass the restrictive directory permissions used by the test. The fix removes these privileges before the permission check.

Only Windows-specific test code is changed. Production emulator behaviour is unaffected.

Full credit to @frankea for diagnosing the issue, developing the original patch and performing initial validation in #6597. This PR carries their proposed fix forward.

Tested

Independent validation is still required before merging.

  • Confirmed the fix was committed and verified the privilege-removal call in the committed source.
  • @frankea reported 3/3 successful elevated Windows 11 test runs with the original patch.
  • @frankea reported a successful conventions check on their original branch.

Not independently tested for this PR:

  • Windows compilation and runtime tests.
  • Non-elevated Windows execution.
  • Linux regression tests.
  • Full project build and test suite.
  • Conventions checker on this PR branch.

The original contributor's results do not constitute independent validation of this submission.

Checklist

Validation remains pending. The PR author is responsible for the submitted changes.

@MarcZX10

Copy link
Copy Markdown
Contributor

Thanks for carrying the fix forward and crediting @frankea. I noticed this branch is currently DIRTY against main, and its diff adds all 622 lines of GuestKqueue.cpp; current main already has the 605-line file, and #6599 applies the same privilege change as a 17-line addition. The conventions check is also currently failing on this PR. Rebasing onto current main should make the intended delta and checks easier to review.

For coordination, #6599 is open with the same DropBackupPrivileges() change. It has a MinGW GCC 12 warning-clean compile; @harmsluis has since reported 3/3 non-elevated Windows runs on both main and #6599, while the elevated 3/3 result is the original report in #6597. I’m leaving both PRs open; once your branch is rebased, we can compare the final diffs and let the maintainers choose which submission to land.

@srgtcauliflour
srgtcauliflour force-pushed the fix/kqueue-denied-parent-watch-privileges branch from 8ce44e0 to ede3ac3 Compare October 15, 2026 23:56
@MarcZX10

Copy link
Copy Markdown
Contributor

This change is identical to the privilege helper already in my open PR #6599 (same GuestKqueue.cpp diff). #6599 has since received independent Windows 11 non-elevated validation (3/3 passes), and I fixed its Windows test PATH setup. Please coordinate with #6599/maintainers on which PR should carry the fix so the duplicate does not need separate review; I am not asking for priority. The elevated 3/3 report remains in issue #6597.

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 6044 core/libs/tests/GuestKqueue.cpp
PR 6510 core/libs/tests/GuestKqueue.cpp

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Closing in favour of #6599, which was opened first with the same patch for #6597. If something here is missing from it, say so on #6599.

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.

guest_kqueue: DeniedParentWatch aborts in an elevated process on Windows since #5493; drop the backup privileges in the test, diff included

3 participants