From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=217.140.101.70; helo=foss.arm.com; envelope-from=supreeth.venkatesh@arm.com; receiver=edk2-devel@lists.01.org Received: from foss.arm.com (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by ml01.01.org (Postfix) with ESMTP id A62552194D3B8 for ; Tue, 16 Oct 2018 02:48:38 -0700 (PDT) Received: by usa-sjc-mx-foss1.foss.arm.com (Postfix, from userid 105) id 3559C36C0; Tue, 16 Oct 2018 02:58:34 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 08593344A; Sun, 14 Oct 2018 19:23:08 -0700 (PDT) Received: from [10.6.43.238] (bc-c3-3-14.eu.iaas.arm.com [10.6.43.238]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EFA963F5B1; Sun, 14 Oct 2018 19:22:46 -0700 (PDT) To: Eric Jin , edk2-devel@lists.01.org Cc: Jiaxin Wu References: <20181013163301.9952-1-eric.jin@intel.com> From: Supreeth Venkatesh Message-ID: <974803b7-c6be-2139-51b4-f95b082db266@arm.com> Date: Mon, 15 Oct 2018 03:22:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181013163301.9952-1-eric.jin@intel.com> Subject: Re: [PATCH] uefi-sct/SctPkg:The Lun display order issue in iSCSI device path text X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Oct 2018 09:48:39 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US On 10/13/2018 05:33 PM, Eric Jin wrote: > Cc: Supreeth Venkatesh > Cc: Jiaxin Wu > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Eric Jin > --- > .../BlackBoxTest/DevicePathFromTextBBTestCoverage.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackBoxTest/DevicePathFromTextBBTestCoverage.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackBoxTest/DevicePathFromTextBBTestCoverage.c > index fc099d8e..6f97924a 100644 > --- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackBoxTest/DevicePathFromTextBBTestCoverage.c > +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackBoxTest/DevicePathFromTextBBTestCoverage.c > @@ -1,7 +1,7 @@ > /** @file > > Copyright 2006 - 2017 Unified EFI, Inc.
> - Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
> + Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
> > This program and the accompanying materials > are licensed and made available under the terms and conditions of the BSD License > @@ -1442,7 +1442,7 @@ CreateiScsiDeviceNode ( > CHAR16 *DataDigestStr; > CHAR16 *AuthenticationStr; > CHAR16 *ProtocolStr; > - UINT64 LunNum; > + UINT64 LunNum = 0; EFI coding convention does not allow initialization during definition. > ISCSI_DEVICE_PATH_WITH_NAME *iSCSI; > > NameStr = SctSplitStr (&TextDeviceNode, L','); > @@ -1459,7 +1459,7 @@ CreateiScsiDeviceNode ( > ); > SctUnicodeToAscii (iSCSI->iSCSITargetName, NameStr, SctStrLen (NameStr)); > iSCSI->TargetPortalGroupTag = (UINT16) SctStrToUInt (PortalGroupStr); > - SctStrToUInt64 (LunStr, &LunNum); > + StrToUInt8Array(LunStr, &LunNum); > iSCSI->Lun = LunNum; > > Options = 0x0000; > @@ -2846,12 +2846,12 @@ DevicePathFromTextConvertTextToDeviceNodeCoverageTest ( > (UINTN)__LINE__ > ); > // > - // TDS 3.10.1.2.26 > + // TDS 3.10.1.2.26 0x5678 - byte 3 is 0x56 and byte4 is 0x78 > // > - SctStrCpy (text, L"MyTargetName,0x12AB,5678,CRC32C,None,CHAP_BI,TCP"); > + SctStrCpy (text, L"MyTargetName,0x12AB,0x0000005678000000,CRC32C,None,CHAP_BI,TCP"); Magic String. > pDevicePath = CreateiScsiDeviceNode(text); > > - SctStrCpy (text, L"iSCSI(MyTargetName,0x12AB,5678,CRC32C,None,CHAP_BI,TCP)"); > + SctStrCpy (text, L"iSCSI(MyTargetName,0x12AB,0x0000005678000000,CRC32C,None,CHAP_BI,TCP)"); Magic String. > pReDevicePath = DevicePathFromText->ConvertTextToDeviceNode (text); > if (SctCompareMem (pDevicePath, pReDevicePath, SctDevicePathNodeLength ((EFI_DEVICE_PATH_PROTOCOL *) pReDevicePath)) == 0) { > AssertionType = EFI_TEST_ASSERTION_PASSED;