uefirtvariable
⇤ ← Revision 1 as of 2013-02-28 23:55:13
Size: 3456
Comment:
|
Size: 1712
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
Test various UEFI runtime variable interfaces | The uefirtvariable test checks the UEFI runtime service !GetVariable, !GetNextVariableName, !SetVariable and !QueryVariableInfo interfaces. |
Line 6: | Line 6: |
* stress test for UEFI runtime interface !GetVariable | * stress test for UEFI runtime service interface !GetVariable |
Line 8: | Line 9: |
* test for UEFI runtime !SetVariable, subtest 1 * !SetVariable when the variable does not exist, test with two GUIDs and the same variable name * test for UEFI runtime !SetVariable, subtest 2 * !SetVariable when the variable exist, test with the same and different variable data * test for UEFI runtime !SetVariable, subtest 3 * !SetVariable when the similar variable exists, test with the similar variable name * test for UEFI runtime !SetVariable, subtest 4 * !SetVariable when the !DataSize is 0. The expected return status is EFI_NOT_FOUND * test for UEFI runtime !SetVariable, subtest 5 * !SetVariable when the Attributes is 0. The expected return status is EFI_NOT_FOUND * stress test for UEFI runtime interface !SetVariable with the same data * This stress test tests the UEFI runtime interface !SetVariable by calling with the same data multiple times. * All bios implementations have a limit of how much flash nvram space they have (ie win8 logo requirements is 64k min). When doing repeated setnvram and delete nvram variables will eventually hit the end of the 64k nvram limit (deletes just mark the variable as deleted in the link list but it still writes into new nvram space in flash), bios will do the reclaim after reboot. * Since this series setvariable stress tests cannot reboot the system, consider the tests multiple times of setvariable on this test, decide to use double times from UEFI SCT tests, i.e. 40. To safe some nvram space for the coming setvariable stress tests. |
* test !SetVariable on two different GUIDs and the same variable name * test !SetVariable on the same and different variable data * test !SetVariable on similar variable name * test !SetVariable on !DataSize is 0 * test !SetVariable on Attributes is 0 * test !SetVariable on Invalid Attributes * stress tests for UEFI runtime interface !SetVariable * test !SetVariable on setting the variable with the same data * test !SetVariable on setting the variable with different data * test !SetVariable on setting the variable with different name * test !SetVariable on setting the variable with different name and data |
Line 24: | Line 22: |
* test for UEFI runtime !GetNextVariableName by: * use sizeof() for finding the bit size of long integer (The size of long integer can vary on different architectures) * tests the UEFI runtime service !GetNextVariableName interface by checking the variable name and GUID * function test for !SetVariable with invalid attributes * EFI_VARIABLE_BOOTSERVICE_ACCESS * EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE * EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS * The !SetVariable setting with these attributes should not work sucessfully, after the !ExitBootServices() is performed. * This test will check the return value for the !SetVariable and check the variable is actually set or not by !GetVariable. If the variable is found, that means firmware might have some implement issue, the test fail. * stress test for UEFI runtime interface !GetNextVariableName |
* the runtime service !GetNextVariableName interface function test * check the !GetNextVariableName returned value of !VariableNameSize is equal to the length of !VariableName * test !GetNextVariableName interface returns unique variables * the !GetNextVariableName interface conformance tests |
Line 35: | Line 28: |
* test for UEFI runtime !QueryVariableInfo * This test tests the UEFI runtime service !QueryVariableInfo interface. The !QueryVariableInfo interface is supported after UEFI spec 2.0. The kernel in efi.c will check the revision of system table got from firmware to see if the firmware implemented after UEFI spec 2.0, i.e. the value !FirmeareRevision. If the value less than EFI_2_00_SYSTEM_TABLE_REVISION, kernel returns EFI_UNSUPPORT. If test returns EFI_UNSUPPORT, suggest firmware also need to check the system table item !FirmwareRevision, to avoid that directly return unsupported from kernel. |
* test the UEFI runtime service !QueryVariableInfo interface * stress test for UEFI runtime service interface !QueryVariableInfo === Examples: === {{{sudo fwts uefirtvariable -}}} ..runs uefirtvariable on your machine and dumps the output to stdout. |
Firmware Test Suite - uefirtvariable test
The uefirtvariable test checks the UEFI runtime service GetVariable, GetNextVariableName, SetVariable and QueryVariableInfo interfaces.
GetVariable tests
tests the UEFI runtime service GetVariable interface by checking data, datasize and different attributes of variable
stress test for UEFI runtime service interface GetVariable
SetVariable tests
test SetVariable on two different GUIDs and the same variable name
test SetVariable on the same and different variable data
test SetVariable on similar variable name
test SetVariable on DataSize is 0
test SetVariable on Attributes is 0
test SetVariable on Invalid Attributes
stress tests for UEFI runtime interface SetVariable
test SetVariable on setting the variable with the same data
test SetVariable on setting the variable with different data
test SetVariable on setting the variable with different name
test SetVariable on setting the variable with different name and data
GetNextVariableName tests
the runtime service GetNextVariableName interface function test
check the GetNextVariableName returned value of VariableNameSize is equal to the length of VariableName
test GetNextVariableName interface returns unique variables
the GetNextVariableName interface conformance tests
QueryVariableInfo tests
test the UEFI runtime service QueryVariableInfo interface
stress test for UEFI runtime service interface QueryVariableInfo
Examples:
sudo fwts uefirtvariable -
..runs uefirtvariable on your machine and dumps the output to stdout.
FirmwareTestSuite/Reference/uefirtvariable (last edited 2016-01-11 07:24:18 by anthonywong)