Skip to content

Python CI runs ubuntu-latest, where WINPE_* and SYS_* constants collapse to the same path #796

Description

@MohammedAlkindi

Steps to Reproduce

  1. Note that .github/workflows/python_tests.yml runs on ubuntu-latest.
  2. On Linux, evaluate os.path.join('X:', os.sep, 'Windows', 'System32'). The drive letter is discarded.
  3. Run testing/run_tests.py on Windows and compare drivers_test.test_driver_wim.

Expected Behavior

WINPE_SYSTEM32 and SYS_SYSTEM32 name different roots, so a test pinning the wrong one should fail.

Current Behavior

They render identically on the CI platform:

constant Windows ubuntu-latest
WINPE_SYSTEM32 X:\Windows\System32 /Windows/System32
SYS_SYSTEM32 C:\Windows\System32 /Windows/System32

Any assertion pinning the wrong root passes there, so CI cannot tell the boot drive from the system drive.

drivers_test.test_driver_wim expects WINPE_DISM. winpe.check_winpe() is unmocked and returns False off WinPE, so the code builds SYS_DISM. On Linux both render /Windows/System32/dism.exe and it passes.

Notes

Windows 11, Python 3.13.13.

ntp.py:30 builds BINARY from WINPE_SYSTEM32 while ntp_test.py:52 asserts SYS_SYSTEM32, the same divergence. That one is currently unreachable on Windows: ntp_test.py:36 calls time.tzset(), which does not exist on win32, so the test errors before the assertion runs. If the assertion is right, SyncClockToNtp invokes X:\Windows\System32\cmd.exe, which is not present on a booted system.

go_tests.yml already runs windows-latest, so a Python leg is precedented. It would be red until these are settled.

Log/Screenshot

Expected: call('X:\Windows\System32\dism.exe', ...)
Actual:   call('C:\Windows\System32\dism.exe', ...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions