Skip to content

[Feature]: [New test coverage] Test GetVariable functionality of getting only the Attributes of the variable #260

@edhay

Description

@edhay

Feature Overview

GetVariable()

Summary
Returns the value of a variable.

Prototype

typedef
EFI_STATUS
GetVariable (
 IN CHAR16 *VariableName,
 IN EFI_GUID *VendorGuid,
 OUT UINT32 *Attributes OPTIONAL,
 IN OUT UINTN *DataSize,
 OUT VOID *Data OPTIONAL
 )

There is a provision in the spec to get only the variable Attributes using the GetVariable() function.
This is a case where the data to store the variable is not passed and DataSize is set to 0

This is newly added in UEFI v2.8
Reference: https://mantis.uefi.org/mantis/view.php?id=1954

Solution Overview

Two new cases may be added to GetVariable() Testing

Case 1: Attributes is not NULL. DataSize is 0, Data is NULL

Case 2: Attributes is not NULL. DataSize is sufficient, Data points valid memory (Normal Success Case)

In both cases, the Attributes must be set properly.

Alternatives Considered

No response

What are impacted?

Test Coverage

Urgency

Medium

Are you going to implement the feature request?

I will implement the feature

Do you need maintainer feedback?

No maintainer feedback needed

Anything else?

None

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions