From nobody Fri Oct 18 08:37:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+114263+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+114263+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1706073636; cv=none; d=zohomail.com; s=zohoarc; b=KXZatvTKBAfHfJJ91M64ENu3Fx0HAldQ+SY2R4+qdtSKSlf4qCMO5sILxqvnEzcxeMbHjRhHC/mPjhL+95cxJLfP2HDhOv7xZmHcf/TwjGhTs8+un7492ucKzzcHZrGqEWTV+T4d5sgyLgepX7O05tFXmXKySsLY7uLYIrYE6Ww= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706073636; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=nI1G2OQ9td+OObPukBCnYvfRx4jedC878wwImq5Ag5A=; b=U9Db5U66AsP2QApNzINZKC4OgZbjqUm8nzmQnrnd40sjVmy06zbWC6wui9vXKxg9di1nWI71DJ+h0oTLtJR6Xe7g/DKdd6ZkSvH2CfkOoPOWtdbCDPZGERl1HmXUhF85olzSlmz7bK+jANHPHzBxzjow684SHijCTie5MD7QIZ0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+114263+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1706073636720123.92814093286381; Tue, 23 Jan 2024 21:20:36 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=X3pfKuprR3Jn379vaHp2Wvgerz6rrLMLkO4zExPLuAU=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1706073636; v=1; b=iTxe8xONFXDqef1MwtgWncfDLqqn0lW4h03BbUo9Qwzt9F8nHKcX/PJ8vf47ru7T+5PsxS+l mCurYDIfu5ZYt1rnVILaG/8bpnjNup5Bsel/bokiK2NlCp6DXiOXF13uu+QXV7CtiyV9vZCKMiF 8Rt9gUlxdyC0e6jCMtm7k3KM= X-Received: by 127.0.0.2 with SMTP id FCi7YY1788612xSd8qBXTp6U; Tue, 23 Jan 2024 21:20:36 -0800 X-Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by mx.groups.io with SMTP id smtpd.web11.16110.1706073635766037587 for ; Tue, 23 Jan 2024 21:20:35 -0800 X-Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-1d71e184695so19838265ad.3 for ; Tue, 23 Jan 2024 21:20:35 -0800 (PST) X-Gm-Message-State: aKLYhq28wS984crP4YNz21X3x1787277AA= X-Google-Smtp-Source: AGHT+IHatw7kHpg5y8Bmht5Ai2Kj5TtANlHbl6OlGg77QvOjdoSORDPSCtMAXBpJQwEyFtHpy73cAg== X-Received: by 2002:a17:902:e80d:b0:1d7:4e9a:b415 with SMTP id u13-20020a170902e80d00b001d74e9ab415mr227205plg.127.1706073634774; Tue, 23 Jan 2024 21:20:34 -0800 (PST) X-Received: from localhost.localdomain ([24.17.138.83]) by smtp.gmail.com with ESMTPSA id w2-20020a170902c78200b001d71f10aa42sm7831709pla.11.2024.01.23.21.20.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 21:20:34 -0800 (PST) From: "Doug Flick via groups.io" To: devel@edk2.groups.io Cc: "Douglas Flick [MSFT]" , Michael D Kinney , Liming Gao , Zhiguang Liu Subject: [edk2-devel] [PATCH 11/14] MdePkg: Test: Add gRT_GetTime Google Test Mock Date: Tue, 23 Jan 2024 19:33:34 -0800 Message-ID: In-Reply-To: References: MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: 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,dougflick@microsoft.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1706073638336100043 Content-Type: text/plain; charset="utf-8" This adds support for GetTime Google Test Mock Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Doug Flick [MSFT] Reviewed-by: Michael D Kinney --- .../GoogleTest/Library/MockUefiRuntimeServicesTableLib.h | 7 +++++++ .../MockUefiRuntimeServicesTableLib.cpp | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/MdePkg/Test/Mock/Include/GoogleTest/Library/MockUefiRuntimeSer= vicesTableLib.h b/MdePkg/Test/Mock/Include/GoogleTest/Library/MockUefiRunti= meServicesTableLib.h index 241abc55c079..bcc902cb93c2 100644 --- a/MdePkg/Test/Mock/Include/GoogleTest/Library/MockUefiRuntimeServicesTa= bleLib.h +++ b/MdePkg/Test/Mock/Include/GoogleTest/Library/MockUefiRuntimeServicesTa= bleLib.h @@ -37,6 +37,13 @@ struct MockUefiRuntimeServicesTableLib { IN UINTN DataSize, IN VOID *Data) ); + + MOCK_FUNCTION_DECLARATION ( + EFI_STATUS, + gRT_GetTime, + (OUT EFI_TIME *Time, + OUT EFI_TIME_CAPABILITIES *Capabilities OPTIONAL) + ); }; =20 #endif diff --git a/MdePkg/Test/Mock/Library/GoogleTest/MockUefiRuntimeServicesTab= leLib/MockUefiRuntimeServicesTableLib.cpp b/MdePkg/Test/Mock/Library/Google= Test/MockUefiRuntimeServicesTableLib/MockUefiRuntimeServicesTableLib.cpp index 14296b0ccb88..8d2afd5dd63a 100644 --- a/MdePkg/Test/Mock/Library/GoogleTest/MockUefiRuntimeServicesTableLib/M= ockUefiRuntimeServicesTableLib.cpp +++ b/MdePkg/Test/Mock/Library/GoogleTest/MockUefiRuntimeServicesTableLib/M= ockUefiRuntimeServicesTableLib.cpp @@ -10,11 +10,12 @@ MOCK_INTERFACE_DEFINITION (MockUefiRuntimeServicesTable= Lib); =20 MOCK_FUNCTION_DEFINITION (MockUefiRuntimeServicesTableLib, gRT_GetVariable= , 5, EFIAPI); MOCK_FUNCTION_DEFINITION (MockUefiRuntimeServicesTableLib, gRT_SetVariable= , 5, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockUefiRuntimeServicesTableLib, gRT_GetTime, 2,= EFIAPI); =20 static EFI_RUNTIME_SERVICES localRt =3D { - { 0 }, // EFI_TABLE_HEADER + { 0 }, // EFI_TABLE_HEADER =20 - NULL, // EFI_GET_TIME + gRT_GetTime, // EFI_GET_TIME NULL, // EFI_SET_TIME NULL, // EFI_GET_WAKEUP_TIME NULL, // EFI_SET_WAKEUP_TIME --=20 2.43.0 -=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 (#114263): https://edk2.groups.io/g/devel/message/114263 Mute This Topic: https://groups.io/mt/103926742/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-