From 6b2aaf8d031a364ea35b3e4e89a55ac9a7c5dc01 Mon Sep 17 00:00:00 2001 From: Ilias Apalodimas Date: Thu, 25 Apr 2024 08:18:20 +0300 Subject: efi_selftest: add tests for QueryVariableInfo at runtime Since we support QueryVariableInfo at runtime now add the relevant tests. Since we want those to be reusable at bootime, add them in a separate file Add tests for - Test QueryVariableInfo returns EFI_SUCCESS - Test null pointers for the function arguments - Test invalid combination of attributes Signed-off-by: Ilias Apalodimas --- include/efi_selftest.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') diff --git a/include/efi_selftest.h b/include/efi_selftest.h index 5bcebb36828..1b708849bcb 100644 --- a/include/efi_selftest.h +++ b/include/efi_selftest.h @@ -147,6 +147,17 @@ void *efi_st_get_config_table(const efi_guid_t *guid); */ u16 efi_st_get_key(void); +/** + * efi_st_query_variable_common - Common variable tests for boottime/runtime + * + * @runtime: Pointer to services table + * @attributes: Attributes used + * + * Return: EFI_ST_SUCCESS/FAILURE + */ +int efi_st_query_variable_common(struct efi_runtime_services *runtime, + u32 attributes); + /** * struct efi_unit_test - EFI unit test * -- cgit v1.2.3