Skip to content

integration-cli: TestCopyFromContainerPathIsNotDir: adjust for win 2025 #50189

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

Merged
merged 1 commit into from
Jun 12, 2025

Conversation

thaJeztah
Copy link
Member

It looks like the error returned by Windows changed in Windows 2025; before Windows 2025, this produced a ERROR_INVALID_NAME;

The filename, directory name, or volume label syntax is incorrect.

But Windows 2025 produces a ERROR_DIRECTORY ("The directory name is invalid."):

CreateFile \\\\?\\Volume{d9f06b05-0405-418b-b3e5-4fede64f3cdc}\\windows\\system32\\drivers\\etc\\hosts\\: The directory name is invalid.

Docs; https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499-

- A picture of a cute animal (not mandatory but encouraged)

It looks like the error returned by Windows changed in Windows 2025; before
Windows 2025, this produced a `ERROR_INVALID_NAME`;

    The filename, directory name, or volume label syntax is incorrect.

But Windows 2025 produces a `ERROR_DIRECTORY` ("The directory name is invalid."):

    CreateFile \\\\?\\Volume{d9f06b05-0405-418b-b3e5-4fede64f3cdc}\\windows\\system32\\drivers\\etc\\hosts\\: The directory name is invalid.

Docs; https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499-

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the fix_TestCopyFromContainerPathIsNotDir branch from 99bf8eb to d3d20b9 Compare June 12, 2025 13:18
@thaJeztah
Copy link
Member Author

Wondering if someone has Windows 2025 (or equivalent) to check if this is indeed Windows changing the error returned, or if (e.g.) \windows\system32\drivers\etc\hosts or any of its parent paths no longer exists (and that the change in error is because of that).

The intent of this test is to check for an error when trying to create a directory with a path-name that is a file.

@robmry
Copy link
Contributor

robmry commented Jun 12, 2025

or if (e.g.) \windows\system32\drivers\etc\hosts or any of its parent paths no longer exists (and that the change in error is because of that).

It's still there in mcr.microsoft.com/windows/nanoserver:ltsc2025 ...

C:\Windows\System32\drivers\etc>dir
 Volume in drive C has no label.
 Volume Serial Number is 6E70-71E2

 Directory of C:\Windows\System32\drivers\etc

04/01/2024  06:43 AM    <DIR>          .
06/07/2025  04:18 PM    <DIR>          ..
06/12/2025  07:33 PM               912 hosts
...

@robmry robmry merged commit 5de6c1f into moby:master Jun 12, 2025
258 of 265 checks passed
@thaJeztah thaJeztah deleted the fix_TestCopyFromContainerPathIsNotDir branch June 12, 2025 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants