Skip to content

Commit

Permalink
Fix Incorrect Mock RNG Prototypes (#672)
Browse files Browse the repository at this point in the history
# Preface


## Description

Corrects and error with the MOCK Rng Prototypes

For each item, place an "x" in between `[` and `]` if true. Example:
`[x]`.
_(you can also check items in the GitHub UI)_

- [ ] Impacts functionality?
  - No
- [ ] Impacts security?
  - No
- [ ] Breaking change?
  - No
- [ ] Includes tests?
  - No
- [ ] Includes documentation?
  - No

## How This Was Tested

Unit tests in a private repository

## Integration Instructions

N/A
  • Loading branch information
Flickdm authored Jan 11, 2024
1 parent a912cb2 commit e9eb614
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
29 changes: 15 additions & 14 deletions MdePkg/Test/Mock/Include/GoogleTest/Protocol/MockRng.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,24 @@ struct MockRng {
MOCK_INTERFACE_DECLARATION (MockRng);

MOCK_FUNCTION_DECLARATION (
EFI_STATUS
GetInfo (
IN EFI_RNG_PROTOCOL *This,
IN OUT UINTN *RNGAlgorithmListSize,
OUT EFI_RNG_ALGORITHM *RNGAlgorithmList
)
EFI_STATUS,
GetInfo,
(
IN EFI_RNG_PROTOCOL *This,
IN OUT UINTN *RNGAlgorithmListSize,
OUT EFI_RNG_ALGORITHM *RNGAlgorithmList
)
);

MOCK_FUNCTION_DECLARATION (
EFI_STATUS
GetRNG (
IN EFI_RNG_PROTOCOL *This,
IN EFI_RNG_ALGORITHM *RNGAlgorithmList,
IN UINTN RNGAlgorithmListSize,
IN OUT UINT8 *RandomNumber,
IN UINTN RandomNumberLength
)
EFI_STATUS,
GetRng,
(
IN EFI_RNG_PROTOCOL *This,
IN EFI_RNG_ALGORITHM *RNGAlgorithm,
IN UINTN RNGValueLength,
OUT UINT8 *RNGValue
)
);
};

Expand Down
2 changes: 1 addition & 1 deletion MdePkg/Test/Mock/Library/GoogleTest/Protocol/MockRng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

MOCK_INTERFACE_DEFINITION (MockRng);
MOCK_FUNCTION_DEFINITION (MockRng, GetInfo, 3, EFIAPI);
MOCK_FUNCTION_DEFINITION (MockRng, GetRng, 5, EFIAPI);
MOCK_FUNCTION_DEFINITION (MockRng, GetRng, 4, EFIAPI);

EFI_RNG_PROTOCOL RNG_PROTOCOL_INSTANCE = {
GetInfo, // EFI_RNG_GET_INFO
Expand Down

0 comments on commit e9eb614

Please sign in to comment.