From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=eric.jin@intel.com; receiver=edk2-devel@lists.01.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6359F2117924C for ; Sat, 13 Oct 2018 09:33:06 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Oct 2018 09:33:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,377,1534834800"; d="scan'208";a="241078458" Received: from jjin9-mobl.ccr.corp.intel.com ([10.249.168.56]) by orsmga004.jf.intel.com with ESMTP; 13 Oct 2018 09:33:03 -0700 From: Eric Jin To: edk2-devel@lists.01.org Cc: Supreeth Venkatesh , Jiaxin Wu Date: Sun, 14 Oct 2018 00:33:01 +0800 Message-Id: <20181013163301.9952-1-eric.jin@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 Subject: [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: Sat, 13 Oct 2018 16:33:06 -0000 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; 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"); 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)"); pReDevicePath = DevicePathFromText->ConvertTextToDeviceNode (text); if (SctCompareMem (pDevicePath, pReDevicePath, SctDevicePathNodeLength ((EFI_DEVICE_PATH_PROTOCOL *) pReDevicePath)) == 0) { AssertionType = EFI_TEST_ASSERTION_PASSED; -- 2.18.0.windows.1