mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-15 17:34:43 +00:00
efi_selftest: conformance test for GetNextVariableName
Test that GetNextVariableName() checks the parameters. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
parent
70a4ac693d
commit
9ba35e64fa
1 changed files with 35 additions and 0 deletions
|
@ -141,6 +141,41 @@ static int execute(void)
|
|||
return EFI_ST_FAILURE;
|
||||
}
|
||||
/* Enumerate variables */
|
||||
|
||||
ret = runtime->get_next_variable_name(NULL, u"efi_st_var1", &guid);
|
||||
if (ret != EFI_INVALID_PARAMETER) {
|
||||
efi_st_error("GetNextVariableName missing parameter check\n");
|
||||
return EFI_ST_FAILURE;
|
||||
}
|
||||
|
||||
len = 24;
|
||||
ret = runtime->get_next_variable_name(&len, NULL, &guid);
|
||||
if (ret != EFI_INVALID_PARAMETER) {
|
||||
efi_st_error("GetNextVariableName missing parameter check\n");
|
||||
return EFI_ST_FAILURE;
|
||||
}
|
||||
|
||||
len = 24;
|
||||
ret = runtime->get_next_variable_name(&len, u"efi_st_var1", NULL);
|
||||
if (ret != EFI_INVALID_PARAMETER) {
|
||||
efi_st_error("GetNextVariableName missing parameter check\n");
|
||||
return EFI_ST_FAILURE;
|
||||
}
|
||||
|
||||
len = 1;
|
||||
ret = runtime->get_next_variable_name(&len, u"", &guid);
|
||||
if (ret != EFI_INVALID_PARAMETER) {
|
||||
efi_st_error("GetNextVariableName missing parameter check\n");
|
||||
return EFI_ST_FAILURE;
|
||||
}
|
||||
|
||||
len = 16;
|
||||
ret = runtime->get_next_variable_name(&len, u"efi_st_var1", &guid);
|
||||
if (ret != EFI_INVALID_PARAMETER) {
|
||||
efi_st_error("GetNextVariableName missing parameter check\n");
|
||||
return EFI_ST_FAILURE;
|
||||
}
|
||||
|
||||
boottime->set_mem(&guid, 16, 0);
|
||||
*varname = 0;
|
||||
flag = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue