From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by mx.groups.io with SMTP id smtpd.web09.139.1617116644718244549 for ; Tue, 30 Mar 2021 08:04:05 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=W5L2Qikt; spf=pass (domain: gmx.de, ip: 212.227.17.22, mailfrom: xypron.glpk@gmx.de) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1617116628; bh=muLSFAT23xeOIJdfdzmgNlIJJ6jErRf1FStJmaTi5k4=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=W5L2QiktLhE71GDYSp/GqeTqUP5AMhqFNpHXPhqYUzXBDSvYSR8lP4ZCWLbt91qaU WxWjgfYxSjg2is6VtBmV3Uwnj8XKYLtNRT2F6bJ5K6XuMjXo4NHemlpNJzt+YxxCzB uC5nD7FM4yiAAtRJStpvNg/kQ9BW/NIn5Jtr7ZdY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from workstation4.fritz.box ([62.143.247.63]) by mail.gmx.net (mrgmx105 [212.227.17.174]) with ESMTPSA (Nemesis) id 1McpNy-1m02h40lqk-00ZyJ6; Tue, 30 Mar 2021 17:03:48 +0200 From: "Heinrich Schuchardt" To: EDK II Development Cc: Eric Jin , G Edhaya Chandran , Barton Gao , Arvin Chen , Samer El-Haj-Mahmoud , Heinrich Schuchardt Subject: [PATCH edk2-test 1/1] uefi-sct/SctPkg: type mismatch in Simple Network test Date: Tue, 30 Mar 2021 17:03:41 +0200 Message-Id: <20210330150341.91221-1-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Provags-ID: V03:K1:KwAYsanzPuKYhUcx6Sf0DB8C5e6SV1IZVWqvEyOPHS+OByTNyqM 7LnLtisc2Yho+UQsEi8P6f/9Gv7nI6tdQIbPfO4V42edNjYPpSTlFYSo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tjJB7j5fJS3hlRJkRUjyJ5jwOvlU7aacrH4Y5IShpeXQN2Sty0L+CeieL0S61wrSDQLR WsiiUx/xzByTlmnQCfgOpEN8Ak5l73FlHW2Kzg9g9qqqbxXdVfIo2On4mfhnyRXNtYkWev10H 8Jad8wdkrlXLi0c6TS1eQw+CDcxGAY0MPMtzhAK/tHge4UY9KzWJoLETvX9yrZI5EpJu450rv aquwmIWgzhGiSjZKd/WCv4gpQ4IlCWGWoo9JNf8PSLnn97A7U2LDrpdPQStu6hCsz3/rHujpX +hRGTf8N7z1rwHbrie3MOzOu3q3D4Vm5NolxIwRfj2v09kIXoD5ERH3G4VSHCnUij51ig= Content-Transfer-Encoding: quoted-printable REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3257 SctPrint() requires that %x and %d refers to an UINTN parameter. SimpleNetworkBBTestFunction.c tries to print INT32 using %x, %d without converting to UINTN resulting in corrupted output like: SimpleNetworkBBTestFunction.c:891: Status - Unsupported, Filter - AAAA00000000 Mode->ReceiveFilterSetting has only 32 bit. The true value is 0. Convert the parameters to UINTN. Signed-off-by: Heinrich Schuchardt =2D-- .../SimpleNetworkBBTestFunction.c | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/Blac= kBoxTest/SimpleNetworkBBTestFunction.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI= /Protocol/SimpleNetwork/BlackBoxTest/SimpleNetworkBBTestFunction.c index 8767e68e92d4..5fc01aadd96a 100644 =2D-- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxT= est/SimpleNetworkBBTestFunction.c +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTes= t/SimpleNetworkBBTestFunction.c @@ -775,7 +775,7 @@ BBTestReceiveFilterFunctionTest ( __FILE__, (UINTN)__LINE__, Status, - SnpInterface->Mode->ReceiveFilterSetting + (UINTN)SnpInterface->Mode->ReceiveFilterSetting ); // Check point A. Enable Specified bit. @@ -797,7 +797,7 @@ BBTestReceiveFilterFunctionTest ( __FILE__, (UINTN)__LINE__, Status, - SnpInterface->Mode->ReceiveFilterSetting + (UINTN)SnpInterface->Mode->ReceiveFilterSetting ); // Check point C. Enable and Disable Specified bit together. @@ -819,7 +819,7 @@ BBTestReceiveFilterFunctionTest ( __FILE__, (UINTN)__LINE__, Status, - SnpInterface->Mode->ReceiveFilterSetting + (UINTN)SnpInterface->Mode->ReceiveFilterSetting ); } @@ -856,12 +856,12 @@ BBTestReceiveFilterFunctionTest ( __FILE__, (UINTN)__LINE__, Status, - SnpInterface->Mode->ReceiveFilterSetting, - SnpInterface->Mode->ReceiveFilterMask, - SnpInterface->Mode->MCastFilterCount, - SnpInterface->Mode->MCastFilter[0].Addr[0], - SnpInterface->Mode->MCastFilter[0].Addr[5], - SnpInterface->Mode->MCastFilter[1].Addr[0] + (UINTN)SnpInterface->Mode->ReceiveFilterSetting, + (UINTN)SnpInterface->Mode->ReceiveFilterMask, + (UINTN)SnpInterface->Mode->MCastFilterCount, + (UINTN)SnpInterface->Mode->MCastFilter[0].Addr[0], + (UINTN)SnpInterface->Mode->MCastFilter[0].Addr[5], + (UINTN)SnpInterface->Mode->MCastFilter[1].Addr[0] ); } @@ -885,17 +885,17 @@ BBTestReceiveFilterFunctionTest ( AssertionType, gSimpleNetworkBBTestFunctionAssertionGuid012, L"EFI_SIMPLE_NETWORK_PROTOCOL.ReceiveFilters - Invoke Re= ceiveFilters() to reset multicast receive filters list and verify interfac= e correctness within test case", - L"%a:%d:Status - %r, Filter - %x, Mask - %x,Count - %d(%= d), Address - %x, %x, %x", + L"%a:%d:Status - %r, Filter - %x, Mask - %x, Count - %d(= %d), Address - %x, %x, %x", __FILE__, (UINTN)__LINE__, Status, - SnpInterface->Mode->ReceiveFilterSetting, - SnpInterface->Mode->ReceiveFilterMask, - SnpInterface->Mode->MCastFilterCount, - Mode.MCastFilterCount, - SnpInterface->Mode->MCastFilter[0].Addr[0], - SnpInterface->Mode->MCastFilter[0].Addr[5], - SnpInterface->Mode->MCastFilter[1].Addr[0] + (UINTN)SnpInterface->Mode->ReceiveFilterSetting, + (UINTN)SnpInterface->Mode->ReceiveFilterMask, + (UINTN)SnpInterface->Mode->MCastFilterCount, + (UINTN)Mode.MCastFilterCount, + (UINTN)SnpInterface->Mode->MCastFilter[0].Addr[0], + (UINTN)SnpInterface->Mode->MCastFilter[0].Addr[5], + (UINTN)SnpInterface->Mode->MCastFilter[1].Addr[0] ); // // Restore SNP State @@ -1358,12 +1358,12 @@ BBTestMCastIpToMacFunctionTest ( __FILE__, (UINTN)__LINE__, Status, - MAC1.Addr[0], - MAC1.Addr[1], - MAC1.Addr[2], - MAC1.Addr[3], - MAC1.Addr[4], - MAC1.Addr[5] + (UINTN)MAC1.Addr[0], + (UINTN)MAC1.Addr[1], + (UINTN)MAC1.Addr[2], + (UINTN)MAC1.Addr[3], + (UINTN)MAC1.Addr[4], + (UINTN)MAC1.Addr[5] ); // @@ -1510,8 +1510,8 @@ BBTestNVDataFunctionTest ( __FILE__, (UINTN)__LINE__, Status, - SnpInterface->Mode->NvRamSize, - SnpInterface->Mode->NvRamAccessSize + (UINTN)SnpInterface->Mode->NvRamSize, + (UINTN)SnpInterface->Mode->NvRamAccessSize ); } @@ -1919,7 +1919,7 @@ BBTestGetStatusFunctionTest ( (UINTN)__LINE__, Status, Status1, - InterruptStatus + (UINTN)InterruptStatus ); } =2D- 2.30.2