python / buildmaster-config

Configuration for buildbot.python.org

Home Page:https://buildbot.python.org/all/#/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

We don't have a dedicated Windows bot with disabled symlinks

encukou opened this issue · comments

Recently, a missing @skip_unless_symlink was caught by a single buildbot -- AMD64 Windows11 Refleaks: python/cpython#114107

Given that no-symlinks (i.e. “developer mode” disabled) is the default on Widows, we should probably have a dedicated builder for it.

Unfortunately I'm currently not in a position to fix this.

Given that no-symlinks (i.e. “developer mode” disabled) is the default on Widows, we should probably have a dedicated builder for it.

Strange, I don't recall that I changed this option in my Windows 11 VM and I can create symlinks. Does test.pythoninfo log this "Windows Developer Mode" info?

I'm curious, do you have info on this mode, how to check if it's enabled or not, and how to turn it on or off?

How did you install the VM? Is it a development image?

I suggest that you search the Web for Windows developer mode; when it comes to info about Windows, its better than asking me :)

How did you install the VM? Is it a development image?

Hum, I don't recall. Maybe yes, maybe no.

https://learn.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development says:

However, if you're writing software with Visual Studio on a computer for the first time, you will need to enable Developer Mode on both the development PC and on any devices you'll use to test your code.

Ah. Maybe installed Visual Studio installs it. So any Windows machine where Python is built with VS has this mode enabled? Good to know.

The issue title is:

We don't have a dedicated Windows bot with disabled symlinks #454

How would Python be built in this case? If VS requires the developer mode to be enabled?

Or another kind of test is needed: get pre-built Python, run tests. That's way more complicated than just "set up a Windows buildbot" since something should frequently build Python on Windows with whatever is needed to run tests (including Python source code?).

Well, AMD64 Windows11 Refleaks caught the issue, so it must be possible somehow :)
Perhaps you can disable it after installing Visual Studio.

Well, AMD64 Windows11 Refleaks caught the issue, so it must be possible somehow :)

Oh. That's even more interesting.

I wrote python/cpython#114121 to log the Windows Developer Mode in test.pythoninfo.

From what I saw, os.symlink() is allowed if the user is running with Administrator rights or if the Developer Mode is enabled.

I checked again my Windows 11 VM: in fact, the Developer Mode was disabled, and os.symlink() was disallowed. Moreover, can_symlink() of test.support.os_helper returns False as expected. If I enable the Developer Mode, os.symlink() works as expected, and can_symlink() returns True.

I checked again my Windows 11 VM: in fact, the Developer Mode was disabled, and os.symlink() was disallowed. Moreover, can_symlink() of test.support.os_helper returns False as expected. If I enable the Developer Mode, os.symlink() works as expected, and can_symlink() returns True.

Oh. I got confused by something...

I'm mostly working on Windows via SSH. But SSH logs me as an administrator. In this case, can_symlink() returns True, even if the Developer Mode is enabled :-) I modified my PR to also log if the user is an adminstrator or not.