From: "Heinrich Schuchardt" <xypron.glpk@gmx.de>
To: EDK II Development <devel@edk2.groups.io>
Cc: Eric Jin <eric.jin@intel.com>,
G Edhaya Chandran <Edhaya.Chandran@arm.com>,
Barton Gao <gaojie@byosoft.com.cn>,
Arvin Chen <arvinx.chen@intel.com>,
Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>,
Heinrich Schuchardt <xypron.glpk@gmx.de>
Subject: [PATCH edk2-test 1/1] uefi-sct/SctPkg: correct print code for EFI_MEMORY_TYPE
Date: Fri, 30 Apr 2021 21:40:23 +0200 [thread overview]
Message-ID: <20210430194023.27008-1-xypron.glpk@gmx.de> (raw)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2284
EFI_MEMORY_TYPE is an enum. SctPrint expects an UINTN when printing with
%d. Add missing conversions in MemoryAllocationServicesBBTestFunction.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
.../MemoryAllocationServicesBBTestFunction.c | 98 +++++++++----------
1 file changed, 49 insertions(+), 49 deletions(-)
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/MemoryAllocationServices/BlackBoxTest/MemoryAllocationServicesBBTestFunction.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/MemoryAllocationServices/BlackBoxTest/MemoryAllocationServicesBBTestFunction.c
index bf8cd3b3afa4..e545b3cfc5b8 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/MemoryAllocationServices/BlackBoxTest/MemoryAllocationServicesBBTestFunction.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/MemoryAllocationServices/BlackBoxTest/MemoryAllocationServicesBBTestFunction.c
@@ -417,7 +417,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (!(Memory & EFI_PAGE_MASK)) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
@@ -437,7 +437,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory != 0) {
Status = gtBS->FreePages (
@@ -455,7 +455,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
}
}
@@ -478,7 +478,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
} else {
PageNum = (UINTN)Descriptor.NumberOfPages;
@@ -512,7 +512,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (!(Memory & EFI_PAGE_MASK)) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
@@ -532,7 +532,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory <= Descriptor.PhysicalStart +
SctLShiftU64 (Descriptor.NumberOfPages, EFI_PAGE_SHIFT) -
@@ -554,7 +554,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex],
+ (UINTN)AllocatePagesMemoryType[TypeIndex],
Descriptor.PhysicalStart,
Descriptor.NumberOfPages,
Memory
@@ -589,7 +589,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (!(Memory2 & EFI_PAGE_MASK)) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
@@ -609,7 +609,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if ( Memory2 <= Descriptor.PhysicalStart +
SctLShiftU64 (Descriptor.NumberOfPages, EFI_PAGE_SHIFT) -
@@ -631,7 +631,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex],
+ (UINTN)AllocatePagesMemoryType[TypeIndex],
Memory2
);
if (Memory != 0) {
@@ -650,7 +650,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
}
}
@@ -670,7 +670,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
}
}
@@ -694,7 +694,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
} else {
PageNum = (UINTN)Descriptor.NumberOfPages;
@@ -739,7 +739,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (!(Memory & EFI_PAGE_MASK)) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
@@ -759,7 +759,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory == Start) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
@@ -779,7 +779,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory != 0) {
Status = gtBS->FreePages (
@@ -797,7 +797,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
}
}
@@ -824,7 +824,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
} else {
PageNum = (UINTN)Descriptor.NumberOfPages;
@@ -869,7 +869,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (!(Memory & EFI_PAGE_MASK)) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
@@ -889,7 +889,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory == Start) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
@@ -909,7 +909,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory != 0) {
Status = gtBS->FreePages (
@@ -927,7 +927,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
}
}
@@ -947,7 +947,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
} else {
PageNum = (UINTN)Descriptor.NumberOfPages;
@@ -992,7 +992,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (!(Memory & EFI_PAGE_MASK)) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
@@ -1012,7 +1012,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory == Start + (SctLShiftU64 (PageNum/3, EFI_PAGE_SHIFT) & 0xFFFFFFFFFFFF0000)) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
@@ -1032,7 +1032,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory != 0) {
Status = gtBS->FreePages (
@@ -1050,7 +1050,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
}
}
@@ -1070,7 +1070,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
} else {
PageNum = (UINTN)Descriptor.NumberOfPages;
@@ -1115,7 +1115,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (!(Memory & EFI_PAGE_MASK)) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
@@ -1135,7 +1135,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory == Start + (SctLShiftU64 (PageNum * 2 / 3, EFI_PAGE_SHIFT) & 0xFFFFFFFFFFFF0000)) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
@@ -1155,7 +1155,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory != 0) {
Status = gtBS->FreePages (
@@ -1173,7 +1173,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
}
}
@@ -1200,7 +1200,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
} else {
PageNum = (UINTN)Descriptor.NumberOfPages;
@@ -1245,7 +1245,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (!(Memory & EFI_PAGE_MASK)) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
@@ -1265,7 +1265,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory == Start) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
@@ -1285,7 +1285,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory != 0) {
Status = gtBS->FreePages (
@@ -1303,7 +1303,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
}
}
@@ -1323,7 +1323,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
} else {
PageNum = (UINTN)Descriptor.NumberOfPages;
@@ -1377,7 +1377,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (!(Memory & EFI_PAGE_MASK)) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
@@ -1397,7 +1397,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory == Start) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
@@ -1417,7 +1417,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory != 0) {
if (PageNum != 1) {
@@ -1442,7 +1442,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
}
}
@@ -1462,7 +1462,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
} else {
PageNum = (UINTN)Descriptor.NumberOfPages;
@@ -1507,7 +1507,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (!(Memory & EFI_PAGE_MASK)) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
@@ -1527,7 +1527,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory == Start) {
AssertionType = EFI_TEST_ASSERTION_PASSED;
@@ -1547,7 +1547,7 @@ BBTestAllocatePagesInterfaceTest (
__FILE__,
(UINTN)__LINE__,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
if (Memory != 0) {
Status = gtBS->FreePages (
@@ -1565,7 +1565,7 @@ BBTestAllocatePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
}
}
@@ -1656,7 +1656,7 @@ BBTestFreePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
continue;
}
@@ -1685,7 +1685,7 @@ BBTestFreePagesInterfaceTest (
(UINTN)__LINE__,
Status,
TplArray[Index],
- AllocatePagesMemoryType[TypeIndex]
+ (UINTN)AllocatePagesMemoryType[TypeIndex]
);
}
--
2.30.2
next reply other threads:[~2021-04-30 19:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-30 19:40 Heinrich Schuchardt [this message]
2021-05-11 21:37 ` [edk2-devel] [PATCH edk2-test 1/1] uefi-sct/SctPkg: correct print code for EFI_MEMORY_TYPE Samer El-Haj-Mahmoud
2021-07-09 11:50 ` G Edhaya Chandran
2021-08-03 15:38 ` Samer El-Haj-Mahmoud
2021-09-07 8:33 ` G Edhaya Chandran
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210430194023.27008-1-xypron.glpk@gmx.de \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox