From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web11.1611.1582176113281153341 for ; Wed, 19 Feb 2020 21:21:53 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: liming.gao@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Feb 2020 21:21:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,462,1574150400"; d="scan'208";a="224744434" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga007.jf.intel.com with ESMTP; 19 Feb 2020 21:21:52 -0800 Received: from shsmsx603.ccr.corp.intel.com (10.109.6.143) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 19 Feb 2020 21:21:52 -0800 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by SHSMSX603.ccr.corp.intel.com (10.109.6.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 20 Feb 2020 13:21:50 +0800 Received: from shsmsx606.ccr.corp.intel.com ([10.109.6.216]) by SHSMSX606.ccr.corp.intel.com ([10.109.6.216]) with mapi id 15.01.1713.004; Thu, 20 Feb 2020 13:21:50 +0800 From: "Liming Gao" To: "devel@edk2.groups.io" , "gaurav.jain@nxp.com" , Leif Lindholm , Ard Biesheuvel CC: Pankaj Bansal Subject: Re: [EXT] RE: [edk2-devel] [PATCH v2 1/1] EmbeddedPkg: Fixed Asserts in SCT Runtime Services test. Thread-Topic: [EXT] RE: [edk2-devel] [PATCH v2 1/1] EmbeddedPkg: Fixed Asserts in SCT Runtime Services test. Thread-Index: AQHV5imnlBVdcfRqe0O6gDNvM5DiAKgiOdMAgADOSACAAIZRUA== Date: Thu, 20 Feb 2020 05:21:49 +0000 Message-ID: <0a030ae6b7bc44bfbcd12d5736f19575@intel.com> References: <20200218122354.17591-1-gaurav.jain@nxp.com> <348c0fde5e8b4c0db25526eb69a27743@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-product: dlpe-windows dlp-reaction: no-action x-originating-ip: [10.239.127.36] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Gaurav:=20 Got it.=20 Lefi and Ard: Can you review this patch for stable tag 202002? Thanks Liming > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Gaurav Ja= in > Sent: Thursday, February 20, 2020 1:19 PM > To: Gao, Liming ; devel@edk2.groups.io > Cc: Leif Lindholm ; Ard Biesheuvel ; Pankaj Bansal > Subject: Re: [EXT] RE: [edk2-devel] [PATCH v2 1/1] EmbeddedPkg: Fixed As= serts in SCT Runtime Services test. >=20 > > Gaurav: > > Does this patch catch to edk2 stable tag 202002? > Yes >=20 > Thanks > Gaurav >=20 > > -----Original Message----- > > From: Gao, Liming > > Sent: Wednesday, February 19, 2020 2:36 PM > > To: devel@edk2.groups.io; Gaurav Jain > > Cc: Leif Lindholm ; Ard Biesheuvel > > ; Pankaj Bansal > > Subject: [EXT] RE: [edk2-devel] [PATCH v2 1/1] EmbeddedPkg: Fixed Asse= rts in > > SCT Runtime Services test. > > > > Caution: EXT Email > > > > Gaurav: > > Does this patch catch to edk2 stable tag 202002? > > > > Thanks > > Liming > > > -----Original Message----- > > > From: devel@edk2.groups.io On Behalf Of Gaura= v > > > Jain > > > Sent: Tuesday, February 18, 2020 8:24 PM > > > To: devel@edk2.groups.io > > > Cc: Leif Lindholm ; Ard Biesheuvel > > > ; Pankaj Bansal ; > > > Gaurav Jain > > > Subject: [edk2-devel] [PATCH v2 1/1] EmbeddedPkg: Fixed Asserts in S= CT > > Runtime Services test. > > > > > > ASSERT in SetTime_Conf and SetWakeupTime_Conf Consistency Test. > > > SCT Test expect return as Invalid Parameter. > > > So removed ASSERT(). > > > > > > Added Time Validity Checks in SetWakeupTime. > > > > > > Signed-off-by: Gaurav Jain > > > --- > > > Changes in v2: > > > - reverted changes related to valid range of years. > > > --- > > > EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c | 8 ++++---- > > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > > > diff --git a/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c > > > b/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c > > > index 08fb9b0100b6..70a0d78125b9 100644 > > > --- a/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c > > > +++ b/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c > > > @@ -85,10 +85,6 @@ IsDayValid ( > > > IN EFI_TIME *Time > > > ) > > > { > > > - ASSERT (Time->Day >=3D 1); > > > - ASSERT (Time->Day <=3D mDayOfMonth[Time->Month - 1]); > > > - ASSERT (Time->Month !=3D 2 || IsLeapYear (Time) || Time->Day <=3D= 28); > > > - > > > if (Time->Day < 1 || > > > Time->Day > mDayOfMonth[Time->Month - 1] || > > > (Time->Month =3D=3D 2 && !IsLeapYear (Time) && Time->Day > 28= )) { > > > @@ -113,6 +109,7 @@ IsTimeValid( > > > Time->Hour > 23 || > > > Time->Minute > 59 || > > > Time->Second > 59 || > > > + Time->Nanosecond > 999999999 || > > > !IsValidTimeZone (Time->TimeZone) || > > > !IsValidDaylight (Time->Daylight)) { > > > return FALSE; > > > @@ -254,6 +251,9 @@ SetWakeupTime ( > > > OUT EFI_TIME *Time > > > ) > > > { > > > + if (Time =3D=3D NULL || !IsTimeValid (Time)) { > > > + return EFI_INVALID_PARAMETER; > > > + } > > > return LibSetWakeupTime (Enabled, Time); } > > > > > > -- > > > 2.17.1 > > > > > > > > > >=20 >=20 >=20