-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
test_os: test_attributes failed on ReFS, Windows 11 Dev Drive #111293
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
Comments
It may be clearer to use hex instead of decimal:
It seems that There is a comment on Microsoft website about file id and ReFS: https://learn.microsoft.com/en-us/windows/win32/api/fileapi/ns-fileapi-by_handle_file_information |
The implementation of static PyObject *
os_DirEntry_inode_impl(DirEntry *self)
/*[clinic end generated code: output=156bb3a72162440e input=3ee7b872ae8649f0]*/
{
#ifdef MS_WINDOWS
if (!self->got_file_index) {
...
self->win32_file_index = stat.st_ino;
self->got_file_index = 1;
}
static_assert(sizeof(unsigned long long) >= sizeof(self->win32_file_index),
"DirEntry.win32_file_index is larger than unsigned long long");
return PyLong_FromUnsignedLongLong(self->win32_file_index);
#else /* POSIX */
...
#endif
} |
@zooba What is ReFS? |
ReFS uses 128-bit file ids, while NTFS does not. |
@gvanrossum It's a file system. Been around for 10+ years at this point, but only recently became available to non-server installs (and it's the preferred file system for Dev Drive, so we can expect usage to increase). |
I think besides #111294 , it may be possible to add another environment to the Test workflow, maybe named "Windows (x64) with ReFS". Is that possible? I also notice that another test case fails on ReFS and I'm considering whether to raise a new issue. |
We normally set up buildbots for specific scenarios like this. GitHub already has too many checks to be efficient for PRs, and we don't need to validate every possible configuration pre-commit. Please do raise a new issue. We want to get things right on ReFS (but also be aware that some tests may have an implicit assumption of NTFS that's at fault (and also also be aware that newer Windows Insider builds have the newer stat() API implementation, which may have otherwise undiscovered issues, so your precise build number may be relevant)). |
OK, I will raise it tomorrow. The name of the test case is like "send_file" (I don't quite remember it now) and it may be related to I/O model. |
Resolve Conversations
…ythonGH-111294) (cherry picked from commit b468538) Co-authored-by: zcxsythenew <30565051+zcxsythenew@users.noreply.github.com>
) (cherry picked from commit b468538) Co-authored-by: zcxsythenew <30565051+zcxsythenew@users.noreply.github.com>
Bug report
Bug description:
PowerShell command:
Test output:
The output indicates that
test_attributes
failed.Given that
os.link
andos.symlink
can both success, I summarized the test below (may be slightly different from the original), shown in Python code:Output:
The above output indicates that:
entry.inode()
returns a small integer for a file,0
for a folder;os.stat(entry.path, follow_symlinks=False).st_ino
returns a large number, same asfsutil file queryFileID
on WindowsBecause they are different, the test fails.
Note: This issue will not appear on NTFS. This issue can only be reproduced on ReFS.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows
Linked PRs
The text was updated successfully, but these errors were encountered: