-- v3: ntdll: Stub NtQuerySystemInformation(SystemLeapSecondInformation).
From: Hans Leidekker hans@codeweavers.com
--- dlls/ntdll/tests/info.c | 9 +++++++++ dlls/ntdll/unix/system.c | 15 +++++++++++++++ dlls/wow64/system.c | 1 + include/winternl.h | 5 +++++ 4 files changed, 30 insertions(+)
diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c index 7741293d815..49a57441649 100644 --- a/dlls/ntdll/tests/info.c +++ b/dlls/ntdll/tests/info.c @@ -1094,6 +1094,7 @@ static void test_query_interrupt(void)
static void test_time_adjustment(void) { + SYSTEM_LEAP_SECOND_INFORMATION leap; SYSTEM_TIME_ADJUSTMENT_QUERY query; SYSTEM_TIME_ADJUSTMENT adjust; NTSTATUS status; @@ -1124,6 +1125,14 @@ static void test_time_adjustment(void) status = pNtSetSystemInformation( SystemTimeAdjustmentInformation, &adjust, sizeof(adjust)+1 ); todo_wine ok( status == STATUS_INFO_LENGTH_MISMATCH, "got %08lx\n", status ); + + len = 0; + memset( &leap, 0xcc, sizeof(leap) ); + status = pNtQuerySystemInformation( SystemLeapSecondInformation, &leap, sizeof(leap), &len ); + ok( status == STATUS_SUCCESS, "got %08lx\n", status ); + ok( len == sizeof(leap), "wrong len %lu\n", len ); + ok( leap.Enabled == 1, "got %u\n", leap.Enabled ); + ok( !leap.Flags, "got %lx\n", leap.Flags ); }
static void test_query_kerndebug(void) diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c index bfe59d4cf7e..efc5914577b 100644 --- a/dlls/ntdll/unix/system.c +++ b/dlls/ntdll/unix/system.c @@ -3664,6 +3664,21 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class, case SystemCpuSetInformation: /* 175 */ return NtQuerySystemInformationEx(class, NULL, 0, info, size, ret_size);
+ case SystemLeapSecondInformation: /* 206 */ + { + SYSTEM_LEAP_SECOND_INFORMATION *leap = info; + + len = sizeof(*leap); + if (size >= len) + { + FIXME( "SystemLeapSecondInformation - stub\n" ); + leap->Enabled = TRUE; + leap->Flags = 0; + } + else ret = STATUS_INFO_LENGTH_MISMATCH; + break; + } + /* Wine extensions */
case SystemWineVersionInformation: /* 1000 */ diff --git a/dlls/wow64/system.c b/dlls/wow64/system.c index 5f3056a4179..ffa82054b9a 100644 --- a/dlls/wow64/system.c +++ b/dlls/wow64/system.c @@ -331,6 +331,7 @@ NTSTATUS WINAPI wow64_NtQuerySystemInformation( UINT *args ) case SystemCodeIntegrityInformation: /* SYSTEM_CODEINTEGRITY_INFORMATION */ case SystemKernelDebuggerInformationEx: /* SYSTEM_KERNEL_DEBUGGER_INFORMATION_EX */ case SystemCpuSetInformation: /* SYSTEM_CPU_SET_INFORMATION */ + case SystemLeapSecondInformation: /* SYSTEM_LEAP_SECOND_INFORMATION */ case SystemProcessorBrandString: /* char[] */ case SystemProcessorFeaturesInformation: /* SYSTEM_PROCESSOR_FEATURES_INFORMATION */ case SystemWineVersionInformation: /* char[] */ diff --git a/include/winternl.h b/include/winternl.h index 16ee201d936..9be82072234 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -3028,6 +3028,11 @@ typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION_EX { BOOLEAN DebuggerPresent; } SYSTEM_KERNEL_DEBUGGER_INFORMATION_EX, *PSYSTEM_KERNEL_DEBUGGER_INFORMATION_EX;
+typedef struct _SYSTEM_LEAP_SECOND_INFORMATION { + BOOLEAN Enabled; + ULONG Flags; +} SYSTEM_LEAP_SECOND_INFORMATION, *PSYSTEM_LEAP_SECOND_INFORMATION; + typedef struct _VM_COUNTERS { SIZE_T PeakVirtualSize;
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=151229
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
ntdll: info.c:1132: Test failed: got c0000003 info.c:1133: Test failed: wrong len 0 info.c:1134: Test failed: got 204 info.c:1135: Test failed: got cccccccc
=== w7u_adm (32 bit report) ===
ntdll: info.c:1132: Test failed: got c0000003 info.c:1133: Test failed: wrong len 0 info.c:1134: Test failed: got 204 info.c:1135: Test failed: got cccccccc
=== w7u_el (32 bit report) ===
ntdll: info.c:1132: Test failed: got c0000003 info.c:1133: Test failed: wrong len 0 info.c:1134: Test failed: got 204 info.c:1135: Test failed: got cccccccc
=== w8 (32 bit report) ===
ntdll: info.c:1132: Test failed: got c0000003 info.c:1133: Test failed: wrong len 0 info.c:1134: Test failed: got 204 info.c:1135: Test failed: got cccccccc
=== w8adm (32 bit report) ===
ntdll: info.c:1132: Test failed: got c0000003 info.c:1133: Test failed: wrong len 0 info.c:1134: Test failed: got 204 info.c:1135: Test failed: got cccccccc
=== w864 (32 bit report) ===
ntdll: info.c:1132: Test failed: got c0000003 info.c:1133: Test failed: wrong len 0 info.c:1134: Test failed: got 204 info.c:1135: Test failed: got cccccccc
=== w1064v1507 (32 bit report) ===
ntdll: info.c:1132: Test failed: got c0000003 info.c:1133: Test failed: wrong len 0 info.c:1134: Test failed: got 204 info.c:1135: Test failed: got cccccccc
=== w7pro64 (64 bit report) ===
ntdll: info.c:1132: Test failed: got c0000003 info.c:1133: Test failed: wrong len 0 info.c:1134: Test failed: got 204 info.c:1135: Test failed: got cccccccc
=== w864 (64 bit report) ===
ntdll: info.c:1132: Test failed: got c0000003 info.c:1133: Test failed: wrong len 0 info.c:1134: Test failed: got 204 info.c:1135: Test failed: got cccccccc
=== w1064v1507 (64 bit report) ===
ntdll: info.c:1132: Test failed: got c0000003 info.c:1133: Test failed: wrong len 0 info.c:1134: Test failed: got 204 info.c:1135: Test failed: got cccccccc
v3: add definition to winternl.h and update wow64_NtQuerySystemInformation.