[Testbot shows failures](https://test.winehq.org/data/patterns-tb-win.html#ntdll:file) since a few days in ntdll:file on older windows versions.
These failures seem to be related to 37c5fa3d and f15bd29c (CC: @cmccarthy).
This patch just adds `STATUS_INVALID_INFO_CLASS` and moves the `ok` statement below the `win_skip`.
From: Bernhard Übelacker bernhardu@mailbox.org
--- dlls/ntdll/tests/file.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c index cc0afdbdb64..34962db9426 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c @@ -1388,14 +1388,13 @@ static void test_file_full_size_information(void)
/* FileFsFullSizeInformationEx is supported on Windows 10 build 1809 and later */ res = pNtQueryVolumeInformationFile(h, &io, &ffsie, sizeof ffsie, FileFsFullSizeInformationEx); - ok(res == STATUS_INVALID_PARAMETER || res == STATUS_SUCCESS, "cannot get attributes, res %lx\n", res); - - if (res == STATUS_NOT_IMPLEMENTED || res == STATUS_INVALID_PARAMETER) + if (res == STATUS_NOT_IMPLEMENTED || res == STATUS_INVALID_PARAMETER || res == STATUS_INVALID_INFO_CLASS) { win_skip( "FileFsFullSizeInformationEx not supported.\n" ); CloseHandle( h ); return; } + ok(res == STATUS_SUCCESS, "cannot get attributes, res %lx\n", res);
expected = ffsie.ActualAvailableAllocationUnits + ffsie.ActualPoolUnavailableAllocationUnits + ffsie.UsedAllocationUnits + ffsie.TotalReservedAllocationUnits;
Jinoh Kang (@iamahuman) commented about dlls/ntdll/tests/file.c:
/* FileFsFullSizeInformationEx is supported on Windows 10 build 1809 and later */ res = pNtQueryVolumeInformationFile(h, &io, &ffsie, sizeof ffsie, FileFsFullSizeInformationEx);
- ok(res == STATUS_INVALID_PARAMETER || res == STATUS_SUCCESS, "cannot get attributes, res %lx\n", res);
- if (res == STATUS_NOT_IMPLEMENTED || res == STATUS_INVALID_PARAMETER)
- if (res == STATUS_NOT_IMPLEMENTED || res == STATUS_INVALID_PARAMETER || res == STATUS_INVALID_INFO_CLASS)
Doesn't `STATUS_INVALID_PARAMETER` still belong to the ok() statement?
On Fri Feb 28 16:13:14 2025 +0000, Jinoh Kang wrote:
Doesn't `STATUS_INVALID_PARAMETER` still belong to the ok() statement?
As there is a return after the skip I removed it from the ok statement.
Is there a downside to moving the ok below the skip?
On Fri Feb 28 16:20:29 2025 +0000, Bernhard Übelacker wrote:
As there is a return after the skip I removed it from the ok statement. Is there a downside to moving the ok below the skip?
I'm fine with moving the ok. I'm asking for the ok condition to include `res == STATUS_INVALID_PARAMETER`, just like it has been before, instead of in the skip condition.
On Fri Feb 28 16:25:10 2025 +0000, Jinoh Kang wrote:
I'm fine with moving the ok. I'm asking for the ok condition to include `res == STATUS_INVALID_PARAMETER`, just like it has been before, instead of in the skip condition.
I am not sure if I understand you right. Before this patch `res == STATUS_INVALID_PARAMETER` was part of the ok and the if condition around the skip. After my patch the ok should never get reached with `res == STATUS_INVALID_PARAMETER`, so isn't checking for it superfluous?
I am happy with either way, should I add it again?