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 ACE83D81164 for ; Thu, 25 Jan 2024 23:06:41 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Ay4RpiRzJDs1fNJNCyS7ZBX3GfWg6XdWoc4FYkC+RN4=; 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=1706224000; v=1; b=oGYyr3rDOqQI8izjpHzzPT/CCzRS/STnLQTHFf5t74DfSoay9s5bzfuLzdVb+25S3j2L9SZD SXF4Y5tqhPFdknmOlFwj9Ng+uENXk0tVKuth1xvSOf158DC3fxxVpXGD4nFe0Q+HVSIkfZFYcYc l/WUEAZR6CDMLZleUf1YZ3jU= X-Received: by 127.0.0.2 with SMTP id 2TL2YY7687511xCtC0XfrtNh; Thu, 25 Jan 2024 15:06:40 -0800 X-Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) by mx.groups.io with SMTP id smtpd.web11.788.1706223997749321651 for ; Thu, 25 Jan 2024 15:06:37 -0800 X-Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1d75ea3a9b6so40725515ad.2 for ; Thu, 25 Jan 2024 15:06:37 -0800 (PST) X-Gm-Message-State: GDs0P4kcoFE9yCL9G7whL803x7686176AA= X-Google-Smtp-Source: AGHT+IFugyihaW5RSXBBuG8L2nF+Htb57GTLysySIP4PylNPA89nvNd1kynpmJdo5qITx0jjvSWYPw== X-Received: by 2002:a17:902:b418:b0:1d4:5a7d:21ce with SMTP id x24-20020a170902b41800b001d45a7d21cemr418645plr.40.1706223997119; Thu, 25 Jan 2024 15:06:37 -0800 (PST) X-Received: from localhost.localdomain ([24.17.138.83]) by smtp.gmail.com with ESMTPSA id jh1-20020a170903328100b001d752c4f180sm16779plb.94.2024.01.25.15.06.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 15:06:36 -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 v2 12/15] MdePkg: Test: Add gRT_GetTime Google Test Mock Date: Thu, 25 Jan 2024 13:54:54 -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=oGYyr3rD; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=none 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 (#114474): https://edk2.groups.io/g/devel/message/114474 Mute This Topic: https://groups.io/mt/103964988/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-