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: fix BuildAtaDeviceNode()
Date: Wed, 31 Mar 2021 17:38:55 +0200 [thread overview]
Message-ID: <20210331153855.62803-1-xypron.glpk@gmx.de> (raw)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3290
When BuildAtaDeviceNode() is called with L"Ata(0,0,0)" it creates a node
Ata(1,1,0). This leads to test to an assertion failed test result
../DevicePathToTextBBTestFunction.c:332:
Convert result: Ata(0,0,0) - Expected: Ata(Primary,Master,0)
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
.../BlackBoxTest/DevicePathToTextBBTestMain.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/DevicePathToTextBBTestMain.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/DevicePathToTextBBTestMain.c
index 7cf473d30643..59f9cc71831b 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/DevicePathToTextBBTestMain.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathToText/BlackBoxTest/DevicePathToTextBBTestMain.c
@@ -1162,9 +1162,9 @@ BuildAtaDeviceNode (
Status = GetNextRequiredParam(&TextDeviceNode, L"Controller", &ParamIdentifierStr, &ParamIdentifierVal);
if ((!EFI_ERROR(Status)) && (ParamIdentifierVal != NULL)) {
- if ((SctStrCmp (ParamIdentifierVal, L"Primary") == 0) || (SctStrCmp(ParamIdentifierVal, L"0"))) {
+ if ((SctStrCmp (ParamIdentifierVal, L"Primary") == 0) || (SctStrCmp(ParamIdentifierVal, L"0" == 0))) {
Atapi->PrimarySecondary = 0;
- } else if ((SctStrCmp (ParamIdentifierVal, L"Secondary") == 0) || (SctStrCmp(ParamIdentifierVal, L"1"))) {
+ } else if ((SctStrCmp (ParamIdentifierVal, L"Secondary") == 0) || (SctStrCmp(ParamIdentifierVal, L"1" == 0))) {
Atapi->PrimarySecondary = 1;
} else {
goto InValidText;
@@ -1175,9 +1175,9 @@ BuildAtaDeviceNode (
Status = GetNextRequiredParam(&TextDeviceNode, L"Drive", &ParamIdentifierStr, &ParamIdentifierVal);
if ((!EFI_ERROR(Status)) && (ParamIdentifierVal != NULL)) {
- if ((SctStrCmp (ParamIdentifierVal, L"Master") == 0) || (SctStrCmp(ParamIdentifierVal, L"0"))) {
+ if ((SctStrCmp (ParamIdentifierVal, L"Master") == 0) || (SctStrCmp(ParamIdentifierVal, L"0") == 0)) {
Atapi->SlaveMaster = 0;
- } else if ((SctStrCmp (ParamIdentifierVal, L"Slave") == 0) || (SctStrCmp(ParamIdentifierVal, L"1"))) {
+ } else if ((SctStrCmp (ParamIdentifierVal, L"Slave") == 0) || (SctStrCmp(ParamIdentifierVal, L"1" == 0))) {
Atapi->SlaveMaster = 1;
} else {
goto InValidText;
--
2.30.2
next reply other threads:[~2021-03-31 15:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-31 15:38 Heinrich Schuchardt [this message]
2021-04-05 15:45 ` [edk2-devel] [PATCH edk2-test 1/1] uefi-sct/SctPkg: fix BuildAtaDeviceNode() 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=20210331153855.62803-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