Open jieyouxu opened 3 weeks ago
Doesn't one need admin permissions to even create symlinks on Windows? At least in Miri we had trouble with people not being able to run tests on Windows because they created symlinks. The tests worked on CI where apparently we do have enough permissions (or developer mode is on), but not on contributor's machines.
So it seems like a bad idea to make the rustc test suite rely on symlinks on Windows. Or am I missing something?
Doesn't one need admin permissions to even create symlinks on Windows?
It's a bit weird because symlinks have specific priviledges (individual perms or developer mode), and AFAIK you don't necessarily need admin perms (or developer mode) to create them.
So it seems like a bad idea to make the rustc test suite rely on symlinks on Windows. Or am I missing something?
compiletest has a directive //@ needs-symlink
which will ignore the test if we don't have symlink priviledges.
Re-opening due to revert #129413.
While reviewing #128562 and testing I discovered that
runtest.rs
'saggressive_rm_rf
is not aggressive enough, unfortunately, because symlink-to-dir and symlink-to-file on Windows need different handling.Have not considered junction points and hard links.
This can cause a rmake.rs test that creates symlinks to have its output artifacts fail to be removed on non-fresh test runs.