On Fri, Jun 15, 2018 at 12:59:08AM -0600, Alex Henrie wrote:
Signed-off-by: Alex Henrie alexhenrie24@gmail.com
dlls/ntdll/tests/info.c | 48 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+)
diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c index 6c93c3cd58..cdb91e1b73 100644 --- a/dlls/ntdll/tests/info.c +++ b/dlls/ntdll/tests/info.c @@ -54,6 +54,11 @@ static DWORD one_before_last_pid = 0; } \ } while(0)
+/* Firmware table providers */ +#define ACPI 0x41435049 +#define FIRM 0x4649524D +#define RSMB 0x52534D42
static BOOL InitFunctionPtrs(void) { /* All needed functions are NT based, so using GetModuleHandle is a good check */ @@ -826,6 +831,45 @@ static void test_query_logicalprocex(void) } }
+static void test_query_firmware(void) +{
- ULONG len1, len2;
- NTSTATUS status;
- SYSTEM_FIRMWARE_TABLE_INFORMATION *sfti = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 16);
- ok(!!sfti, "Failed to allocate memory\n");
- status = pNtQuerySystemInformation(SystemFirmwareTableInformation, sfti, 15, &len1);
+todo_wine
- ok(status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status);
+todo_wine
- ok(len1 == 16, "Expected length 16, got %u\n", len1);
- status = pNtQuerySystemInformation(SystemFirmwareTableInformation, sfti, 16, &len1);
+todo_wine
- ok(status == STATUS_NOT_IMPLEMENTED, "Expected STATUS_NOT_IMPLEMENTED, got %08x\n", status);
- ok(len1 == 0, "Expected length 0, got %u\n", len1);
- sfti->ProviderSignature = RSMB;
- sfti->Action = SystemFirmwareTable_Get;
- status = pNtQuerySystemInformation(SystemFirmwareTableInformation, sfti, 16, &len1);
+todo_wine
- ok(status == STATUS_BUFFER_TOO_SMALL, "Expected STATUS_BUFFER_TOO_SMALL, got %08x\n", status);
+todo_wine
- ok(len1 >= 16, "Expected length >= 16, got %u\n", len1);
testing TableBufferLength == len1 - 16 would be useful here.
- sfti = HeapReAlloc(GetProcessHeap(), 0, sfti, len1);
- ok(!!sfti, "Failed to allocate memory\n");
- status = pNtQuerySystemInformation(SystemFirmwareTableInformation, sfti, len1, &len2);
+todo_wine
- ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status);
- ok(len2 == len1, "Expected length %u, got %u\n", len1, len2);
and here.
- HeapFree(GetProcessHeap(), 0, sfti);
+}
static void test_query_processor_power_info(void) { NTSTATUS status; @@ -2267,6 +2311,10 @@ START_TEST(info) trace("Starting test_process_debug_flags()\n"); test_query_process_debug_flags(argc, argv);
- /* 0x4C SystemFirmwareTableInformation */
- trace("Starting test_query_firmware()\n");
- test_query_firmware();
- /* belongs to its own file */ trace("Starting test_readvirtualmemory()\n"); test_readvirtualmemory();
-- 2.17.1