-
-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nondeterministic macOS is_symlink
assertion failure in overwriting_files_and_lone_directories_works
#1373
Labels
acknowledged
an issue is accepted as shortcoming to be fixed
Comments
Byron
added a commit
that referenced
this issue
May 22, 2024
If we are dependent on symlinks, we should be sure that the probe actually detects symlinks.
Byron
added a commit
that referenced
this issue
May 22, 2024
This is achieved by making filenames unique so they won't clash.
Merged
23 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current behavior 😯
In
gix-worktree-state/tests/state/checkout.rs
, the testoverwriting_files_and_lone_directories_works
fails occasionally on the assertion:https://github.com/Byron/gitoxide/blob/3c2174101ed35dcb9bdb4585b3245507b15efe59/gix-worktree-state/tests/state/checkout.rs#L238
Usually it passes, but occasionally it fails. This happens both on CI and in manual runs. As far as I know, the failure only happens on macOS. Here's an example from CI in my fork:
I don't know why this happens, but maybe it is somehow related to concurrency? I say this based only on #1354 (comment), indicating that "the filesystem probe" for symlinks is "still not safe for concurrent operations."
Expected behavior 🤔
The test should pass in all runs, rather than just most.
Git behavior
I'm unsure if there is a corresponding Git behavior, because I am unsure if this is a test bug or a bug in the code under test. Above the line with the assertion, the test has this comment:
https://github.com/Byron/gitoxide/blob/3c2174101ed35dcb9bdb4585b3245507b15efe59/gix-worktree-state/tests/state/checkout.rs#L237
I'm not sure what aspect of Git behavior that's referring to, though. As far as I know, Git determines whether it will attempt to create symlinks on Windows by checking
core.symlinks
and, unlike on other systems, defaults it tofalse
if it is not set in any scope.Steps to reproduce 🕹
I don't know a good procedure. I've been running tests a fair amount and occasionally seeing the problem. Running the tests many times in succession would likely trigger it. Also running them many times in succession while only allowing one test to run at a time might shed some light on whether concurrency is involved, but this would of course be even more time-consuming.
The text was updated successfully, but these errors were encountered: