Skip to content

Test Windows VM removal with setgid shared directory - #2

Open
AlexR1712 wants to merge 1 commit into
Chessing234:fold/windows-vm-marker-setgidfrom
AlexR1712:alex/windows-vm-removal-regression
Open

AlexR1712 wants to merge 1 commit into
Chessing234:fold/windows-vm-marker-setgidfrom
AlexR1712:alex/windows-vm-removal-regression

Conversation

@AlexR1712

Copy link
Copy Markdown

This adds a removal regression test to the branch behind omacom/omarchy#12264.

Dockurr's sharing service can set /shared to mode 2777. On current quattro, prepare_caller_mounts runs chmod 0700, which leaves the setgid bit in place. The subsequent exact-mode check sees 2700, so removal stops before deleting the VM disk.

The test sets the shared directory to 2777, runs prepare_caller_mounts, and calls __priv_remove. It checks that removal deletes the disk data, keeps the shared files, and leaves the shared directory at 700. The namespace test calls prepare_caller_mounts explicitly because the production removal path calls it through privileged assert_mounts_safe.

With this test added, windows-vm-compose-test.sh exits 1 on untouched quattro at prepare_caller_mounts and passes on the head of omacom#12264. windows-vm-launcher-test.sh, windows-vm-test.sh, and git diff --check pass too.

I also reproduced the error on Omarchy 4.0.4-1 after a successful omarchy-windows-vm install. The Windows ISO download was still retrying, so I applied the chmod 2777 /shared operation from Dockurr's running /run/samba.sh inside the container. omarchy-windows-vm remove then failed with the reported message and left the VM data intact. Clearing setgid let the same removal command succeed.

I ran ./test/all. The changed compose test passed, but the aggregate suite exited 1 with 14 failing test files. Several tests wrote directly to this host's quota-limited /tmp; others require local packages or services. The failures include the existing windows-vm-mount-boundary-test.sh.

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.

1 participant