Skip to content

fix: preserve shared rootfs during serial test cleanup - #993

Open
StefanPrintezis wants to merge 1 commit into
apple:mainfrom
StefanPrintezis:feature/fix-integration-rootfs-cleanup
Open

StefanPrintezis wants to merge 1 commit into
apple:mainfrom
StefanPrintezis:feature/fix-integration-rootfs-cleanup

Conversation

@StefanPrintezis

Copy link
Copy Markdown

While writing integration tests for my other PR I noticed i could not run the integration tests serially:

$ ./bin/containerization-integration --filter 'cgroup' --max-concurrency 1
info com.apple.containerization: [containerization_integration] test container cgroup limits started...
error com.apple.containerization: [containerization_integration] ❌ test container cgroup limits failed: Error Domain=NSCocoaErrorDomain Code=260 "The file ... couldn’t be opened because there is no such file."

Summary

There seems to be an issue when bootstrapping/cleaning up the shared rootfs. Cleanup compares the shared rootfs path with directory entries, but macOS can return /var/... and /private/var/... for the other. These point to the same file. The comparison treats it as an old test file, deletes it, and the next copy operation fails.

This cleanup only runs with one worker (--max-concurrency 1). The default four-worker run skips it because other tests may still need those files, so the default integration command does not expose the bug.

Fix

Compare filenames instead, since every entry comes from the same temporary directory.

This branch has not been deployed

No deployments
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