TianoCore EDK2 master
|
#include "CpuPageTableLibUnitTest.h"
Go to the source code of this file.
Functions | |
UNIT_TEST_STATUS EFIAPI | TestCaseForParameter (IN UNIT_TEST_CONTEXT Context) |
UNIT_TEST_STATUS EFIAPI | TestCaseWhichNoNeedExtraSize (IN UNIT_TEST_CONTEXT Context) |
UNIT_TEST_STATUS EFIAPI | TestCase1Gmapto4K (IN UNIT_TEST_CONTEXT Context) |
UNIT_TEST_STATUS EFIAPI | TestCaseManualChangeReadWrite (IN UNIT_TEST_CONTEXT Context) |
UNIT_TEST_STATUS EFIAPI | TestCaseManualSizeNotMatch (IN UNIT_TEST_CONTEXT Context) |
UNIT_TEST_STATUS EFIAPI | TestCaseManualNotMergeEntry (IN UNIT_TEST_CONTEXT Context) |
UNIT_TEST_STATUS EFIAPI | TestCaseManualChangeNx (IN UNIT_TEST_CONTEXT Context) |
UNIT_TEST_STATUS EFIAPI | TestCaseToCheckMapMaskAndAttr (IN UNIT_TEST_CONTEXT Context) |
EFI_STATUS EFIAPI | UefiTestMain (VOID) |
INT32 | main (INT32 Argc, CHAR8 *Argv[]) |
Unit tests of the CpuPageTableLib instance of the CpuPageTableLib class
Copyright (c) 2022 - 2023, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file CpuPageTableLibUnitTestHost.c.
INT32 main | ( | INT32 | Argc, |
CHAR8 * | Argv[] | ||
) |
Standard POSIX C entry point for host based unit test execution.
Argc | Number of arguments. |
Argv | Array of arguments. |
Definition at line 913 of file CpuPageTableLibUnitTestHost.c.
UNIT_TEST_STATUS EFIAPI TestCase1Gmapto4K | ( | IN UNIT_TEST_CONTEXT | Context | ) |
Test Case that check the case to map [0, 1G] to [8K, 1G+8K]
[in] | Context | [Optional] An optional parameter that enables: 1) test-case reuse with varied parameters and 2) test-case re-entry for Target tests that need a reboot. This parameter is a VOID* and it is the responsibility of the test author to ensure that the contents are well understood by all test cases that may consume it. |
UNIT_TEST_PASSED | The Unit test has completed and the test case was successful. |
UNIT_TEST_ERROR_TEST_FAILED | A test case assertion has failed. |
Definition at line 196 of file CpuPageTableLibUnitTestHost.c.
UNIT_TEST_STATUS EFIAPI TestCaseForParameter | ( | IN UNIT_TEST_CONTEXT | Context | ) |
Check if the input parameters are not supported.
[in] | Context | [Optional] An optional parameter that enables: 1) test-case reuse with varied parameters and 2) test-case re-entry for Target tests that need a reboot. This parameter is a VOID* and it is the responsibility of the test author to ensure that the contents are well understood by all test cases that may consume it. |
UNIT_TEST_PASSED | The Unit test has completed and the test case was successful. |
UNIT_TEST_ERROR_TEST_FAILED | A test case assertion has failed. |
Definition at line 35 of file CpuPageTableLibUnitTestHost.c.
UNIT_TEST_STATUS EFIAPI TestCaseManualChangeNx | ( | IN UNIT_TEST_CONTEXT | Context | ) |
Check if the parent entry has different Nx attribute
[in] | Context | [Optional] An optional parameter that enables: 1) test-case reuse with varied parameters and 2) test-case re-entry for Target tests that need a reboot. This parameter is a VOID* and it is the responsibility of the test author to ensure that the contents are well understood by all test cases that may consume it. |
UNIT_TEST_PASSED | The Unit test has completed and the test case was successful. |
UNIT_TEST_ERROR_TEST_FAILED | A test case assertion has failed. |
Definition at line 592 of file CpuPageTableLibUnitTestHost.c.
UNIT_TEST_STATUS EFIAPI TestCaseManualChangeReadWrite | ( | IN UNIT_TEST_CONTEXT | Context | ) |
Check if the parent entry has different R/W attribute
[in] | Context | [Optional] An optional parameter that enables: 1) test-case reuse with varied parameters and 2) test-case re-entry for Target tests that need a reboot. This parameter is a VOID* and it is the responsibility of the test author to ensure that the contents are well understood by all test cases that may consume it. |
UNIT_TEST_PASSED | The Unit test has completed and the test case was successful. |
UNIT_TEST_ERROR_TEST_FAILED | A test case assertion has failed. |
Definition at line 255 of file CpuPageTableLibUnitTestHost.c.
UNIT_TEST_STATUS EFIAPI TestCaseManualNotMergeEntry | ( | IN UNIT_TEST_CONTEXT | Context | ) |
Check that won't merge entries
[in] | Context | [Optional] An optional parameter that enables: 1) test-case reuse with varied parameters and 2) test-case re-entry for Target tests that need a reboot. This parameter is a VOID* and it is the responsibility of the test author to ensure that the contents are well understood by all test cases that may consume it. |
UNIT_TEST_PASSED | The Unit test has completed and the test case was successful. |
UNIT_TEST_ERROR_TEST_FAILED | A test case assertion has failed. |
Definition at line 517 of file CpuPageTableLibUnitTestHost.c.
UNIT_TEST_STATUS EFIAPI TestCaseManualSizeNotMatch | ( | IN UNIT_TEST_CONTEXT | Context | ) |
Check if the needed size is expected
[in] | Context | [Optional] An optional parameter that enables: 1) test-case reuse with varied parameters and 2) test-case re-entry for Target tests that need a reboot. This parameter is a VOID* and it is the responsibility of the test author to ensure that the contents are well understood by all test cases that may consume it. |
UNIT_TEST_PASSED | The Unit test has completed and the test case was successful. |
UNIT_TEST_ERROR_TEST_FAILED | A test case assertion has failed. |
Definition at line 410 of file CpuPageTableLibUnitTestHost.c.
UNIT_TEST_STATUS EFIAPI TestCaseToCheckMapMaskAndAttr | ( | IN UNIT_TEST_CONTEXT | Context | ) |
Check if the input Mask and Attribute is as expected when creating new page table or updating existing page table.
[in] | Context | [Optional] An optional parameter that enables: 1) test-case reuse with varied parameters and 2) test-case re-entry for Target tests that need a reboot. This parameter is a VOID* and it is the responsibility of the test author to ensure that the contents are well understood by all test cases that may consume it. |
UNIT_TEST_PASSED | The Unit test has completed and the test case was successful. |
UNIT_TEST_ERROR_TEST_FAILED | A test case assertion has failed. |
Definition at line 717 of file CpuPageTableLibUnitTestHost.c.
UNIT_TEST_STATUS EFIAPI TestCaseWhichNoNeedExtraSize | ( | IN UNIT_TEST_CONTEXT | Context | ) |
Check the case that modifying page table doesn't need extra buffe
[in] | Context | [Optional] An optional parameter that enables: 1) test-case reuse with varied parameters and 2) test-case re-entry for Target tests that need a reboot. This parameter is a VOID* and it is the responsibility of the test author to ensure that the contents are well understood by all test cases that may consume it. |
UNIT_TEST_PASSED | The Unit test has completed and the test case was successful. |
UNIT_TEST_ERROR_TEST_FAILED | A test case assertion has failed. |
Definition at line 96 of file CpuPageTableLibUnitTestHost.c.
EFI_STATUS EFIAPI UefiTestMain | ( | VOID | ) |
Initialize the unit test framework, suite, and unit tests for the sample unit tests and run the unit tests.
EFI_SUCCESS | All test cases were dispatched. |
EFI_OUT_OF_RESOURCES | There are not enough resources available to initialize the unit tests. |
Definition at line 834 of file CpuPageTableLibUnitTestHost.c.