From nobody Sun May 5 11:37:26 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+57289+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+57289+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1586829230; cv=none; d=zohomail.com; s=zohoarc; b=P08gwiWgiOx7JAjnMVORg67bhM4aAJj6B7LXrIdmqeErho/sJHEhfIsCpYl3DlHZcQu+0IC8P0aWu84iKfb8KKKsxhO4MYdvpfubrVBCG6j0Cni8XhgjVX6zKgDzU73koPMnaBiPEuz9735lNfkJu063FhcVk/cGG/GCLIdSZKE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586829230; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=SBYAaAmI0DiTvhjKP2fBU7R11hDdFg9t8fp4hHxs/Jw=; b=j0DArIf/FyTQq3j+8YXjMcIxri1ZxdGQCexsTA4SkhFs0H7+4n/8T4wNgcwdy9D/YGubpHP86aCp3L9/VOfutdsVeug3O8gv8pe4UebsYmCnoGu+aBr3jWxGejU/MKcLqOMdaTLrJS1ebqcpqfiUMChui/T1aMEshR5qHi7aLaQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+57289+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1586829230046583.145087499402; Mon, 13 Apr 2020 18:53:50 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id fWiAYY1788612x97rbiNGgkE; Mon, 13 Apr 2020 18:53:49 -0700 X-Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web12.3834.1586829228820725425 for ; Mon, 13 Apr 2020 18:53:49 -0700 IronPort-SDR: m1jEtb398/yfD8+rj45l0fX+Bf8C2qzSSS9RpSYhBRWb5e1XRGD2Jimx9ZCu7fOM8aT1YUvix/ 0YoE/UXO1UJg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2020 18:53:48 -0700 IronPort-SDR: YqEzGVjwSobi3ycXY5k9y4HPWWfVT1dkHX9RssNY7FNr/PpAqjLO4gPpWqM7Dl024tMUU8WSKP SpDMmVI7PMzw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,381,1580803200"; d="scan'208";a="245290466" X-Received: from unknown (HELO guominji-MOBL.ccr.corp.intel.com) ([10.239.158.171]) by fmsmga008.fm.intel.com with ESMTP; 13 Apr 2020 18:53:46 -0700 From: "Guomin Jiang" To: devel@edk2.groups.io Cc: Bret Barkelew , Michael D Kinney , Liming Gao , Sean Brogan , Bret Barkelew Subject: [edk2-devel] [PATCH] UnitTestFrameworkPkg/UnitTestLib: Remove FrameworkHandle parameter Date: Tue, 14 Apr 2020 09:53:45 +0800 Message-Id: <20200414015345.2397-1-guomin.jiang@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,guomin.jiang@intel.com X-Gm-Message-State: EKJasmOl9M2F9lVaIxRIK7sgx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1586829229; bh=5fLeI6nxR8+sI+KIwVsFHpne1G6szsGkZTdkPAj/kAE=; h=Cc:Date:From:Reply-To:Subject:To; b=JmaU/JDcjV3zou3Hqov7tzQS9bqaGFRgllN9RtwNEd/bTmF0PcB7Yy6RnRVRSgNR1hN emUI+0u8/dysowxaegZBsuMbbpgRmDbHaWDB8II07VT7Xq81Ivn+SiJZM4baRZGxNTPsI VMcTtysZUuX5SfInL1hkAqGysomy+inkyKI= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Bret Barkelew REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2612 Remove the FrameworkHandle parameter from the SaveFrameworkState interface in UnitTestLib Cc: Michael D Kinney Cc: Liming Gao Cc: Sean Brogan Cc: Bret Barkelew Signed-off-by: Guomin Jiang Reviewed-by: Bret Barkelew --- MdePkg/Include/Library/UnitTestLib.h | 4 ---- UnitTestFrameworkPkg/Library/UnitTestLib/RunTests.c | 2 +- .../Library/UnitTestLib/UnitTestLib.c | 13 +++++-------- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/MdePkg/Include/Library/UnitTestLib.h b/MdePkg/Include/Library/= UnitTestLib.h index c06c36bea5..38e4652959 100644 --- a/MdePkg/Include/Library/UnitTestLib.h +++ b/MdePkg/Include/Library/UnitTestLib.h @@ -315,9 +315,6 @@ FreeUnitTestFramework ( =20 Generally called from within a test case prior to quitting or rebooting. =20 - @param[in] FrameworkHandle A handle to the current running framework= that - dispatched the test. Necessary for recor= ding - certain test events with the framework. @param[in] ContextToSave A buffer of test case-specific data to be= saved along with framework state. Will be pass= ed as "Context" to the test case upon resume. = This @@ -338,7 +335,6 @@ FreeUnitTestFramework ( EFI_STATUS EFIAPI SaveFrameworkState ( - IN UNIT_TEST_FRAMEWORK_HANDLE FrameworkHandle, IN UNIT_TEST_CONTEXT ContextToSave OPTIONAL, IN UINTN ContextToSaveSize ); diff --git a/UnitTestFrameworkPkg/Library/UnitTestLib/RunTests.c b/UnitTest= FrameworkPkg/Library/UnitTestLib/RunTests.c index b053e04959..793335fd0f 100644 --- a/UnitTestFrameworkPkg/Library/UnitTestLib/RunTests.c +++ b/UnitTestFrameworkPkg/Library/UnitTestLib/RunTests.c @@ -162,7 +162,7 @@ RunAllTestSuites ( // // Save current state so if test is started again it doesn't have to run= . It will just report // - SaveFrameworkState (FrameworkHandle, NULL, 0); + SaveFrameworkState (NULL, 0); OutputUnitTestFrameworkReport (FrameworkHandle); =20 mFrameworkHandle =3D NULL; diff --git a/UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c b/UnitT= estFrameworkPkg/Library/UnitTestLib/UnitTestLib.c index b136992d99..9a701d1047 100644 --- a/UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c +++ b/UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c @@ -785,9 +785,6 @@ SerializeState ( =20 Generally called from within a test case prior to quitting or rebooting. =20 - @param[in] FrameworkHandle A handle to the current running framework= that - dispatched the test. Necessary for recor= ding - certain test events with the framework. @param[in] ContextToSave A buffer of test case-specific data to be= saved along with framework state. Will be pass= ed as "Context" to the test case upon resume. = This @@ -808,21 +805,21 @@ SerializeState ( EFI_STATUS EFIAPI SaveFrameworkState ( - IN UNIT_TEST_FRAMEWORK_HANDLE FrameworkHandle, IN UNIT_TEST_CONTEXT ContextToSave OPTIONAL, IN UINTN ContextToSaveSize ) { - EFI_STATUS Status; - UNIT_TEST_SAVE_HEADER *Header; + EFI_STATUS Status; + UNIT_TEST_FRAMEWORK_HANDLE FrameworkHandle; + UNIT_TEST_SAVE_HEADER *Header; =20 Header =3D NULL; + FrameworkHandle =3D GetActiveFrameworkHandle(); =20 // // First, let's not make assumptions about the parameters. // - if (FrameworkHandle =3D=3D NULL || - (ContextToSave !=3D NULL && ContextToSaveSize =3D=3D 0) || + if ((ContextToSave !=3D NULL && ContextToSaveSize =3D=3D 0) || ContextToSaveSize > MAX_UINT32) { return EFI_INVALID_PARAMETER; } --=20 2.25.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#57289): https://edk2.groups.io/g/devel/message/57289 Mute This Topic: https://groups.io/mt/73002350/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-