|
OpenCore
1.0.8
OpenCore Bootloader
|
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <Uefi.h>#include <UserMemory.h>#include <Protocol/BlockIo.h>#include <Library/BaseMemoryLib.h>#include <Library/DevicePathLib.h>#include <Library/MemoryAllocationLib.h>#include <Library/UefiBootServicesTableLib.h>#include <Library/OcDevicePathLib.h>#include <Library/OcDebugLogLib.h>Go to the source code of this file.
Functions | |
| VOID | DebugPrintDevicePath (UINTN ErrorLevel, CONST CHAR8 *Message, EFI_DEVICE_PATH_PROTOCOL *DevicePath) |
| STATIC VOID | Check (BOOLEAN Condition, CONST CHAR8 *Description) |
| STATIC EFI_STATUS EFIAPI | MockHandleProtocol (EFI_HANDLE Handle, EFI_GUID *Protocol, VOID **Interface) |
| STATIC EFI_STATUS EFIAPI | MockLocateHandleBuffer (EFI_LOCATE_SEARCH_TYPE SearchType, EFI_GUID *Protocol, VOID *SearchKey, UINTN *Count, EFI_HANDLE **HandleBuffer) |
| STATIC EFI_STATUS EFIAPI | MockLocateDevicePath (EFI_GUID *Protocol, EFI_DEVICE_PATH_PROTOCOL **DevicePath, EFI_HANDLE *Handle) |
| STATIC VOID | Reset (VOID) |
| STATIC VOID | Run (CONST CHAR8 *Name, CONST UINT8 *Input, UINTN Size, BOOLEAN Expected) |
| STATIC VOID | TestVirtioCleanup (VOID) |
| int | main (int argc, char **argv) |
Variables | |
| STATIC CONST UINT8 | mImage [] |
| STATIC UINT8 | mPaths [3][86] |
| STATIC EFI_BLOCK_IO_MEDIA | mMedia [3] |
| STATIC EFI_BLOCK_IO_PROTOCOL | mBlockIo [3] |
| STATIC UINTN | mHandleCount |
| STATIC BOOLEAN | mAlreadyValid |
| STATIC BOOLEAN | mRejectFixed |
| STATIC BOOLEAN | mNoHandles |
| STATIC BOOLEAN | mRequireRootFix |
| STATIC UINT32 | mTests |
Regression tests for the generic device path resolver with mocked disks. SPDX-License-Identifier: BSD-3-Clause
Definition in file TestAtapiPath.c.
| STATIC VOID Check | ( | BOOLEAN | Condition, |
| CONST CHAR8 * | Description ) |
Definition at line 50 of file TestAtapiPath.c.
| VOID DebugPrintDevicePath | ( | UINTN | ErrorLevel, |
| CONST CHAR8 * | Message, | ||
| EFI_DEVICE_PATH_PROTOCOL * | DevicePath ) |
Definition at line 23 of file TestAtapiPath.c.
| int main | ( | int | argc, |
| char ** | argv ) |
Definition at line 283 of file TestAtapiPath.c.
| STATIC EFI_STATUS EFIAPI MockHandleProtocol | ( | EFI_HANDLE | Handle, |
| EFI_GUID * | Protocol, | ||
| VOID ** | Interface ) |
Definition at line 64 of file TestAtapiPath.c.
| STATIC EFI_STATUS EFIAPI MockLocateDevicePath | ( | EFI_GUID * | Protocol, |
| EFI_DEVICE_PATH_PROTOCOL ** | DevicePath, | ||
| EFI_HANDLE * | Handle ) |
Definition at line 118 of file TestAtapiPath.c.
| STATIC EFI_STATUS EFIAPI MockLocateHandleBuffer | ( | EFI_LOCATE_SEARCH_TYPE | SearchType, |
| EFI_GUID * | Protocol, | ||
| VOID * | SearchKey, | ||
| UINTN * | Count, | ||
| EFI_HANDLE ** | HandleBuffer ) |
Definition at line 92 of file TestAtapiPath.c.
| STATIC VOID Reset | ( | VOID | ) |
Definition at line 177 of file TestAtapiPath.c.
| STATIC VOID Run | ( | CONST CHAR8 * | Name, |
| CONST UINT8 * | Input, | ||
| UINTN | Size, | ||
| BOOLEAN | Expected ) |
Definition at line 208 of file TestAtapiPath.c.
| STATIC VOID TestVirtioCleanup | ( | VOID | ) |
Definition at line 246 of file TestAtapiPath.c.
| STATIC BOOLEAN mAlreadyValid |
Definition at line 42 of file TestAtapiPath.c.
| STATIC EFI_BLOCK_IO_PROTOCOL mBlockIo[3] |
Definition at line 40 of file TestAtapiPath.c.
| STATIC UINTN mHandleCount |
Definition at line 41 of file TestAtapiPath.c.
| STATIC CONST UINT8 mImage[] |
Definition at line 31 of file TestAtapiPath.c.
| STATIC EFI_BLOCK_IO_MEDIA mMedia[3] |
Definition at line 39 of file TestAtapiPath.c.
| STATIC BOOLEAN mNoHandles |
Definition at line 44 of file TestAtapiPath.c.
| STATIC UINT8 mPaths[3][86] |
Definition at line 38 of file TestAtapiPath.c.
| STATIC BOOLEAN mRejectFixed |
Definition at line 43 of file TestAtapiPath.c.
| STATIC BOOLEAN mRequireRootFix |
Definition at line 45 of file TestAtapiPath.c.
| STATIC UINT32 mTests |
Definition at line 46 of file TestAtapiPath.c.