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=lokesh.bv@arm.com; receiver=edk2-devel@lists.01.org Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by ml01.01.org (Postfix) with ESMTP id AA4E721A02937 for ; Mon, 19 Nov 2018 22:50:24 -0800 (PST) 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 3E1CFA78; Mon, 19 Nov 2018 22:50:24 -0800 (PST) Received: from usa.arm.com (a075554-lin.blr.arm.com [10.162.0.156]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id A77BA3F5A0; Mon, 19 Nov 2018 22:50:22 -0800 (PST) From: Lokesh B V To: edk2-devel@lists.01.org, supreeth.venkatesh@arm.com, eric.jin@intel.com Date: Tue, 20 Nov 2018 12:20:18 +0530 Message-Id: <1542696618-2284-1-git-send-email-lokesh.bv@arm.com> X-Mailer: git-send-email 2.7.4 Subject: [edk2-test][PATCH] SctPkg/Tools: Fix incorrect line ending detection by GenBin tool 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, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 X-List-Received-Date: Tue, 20 Nov 2018 06:50:24 -0000 Some windows editors uses "\r\n" for line feed. While processing uefi testcase info file, the GenBin tool logic to skip line feed doesn't consider the presence of carraige return(\r) in line feed. So this results in incorrect format error. Signed-off-by: Lokesh B V --- uefi-sct/SctPkg/Tools/Source/GenBin/GenBin.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/uefi-sct/SctPkg/Tools/Source/GenBin/GenBin.c b/uefi-sct/SctPkg/Tools/Source/GenBin/GenBin.c index 61bb35b..ce271a1 100644 --- a/uefi-sct/SctPkg/Tools/Source/GenBin/GenBin.c +++ b/uefi-sct/SctPkg/Tools/Source/GenBin/GenBin.c @@ -176,6 +176,7 @@ Trim ( for (Index1 = 0; Index1 < Length; Index1++) { if ((String[Index1] != ' ' ) && (String[Index1] != '\t') && + (String[Index1] != '\r') && (String[Index1] != '\n')) { break; } @@ -193,6 +194,7 @@ Trim ( for (Index1 = 0; Index1 < Length; Index1++) { if ((String[Length - 1 - Index1] != ' ' ) && (String[Length - 1 - Index1] != '\t') && + (String[Length - 1 - Index1] != '\r') && (String[Length - 1 - Index1] != '\n')) { break; } -- 2.7.4