From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id A020D740032 for ; Wed, 24 Jan 2024 05:20:40 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=YJaKXVVIiJ9kQu/gNPDfClFyXphSknH7NIbCiIeplx4=; 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=1706073639; v=1; b=dgVy41q7BmGm4KFJQ+elve9wvRhtjo5Uvh7T48i+PVjRicVwnQuM1k6CBYj8/DENH4rV1xux it0Fw8C1yKyj7TPWxFfvurzGLYCdm5S7tHFCXXjglELaWXBqTr04JNhMznMME84191BsHHFc1zB F5kL3a17SkUmaxvLj+LzBooI= X-Received: by 127.0.0.2 with SMTP id O0tMYY7687511xRGrvEDBjj5; Tue, 23 Jan 2024 21:20:39 -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: U7zcz9uXE4sAyTuYDg7S2A5Wx7686176AA= 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-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=dgVy41q7; dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io This adds support for GetTime Google Test Mock Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Doug Flick [MSFT] --- .../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,=0D IN VOID *Data)=0D );=0D +=0D + MOCK_FUNCTION_DECLARATION (=0D + EFI_STATUS,=0D + gRT_GetTime,=0D + (OUT EFI_TIME *Time,=0D + OUT EFI_TIME_CAPABILITIES *Capabilities OPTIONAL)=0D + );=0D };=0D =0D #endif=0D 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); =0D MOCK_FUNCTION_DEFINITION (MockUefiRuntimeServicesTableLib, gRT_GetVariable= , 5, EFIAPI);=0D MOCK_FUNCTION_DEFINITION (MockUefiRuntimeServicesTableLib, gRT_SetVariable= , 5, EFIAPI);=0D +MOCK_FUNCTION_DEFINITION (MockUefiRuntimeServicesTableLib, gRT_GetTime, 2,= EFIAPI);=0D =0D static EFI_RUNTIME_SERVICES localRt =3D {=0D - { 0 }, // EFI_TABLE_HEADER=0D + { 0 }, // EFI_TABLE_HEADER=0D =0D - NULL, // EFI_GET_TIME=0D + gRT_GetTime, // EFI_GET_TIME=0D NULL, // EFI_SET_TIME=0D NULL, // EFI_GET_WAKEUP_TIME=0D NULL, // EFI_SET_WAKEUP_TIME=0D --=20 2.43.0 -=-=-=-=-=-=-=-=-=-=-=- 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/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-