From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (EUR05-VI1-obe.outbound.protection.outlook.com [40.107.21.60]) by mx.groups.io with SMTP id smtpd.web11.6533.1596720710526611947 for ; Thu, 06 Aug 2020 06:31:51 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=aIQxca9C; spf=pass (domain: arm.com, ip: 40.107.21.60, mailfrom: samer.el-haj-mahmoud@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ti3tWn3FbmqC+oz/E7VhFORkeg2QYAsLnQOuWNNiBys=; b=aIQxca9CZqSI9SQZPPMpDmCS2OP6Iy9LMkJ3VbZyVGLFpxl3d7IKN/q89YmCRaofMXig6Ht66FRqFLij7ALLWtdbumT8v9cAwdckwp6hWSV458IZJzJmEX1PBCgaqg13kCSe5sn7fcnoqF55a/ZKduknEa8gPQArJvwC1DDR5YQ= Received: from DB6P195CA0008.EURP195.PROD.OUTLOOK.COM (2603:10a6:4:cb::18) by AM6PR08MB3493.eurprd08.prod.outlook.com (2603:10a6:20b:4a::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.21; Thu, 6 Aug 2020 13:31:47 +0000 Received: from DB5EUR03FT025.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:cb:cafe::1) by DB6P195CA0008.outlook.office365.com (2603:10a6:4:cb::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.17 via Frontend Transport; Thu, 6 Aug 2020 13:31:47 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT025.mail.protection.outlook.com (10.152.20.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.16 via Frontend Transport; Thu, 6 Aug 2020 13:31:47 +0000 Received: ("Tessian outbound 195a290eb161:v64"); Thu, 06 Aug 2020 13:31:47 +0000 X-CR-MTA-TID: 64aa7808 Received: from e0c1800f2d70.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D0987762-0B6B-4F57-9D03-C1ACD1B45851.1; Thu, 06 Aug 2020 13:31:42 +0000 Received: from EUR02-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e0c1800f2d70.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 06 Aug 2020 13:31:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O7NHT0DNwmqXHr6vZ4biSUM4SN8ZmeVhXFLVBwnO5mh0f+ecYtqeiVBqU5MYt416wYOO7lVKo2F7475YBPr9VZ0SviNsjXkdktWEEa8ErFHkDS+HbBx0kb0gRFzNBTC7fQ6XZ3ui4xTXMFNkzRZscSCFTdv3ostMlRC+g2szscCw7aoem378zqU4x6SEEZN7M3gUcPrAaiFofE3u7yzmeyHH+UMtk5tLotRYZX0LqjUclNtrkYZ2rE/ctwx3hGYqq7HrdJTB2hTyDXq2KaXLPxSu2B0n/LceJHu3EQHiRdRxzUewI1VDcVjgmcG7ckqJNFLliZqSzrGq5N5Qt3yMPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ti3tWn3FbmqC+oz/E7VhFORkeg2QYAsLnQOuWNNiBys=; b=Hd7ezi4en28HA1bqMGvrvF1BN97zoo1uVXwLs5v5M/7gfxwGOCN/3qtbaLWw2Kkrpd5FqJW2spwaZfYgbolp8tt8hjOKUvA9owxCarLFYF3y/LnaSE6zDnNN/WsudFn9vc31/3pTW24Vi7tcqfJqNQGBnC6frSkyc/Xs5FmPojpvY8mNBTd9c62ygp0rAypUc69McHbKjHiXOZqQtuTii8HnX+itxBc99OpNRJ/YyXp70LCi+V1DzcVZ9wpBSIZAEdU9yvxJjBED8xMN6PyUuvemqOsrUqp/8Pglr7Gk75Apfr4/o2ixm9aiWmCh7fIuqUjXZUwLhONT9OP+A+tiuQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ti3tWn3FbmqC+oz/E7VhFORkeg2QYAsLnQOuWNNiBys=; b=aIQxca9CZqSI9SQZPPMpDmCS2OP6Iy9LMkJ3VbZyVGLFpxl3d7IKN/q89YmCRaofMXig6Ht66FRqFLij7ALLWtdbumT8v9cAwdckwp6hWSV458IZJzJmEX1PBCgaqg13kCSe5sn7fcnoqF55a/ZKduknEa8gPQArJvwC1DDR5YQ= Received: from DB7PR08MB3260.eurprd08.prod.outlook.com (2603:10a6:5:21::23) by DBAPR08MB5687.eurprd08.prod.outlook.com (2603:10a6:10:1b1::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.19; Thu, 6 Aug 2020 13:31:39 +0000 Received: from DB7PR08MB3260.eurprd08.prod.outlook.com ([fe80::88ec:d703:3e32:4c6b]) by DB7PR08MB3260.eurprd08.prod.outlook.com ([fe80::88ec:d703:3e32:4c6b%5]) with mapi id 15.20.3261.019; Thu, 6 Aug 2020 13:31:39 +0000 From: "Samer El-Haj-Mahmoud" To: Grant Likely , "devel@edk2.groups.io" CC: nd , G Edhaya Chandran , Heinrich Schuchardt , Samer El-Haj-Mahmoud Subject: Re: [PATCH] Check return status on calls to GetTime() Thread-Topic: [PATCH] Check return status on calls to GetTime() Thread-Index: AQHWZ17YLXagoSPCmEWGlvAB+ziKEqkn1XdQgANGV/A= Date: Thu, 6 Aug 2020 13:31:39 +0000 Message-ID: References: <20200731171949.15748-1-grant.likely@arm.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 74083b4d-bd18-4592-ac08-aea0cf193e81.1 x-checkrecipientchecked: true Authentication-Results-Original: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; x-originating-ip: [217.140.111.135] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 9ea7e42a-8f0e-4261-c483-08d83a0d1173 x-ms-traffictypediagnostic: DBAPR08MB5687:|AM6PR08MB3493: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:741;OLM:741; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: drPAxr/2ZayquFq6YQ4WxsLzTiUeTXzN1fblYRYliA4tTiOwgtk/ySJUjqXHgbpsaOJoeoXREI4ZxWodRYWuT5erDS8fTJa0/RRz8OeoQl6j/Cv6kIeNiaO9Gxf95/tgFWDUsZiKxLyHfL3Ie7j/9wgzpUZsCaWDijrjd41jldXNdIuyaqVLRnfS0mAfWRka7RVzRRKaSN/tPn3W8MSpd0qj39KMFJWK+owIjbqGQZCuBX5sfGh4ZrV/+9LnwwR2fdNlfBket7jt7WYIbfF7r8ZR1hN10qxCJ4fiZ2s8Caqw58VbU8f+77YCHrQVzipPVxiUNJaCFuMEuPiIwYmcjIYUyl7PI2QCjN8cDnWzzwFkCKnTNOJ/z05TwWucac/AHdfm1sPRVqHFVbz/n2HCTQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR08MB3260.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(346002)(39860400002)(136003)(396003)(376002)(366004)(7696005)(478600001)(8676002)(966005)(30864003)(76116006)(66946007)(2906002)(52536014)(6506007)(66476007)(64756008)(5660300002)(66446008)(53546011)(66556008)(186003)(71200400001)(26005)(8936002)(4326008)(86362001)(110136005)(54906003)(33656002)(316002)(83380400001)(55016002)(9686003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: pk4U0hugq3d6uSKJgueobgB1Rw5nfwLA1OST+SjOVvQOSHrwQ20qpXzv587LDqUoynP56lA86EPC2jOrni5FXGV80mzvPmuDtXr7qXgXvSYhz+7oRob+Dyzm/w+xErBdJPTG//8EH3TjS3H9/a/8Q13Rv6qjzQh6dY9IG4RNn4DUnrsT8XIa7RX7mMRo3UR4dsy630oN269jnFs7brPADGHvAE31bGXir9gBsTe5XBplIVowV607fqZt2E7V//m/iSLbCDe1AlKO9DW7dNBOttSXB+eiS7BoKKuE0AOTuNbtVXtPtOCKhuD75Dky1rCsz+Duvvt7ySCbrHOGPIrzqxE6eYX9Znx9ZIzUUm+zbYi+XoZYmD5BDxPA/Fm3PJiDxe7b70NkvKrzv8fzn/9B2QaHvjcvcUwwNreVBJigeJmynZEuh8QM3PTIkjPTi8WKAOF4MOaUivG7HeLbou9KoExjEO1cUX5DIRURWlilNC5F3rK17OooX3DpchsdPqQpu0PqXUO3cV/5NBTXfzgPwQcctSIvwJoVzgXpUhrC/aFM/2Cw/UfW6ELeVFHC5aOpCUJiIuNvAS8GDuyXsFN9xdJ4JE2gG7PfoADRdxUTqIyH1zC+pKZ0jSo4VemLbCNV1u8Ruv73DMqGoiCorlvlig== MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR08MB5687 Original-Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Return-Path: Samer.El-Haj-Mahmoud@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT025.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: f75e77e6-1e69-4b54-5e76-08d83a0d0caf X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qTTAVKpCB1gW0tA8g+Os20rsNmw1Tf+DmHCBk6aqSFYl3yUPws7U2uwxJY3H8UWDIqUE2uZHFxVfQDpyp/Tttc1WZGq9MVcMz5N2mlpYv/YA2Pk6v76UQv2VkjTGs1DWTEsZGwfIZ6iLvRvMURxmG355Nf1cOY1ZON9v7UYMSUDPJjgN+0EN1cpExLo6bF5wgD/7Y28Mx8t68FxGSTmjp6uTJP0F6eyYXJ+bLpiQ/Gm22jr7gs+BXjf2MmDL9VrFBqIJf61jawz9MRNLA/MDHCiMjYJMx2+xOeNekDcAkdhk/8AbszW6DW3RLrj8MLbL1Ci1+Ypwy9ZlqjC/Fpocrjc/wsPWorPGEv5dlgzlyj6MKQf3X25wfffb/LDuBWhSznC3OKprW9VWjvdjf513Miv5ApZHN//ElBrmkCHD1my8GOtyJleqyLb87TU+mcZgTlvEmdSA3q+TLxKuF4KpGvJ0TmQ2mRupozq02npYw3I= X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFTY:;SFS:(4636009)(39860400002)(346002)(396003)(376002)(136003)(46966005)(966005)(70586007)(70206006)(52536014)(8936002)(5660300002)(6506007)(53546011)(55016002)(7696005)(2906002)(110136005)(316002)(30864003)(478600001)(86362001)(4326008)(186003)(26005)(82740400003)(83380400001)(356005)(82310400002)(54906003)(33656002)(8676002)(336012)(47076004)(9686003)(81166007);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Aug 2020 13:31:47.4630 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9ea7e42a-8f0e-4261-c483-08d83a0d1173 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT025.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3493 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable One issue here is that UEFI 2.8 spec language around allowing runtime servi= ces (like GetTime() ) to return EFI_UNSUPPORTED is a bit vague: "" EFI_UNSUPPORTED This call is not supported by this platform at the time the call is made. T= he platform should describe this runtime service as unsupported at runtime = via an EFI_RT_PROPERTIES_TABLE configuration table. "" The "at the time the call is made" language may be interpreted as the servi= ce is allowed to return EFI_UNSUPPORTED anytime (before or after ExitBootSe= rvices() ). But the next sentence (about declaring the unsupported at runti= me) make it sounds like this is restricted to only being at runtime. While = the use case makes sense, we may need some clarification in the UEFI spec l= anguage to make this clear. Otherwise, callers (like SCT) may assume the fu= nction is always supported. > -----Original Message----- > From: Samer El-Haj-Mahmoud > Sent: Tuesday, August 4, 2020 7:27 AM > To: Grant Likely ; devel@edk2.groups.io > Cc: nd ; G Edhaya Chandran ; > Heinrich Schuchardt ; Samer El-Haj-Mahmoud > > Subject: RE: [PATCH] Check return status on calls to GetTime() >=20 > Reviewed-by: Samer El-Haj-Mahmoud >=20 > > -----Original Message----- > > From: Grant Likely > > Sent: Friday, July 31, 2020 1:20 PM > > To: devel@edk2.groups.io > > Cc: nd ; Grant Likely ; G Edhaya > > Chandran ; Heinrich Schuchardt > > ; Samer El-Haj-Mahmoud > Mahmoud@arm.com> > > Subject: [PATCH] Check return status on calls to GetTime() > > > > Not all platforms implement GetTime(), but the SCT just assumes calls > > to GetTime will be successful. If GetTime() doesn't return > > EFI_SUCCESS, then the EFI_TIME value will be uninitialized data. > > > > Fix by checking the GetTime() return code. If it doesn't return > > EFI_SUCCESS, then use the traditional 1/1/1970 epoch so that the test > > report at least looks sane, but it is obvious that we don't have a vali= d > timestamp. > > > > Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2870 > > > > Cc: G Edhaya Chandran > > Cc: Heinrich Schuchardt > > Cc: Samer El-Haj-Mahmoud > > Signed-off-by: Grant Likely > > --- > > .../SimpleNetwork/SimpleNetworkENTSTestCase.c | 26 +++++++++++++---- > > -- > > .../MiscBootServicesBBTestFunction.c | 8 ++++-- > > .../DriverBindingBBTestFunction.c | 5 +++- > > .../SCT/Drivers/StandardTest/StandardTest.c | 11 +++++--- > > .../Framework/ENTS/EasDispatcher/Core/Eas.c | 9 +++++-- > > .../ENTS/EasDispatcher/Exec/EasCmdDisp.c | 20 +++++++++----- > > 6 files changed, 57 insertions(+), 22 deletions(-) > > > > diff --git a/uefi- > > sct/SctPkg/TestCase/RIVL/Protocol/SimpleNetwork/SimpleNetworkENTSTes > > tCase.c b/uefi- > > sct/SctPkg/TestCase/RIVL/Protocol/SimpleNetwork/SimpleNetworkENTSTes > > tCase.c > > index 9c8d2a70..5579be7e 100644 > > --- a/uefi- > > sct/SctPkg/TestCase/RIVL/Protocol/SimpleNetwork/SimpleNetworkENTSTes > > tCase.c > > +++ b/uefi- > > sct/SctPkg/TestCase/RIVL/Protocol/SimpleNetwork/SimpleNetwork > > +++ ENTSTestCase.c > > @@ -24,6 +24,8 @@ Abstract: > > > > #include "SimpleNetworkENTSTestCase.h" > > > > +static EFI_TIME Epoch =3D { .Year =3D 1970, .Month =3D 1, .Day =3D 1 }= ; > > + > > // > > // SimpleNetwork.Start > > // > > @@ -928,7 +930,8 @@ Returns: > > Status =3D EFI_SUCCESS; > > tBS->Stall (5000); > > > > - tRT->GetTime (&BeginTime, NULL); > > + if (tRT->GetTime (&BeginTime, NULL) !=3D EFI_SUCCESS) > > + BeginTime =3D Epoch; > > for (Index =3D 0; Index < 1;) { > > Status =3D SimpleNetwork->Transmit ( > > SimpleNetwork, @@ -964,7 +967,8 @@ Retur= ns: > > } > > } > > > > - tRT->GetTime (&BeginTime, NULL); > > + if (tRT->GetTime (&BeginTime, NULL) !=3D EFI_SUCCESS) > > + BeginTime =3D Epoch; > > > > for (Index =3D 1; Index < TransmitPattern1Number;) { > > Status =3D SimpleNetwork->Transmit ( @@ -1002,7 +1006,8 @@ Returns= : > > } > > > > End: > > - tRT->GetTime (&EndTime, NULL); > > + if (tRT->GetTime (&EndTime, NULL) !=3D EFI_SUCCESS) > > + EndTime =3D Epoch; > > > > *TransmitPattern1Status =3D Status; > > > > @@ -1125,7 +1130,8 @@ Returns: > > Status =3D EFI_SUCCESS; > > tBS->Stall (5000); > > > > - tRT->GetTime (&BeginTime, NULL); > > + if (tRT->GetTime (&BeginTime, NULL) !=3D EFI_SUCCESS) > > + BeginTime =3D Epoch; > > for (Index =3D 0; Index < 1;) { > > Status =3D SimpleNetwork->Transmit ( > > SimpleNetwork, @@ -1161,7 +1167,8 @@ Ret= urns: > > } > > } > > > > - tRT->GetTime (&BeginTime, NULL); > > + if (tRT->GetTime (&BeginTime, NULL) !=3D EFI_SUCCESS) > > + BeginTime =3D Epoch; > > > > for (Index =3D 1; Index < TransmitPattern2Number;) { > > Status =3D SimpleNetwork->Transmit ( @@ -1199,7 +1206,8 @@ Returns= : > > } > > > > End: > > - tRT->GetTime (&EndTime, NULL); > > + if (tRT->GetTime (&EndTime, NULL) !=3D EFI_SUCCESS) > > + EndTime =3D Epoch; > > > > *TransmitPattern1Status =3D Status; > > > > @@ -1326,7 +1334,8 @@ Returns: > > } > > } > > > > - tRT->GetTime (&BeginTime, NULL); > > + if (tRT->GetTime (&BeginTime, NULL) !=3D EFI_SUCCESS) > > + BeginTime =3D Epoch; > > > > for (Index =3D 1; Index < ReceivePattern1Number;) { > > *ReceivePattern1BufferSize =3D BufferSizeOrg; @@ -1346,7 +1355,8 @= @ > > Returns: > > } > > } > > > > - tRT->GetTime (&EndTime, NULL); > > + if (tRT->GetTime (&EndTime, NULL) !=3D EFI_SUCCESS) > > + EndTime =3D Epoch; > > > > *ReceivePattern1Status =3D Status; > > > > diff --git a/uefi- > > sct/SctPkg/TestCase/UEFI/EFI/BootServices/MiscBootServices/BlackBoxTes > > t /MiscBootServicesBBTestFunction.c b/uefi- > > sct/SctPkg/TestCase/UEFI/EFI/BootServices/MiscBootServices/BlackBoxTes > > t > > /MiscBootServicesBBTestFunction.c > > index 1d231d8c..3a530282 100644 > > --- a/uefi- > > sct/SctPkg/TestCase/UEFI/EFI/BootServices/MiscBootServices/BlackBoxTes > > t > > /MiscBootServicesBBTestFunction.c > > +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/BootServices/MiscBootServices/ > > +++ Bl ackBoxTest/MiscBootServicesBBTestFunction.c > > @@ -27,6 +27,8 @@ Abstract: > > #include "SctLib.h" > > #include "MiscBootServicesBBTestMain.h" > > > > +static EFI_TIME Epoch =3D { .Year =3D 1970, .Month =3D 1, .Day =3D 1 }= ; > > + > > /** > > * Entrypoint for gtBS->SetWatchdogTimer() Interface Test. > > * @param This a pointer of EFI_BB_TEST_PROTOCOL. > > @@ -821,13 +823,15 @@ BBTestStallInterfaceTest ( > > // > > // 4.2.2.1 Stall must succeed. > > // > > - gtRT->GetTime (&StartTime, NULL); > > + if (gtRT->GetTime (&StartTime, NULL) !=3D EFI_SUCCESS) > > + StartTime =3D Epoch; > > OldTpl =3D gtBS->RaiseTPL (TplArray[Index]); > > Status =3D gtBS->Stall ( > > 10000000 > > ); > > gtBS->RestoreTPL (OldTpl); > > - gtRT->GetTime (&EndTime, NULL); > > + if (gtRT->GetTime (&EndTime, NULL) !=3D EFI_SUCCESS) > > + EndTime =3D Epoch; > > if (Status =3D=3D EFI_SUCCESS) { > > AssertionType =3D EFI_TEST_ASSERTION_PASSED; > > } else { > > diff --git a/uefi- > > sct/SctPkg/TestCase/UEFI/IHV/Protocol/DriverBinding/BlackBoxTest/Drive > > rB > > indingBBTestFunction.c b/uefi- > > sct/SctPkg/TestCase/UEFI/IHV/Protocol/DriverBinding/BlackBoxTest/Drive > > rB > > indingBBTestFunction.c > > index bf675feb..4ab52dcd 100644 > > --- a/uefi- > > sct/SctPkg/TestCase/UEFI/IHV/Protocol/DriverBinding/BlackBoxTest/Drive > > rB > > indingBBTestFunction.c > > +++ b/uefi-sct/SctPkg/TestCase/UEFI/IHV/Protocol/DriverBinding/BlackBo > > +++ xT > > +++ est/DriverBindingBBTestFunction.c > > @@ -36,6 +36,8 @@ static const UINTN MonthLengths[2][12] =3D { > > { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } }; > > > > +static EFI_TIME Epoch =3D { .Year =3D 1970, .Month =3D 1, .Day =3D 1 }= ; > > + > > #define MINS_PER_HOUR 60 > > #define HOURS_PER_DAY 24 > > #define SECS_PER_MIN 60 > > @@ -1052,7 +1054,8 @@ EndLogging ( > > WriteLogFile (Private, DashLine, SYSTEMLOG); > > WriteLogFile (Private, DashLine, CASELOG); > > > > - gtRT->GetTime (&CurrentTime, NULL); > > + if (gtRT->GetTime (&CurrentTime, NULL) !=3D EFI_SUCCESS) > > + CurrentTime =3D Epoch; > > DBSPrint (Buffer, EFI_MAX_PRINT_BUFFER, L"Test Finished: %t\n", > > &CurrentTime); > > > > WriteLogFile (Private, Buffer, SYSTEMLOG); diff --git a/uefi- > > sct/SctPkg/TestInfrastructure/SCT/Drivers/StandardTest/StandardTest.c > > b/uefi- > > sct/SctPkg/TestInfrastructure/SCT/Drivers/StandardTest/StandardTest.c > > index 84025457..836f072a 100644 > > --- a/uefi- > > sct/SctPkg/TestInfrastructure/SCT/Drivers/StandardTest/StandardTest.c > > +++ b/uefi-sct/SctPkg/TestInfrastructure/SCT/Drivers/StandardTest/Stan > > +++ da > > +++ rdTest.c > > @@ -30,6 +30,8 @@ Abstract: > > #include "StandardTest.h" > > #include > > > > +static EFI_TIME Epoch =3D { .Year =3D 1970, .Month =3D 1, .Day =3D 1 }= ; > > + > > // > > // Prototypes > > // > > @@ -1081,7 +1083,8 @@ Returns: > > StslWriteLogFile (Private, Buffer); > > > > CurrentTime =3D &Private->StartTime; > > - tRT->GetTime (CurrentTime, NULL); > > + if (tRT->GetTime (CurrentTime, NULL) !=3D EFI_SUCCESS) > > + *CurrentTime =3D Epoch; > > > > } else { > > StslWriteLogFile (Private, DashLine); @@ -1118,7 +1121,8 @@ Return= s: > > > > StslWriteLogFileName (Private); > > CurrentTime =3D &Private->StartTime; > > - tRT->GetTime (CurrentTime, NULL); > > + if (tRT->GetTime (CurrentTime, NULL) !=3D EFI_SUCCESS) > > + *CurrentTime =3D Epoch; > > SctSPrint (Buffer, EFI_MAX_PRINT_BUFFER, L"Test Started: %t\n", > > CurrentTime); > > StslWriteLogFile (Private, Buffer); > > > > @@ -1238,7 +1242,8 @@ Returns: > > > > StslWriteLogFileName (Private); > > > > - tRT->GetTime (&CurrentTime, NULL); > > + if (tRT->GetTime (&CurrentTime, NULL) !=3D EFI_SUCCESS) > > + CurrentTime =3D Epoch; > > > > SecondsElapsed =3D SecondsElapsedFromBaseYear ( > > Private->StartTime.Year, diff --git a/uefi- > > sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasDispatcher/Core/Ea > > s.c b/uefi- > > sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasDispatcher/Core/Ea > > s.c > > index 28f5ed4a..60b1c4dc 100644 > > --- a/uefi- > > sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasDispatcher/Core/Ea > > s.c > > +++ b/uefi- > > sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasDispatche > > +++ r/Core/Eas.c > > @@ -23,9 +23,12 @@ Abstract: > > --*/ > > > > > > +#include "Sct.h" > > #include "Sct.h" > > #include EFI_TEST_PROTOCOL_DEFINITION (EntsMonitorProtocol) > > > > +static EFI_TIME Epoch =3D { .Year =3D 1970, .Month =3D 1, .Day =3D 1 }= ; > > + > > STATIC > > EFI_STATUS > > AgentTestMain ( > > @@ -310,7 +313,8 @@ DelaySctAgentCmdPost ( > > } > > SctAgentCmdDelayedPost->CmdReturn =3D CmdReturn; > > SctAgentCmdDelayedPost->Cmd.ComdResult =3D CmdResult; > > - tRT->GetTime (&SctAgentCmdDelayedPost->StartTime, NULL); > > + if (tRT->GetTime (&SctAgentCmdDelayedPost->StartTime, NULL) !=3D > > EFI_SUCCESS) > > + SctAgentCmdDelayedPost->StartTime =3D Epoch; > > > > return Status; > > } > > @@ -327,7 +331,8 @@ PostSctAgentDelayedCmd ( > > return EFI_SUCCESS; > > } > > > > - tRT->GetTime (&SctAgentCmdDelayedPost->EndTime, NULL); > > + if (tRT->GetTime (&SctAgentCmdDelayedPost->EndTime, NULL) !=3D > > EFI_SUCCESS) > > + SctAgentCmdDelayedPost->EndTime =3D Epoch; > > > > Status =3D RecordMessage ( > > &SctAgentCmdDelayedPost->Cmd.ComdRuntimeInfo, > > diff --git a/uefi- > > sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasDispatcher/Exec/Ea > > sCmdDisp.c b/uefi- > > sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasDispatcher/Exec/Ea > > sCmdDisp.c > > index 1ff6d569..cb6f08cf 100644 > > --- a/uefi- > > sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasDispatcher/Exec/Ea > > sCmdDisp.c > > +++ b/uefi- > > sct/SctPkg/TestInfrastructure/SCT/Framework/ENTS/EasDispatche > > +++ r/Exec/EasCmdDisp.c > > @@ -50,6 +50,8 @@ Abstract: > > > > EFI_CPU_ARCH_PROTOCOL *Cpu =3D NULL; > > > > +static EFI_TIME Epoch =3D { .Year =3D 1970, .Month =3D 1, .Day =3D 1 }= ; > > + > > // > > // Local Function Definition > > // > > @@ -132,9 +134,11 @@ Returns: > > // > > // Perform EFTP operation. > > // > > - tRT->GetTime (&StartTime, NULL); > > + if (tRT->GetTime (&StartTime, NULL) !=3D EFI_SUCCESS) > > + StartTime =3D Epoch; > > Status =3D EftpDispatchFileTransferComd (FileCmdType); > > - tRT->GetTime (&EndTime, NULL); > > + if (tRT->GetTime (&EndTime, NULL) !=3D EFI_SUCCESS) > > + EndTime =3D Epoch; > > > > if (Status =3D=3D EFI_OUT_OF_RESOURCES) { > > return EFI_OUT_OF_RESOURCES; > > @@ -365,9 +369,11 @@ Returns: > > // > > // Execute Shell Command > > // > > - tRT->GetTime (&StartTime, NULL); > > + if (tRT->GetTime (&StartTime, NULL) !=3D EFI_SUCCESS) > > + StartTime =3D Epoch; > > Status =3D SctShellExecute (&mImageHandle, (gEasFT->Cmd)->ComdArg, > > FALSE, NULL, NULL);; > > - tRT->GetTime (&EndTime, NULL); > > + if (tRT->GetTime (&EndTime, NULL) !=3D EFI_SUCCESS) > > + EndTime =3D Epoch; > > EFI_ENTS_DEBUG ((EFI_ENTS_D_TRACE, L"dispatch:(%s)", (gEasFT->Cmd)- > > >ComdArg)); > > SctPrint (L"dispatch:(%s) - %r\n", (gEasFT->Cmd)->ComdArg, Status); > > if (Status =3D=3D EFI_OUT_OF_RESOURCES) { @@ -1483,9 +1489,11 @@ > > Returns: > > // > > // Resume SCT execution by executing "sct -c" in sct passive mode. > > // > > - tRT->GetTime (&StartTime, NULL); > > + if (tRT->GetTime (&StartTime, NULL) !=3D EFI_SUCCESS) > > + StartTime =3D Epoch; > > Status =3D SctShellExecute (&mImageHandle, (gEasFT->Cmd)->ComdArg, > > FALSE, NULL, NULL);; > > - tRT->GetTime (&EndTime, NULL); > > + if (tRT->GetTime (&EndTime, NULL) !=3D EFI_SUCCESS) > > + EndTime =3D Epoch; > > EFI_ENTS_DEBUG ((EFI_ENTS_D_TRACE, L"dispatch:(%s)", (gEasFT->Cmd)- > > >ComdArg)); > > SctPrint (L"dispatch:(%s) - %r\n", (gEasFT->Cmd)->ComdArg, Status); > > if (Status =3D=3D EFI_OUT_OF_RESOURCES) { > > -- > > 2.20.1