public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH edk2-test v2 1/1] uefi-sct/SctPkg: fix BuildAtaDeviceNode()
@ 2021-09-08 19:21 Heinrich Schuchardt
  2021-10-12  8:22 ` [edk2-devel] " G Edhaya Chandran
  0 siblings, 1 reply; 3+ messages in thread
From: Heinrich Schuchardt @ 2021-09-08 19:21 UTC (permalink / raw)
  To: EDK II Development
  Cc: Eric Jin, G Edhaya Chandran, Barton Gao, Arvin Chen,
	Samer El-Haj-Mahmoud, Heinrich Schuchardt

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>
---
v2:
        correct parentheses
---
 .../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 46b97a2d2648..183434ee1c78 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [edk2-devel] [PATCH edk2-test v2 1/1] uefi-sct/SctPkg: fix BuildAtaDeviceNode()
  2021-09-08 19:21 [PATCH edk2-test v2 1/1] uefi-sct/SctPkg: fix BuildAtaDeviceNode() Heinrich Schuchardt
@ 2021-10-12  8:22 ` G Edhaya Chandran
  2021-10-25  7:56   ` G Edhaya Chandran
  0 siblings, 1 reply; 3+ messages in thread
From: G Edhaya Chandran @ 2021-10-12  8:22 UTC (permalink / raw)
  To: Heinrich Schuchardt, devel

[-- Attachment #1: Type: text/plain, Size: 57 bytes --]

Reviewed-by: G Edhaya Chandran<edhaya.chandran@arm.com>

[-- Attachment #2: Type: text/html, Size: 63 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [edk2-devel] [PATCH edk2-test v2 1/1] uefi-sct/SctPkg: fix BuildAtaDeviceNode()
  2021-10-12  8:22 ` [edk2-devel] " G Edhaya Chandran
@ 2021-10-25  7:56   ` G Edhaya Chandran
  0 siblings, 0 replies; 3+ messages in thread
From: G Edhaya Chandran @ 2021-10-25  7:56 UTC (permalink / raw)
  To: G Edhaya Chandran, devel

[-- Attachment #1: Type: text/plain, Size: 120 bytes --]

Upstreamed through commit-id : https://github.com/tianocore/edk2-test/commit/dc6efa23c099a04702854d36e518939b50aeea7f

[-- Attachment #2: Type: text/html, Size: 124 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-25  7:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-08 19:21 [PATCH edk2-test v2 1/1] uefi-sct/SctPkg: fix BuildAtaDeviceNode() Heinrich Schuchardt
2021-10-12  8:22 ` [edk2-devel] " G Edhaya Chandran
2021-10-25  7:56   ` G Edhaya Chandran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox