Signed-off-by: Zebediah Figura z.figura12@gmail.com --- Fixes test failure on Windows XP.
This should have been caught by the testbot: https://testbot.winehq.org/JobDetails.pl?Key=39816 but no e-mail from Marvin was sent.
dlls/kernel32/tests/version.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/tests/version.c b/dlls/kernel32/tests/version.c index 3bc04fd..3904e80 100644 --- a/dlls/kernel32/tests/version.c +++ b/dlls/kernel32/tests/version.c @@ -26,6 +26,7 @@ #include "winternl.h"
static BOOL (WINAPI * pGetProductInfo)(DWORD, DWORD, DWORD, DWORD, DWORD *); +static UINT (WINAPI * pGetSystemFirmwareTable)(DWORD, DWORD, void *, DWORD); static NTSTATUS (WINAPI * pNtQuerySystemInformation)(SYSTEM_INFORMATION_CLASS, void *, ULONG, ULONG *); static NTSTATUS (WINAPI * pRtlGetVersion)(RTL_OSVERSIONINFOEXW *);
@@ -44,6 +45,7 @@ static void init_function_pointers(void) hmod = GetModuleHandleA("kernel32.dll");
GET_PROC(GetProductInfo); + GET_PROC(GetSystemFirmwareTable);
hmod = GetModuleHandleA("ntdll.dll");
@@ -729,7 +731,7 @@ static void test_GetSystemFirmwareTable(void)
expected_len -= min_sfti_len; smbios_table = HeapAlloc(GetProcessHeap(), 0, expected_len); - len = GetSystemFirmwareTable(RSMB, 0, smbios_table, expected_len); + len = pGetSystemFirmwareTable(RSMB, 0, smbios_table, expected_len); ok(len == expected_len, "Expected length %u, got %u\n", expected_len, len); ok(len == 0 || !memcmp(smbios_table, sfti->TableBuffer, 6), "Expected prologue %02x %02x %02x %02x %02x %02x, got %02x %02x %02x %02x %02x %02x\n",
Zebediah Figura z.figura12@gmail.com wrote:
expected_len -= min_sfti_len; smbios_table = HeapAlloc(GetProcessHeap(), 0, expected_len);
- len = GetSystemFirmwareTable(RSMB, 0, smbios_table, expected_len);
- len = pGetSystemFirmwareTable(RSMB, 0, smbios_table, expected_len);
I guess that an earlier call fails and the test is skipped but still it would be better to check the pGetSystemFirmwareTable for NULL.
On 13/07/18 09:59, Dmitry Timoshkov wrote:
Zebediah Figura z.figura12@gmail.com wrote:
expected_len -= min_sfti_len; smbios_table = HeapAlloc(GetProcessHeap(), 0, expected_len);
- len = GetSystemFirmwareTable(RSMB, 0, smbios_table, expected_len);
- len = pGetSystemFirmwareTable(RSMB, 0, smbios_table, expected_len);
I guess that an earlier call fails and the test is skipped but still it would be better to check the pGetSystemFirmwareTable for NULL.
Fair enough; I'll send an updated patch.