From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web12.9831.1582103149259362665 for ; Wed, 19 Feb 2020 01:05:49 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: liming.gao@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Feb 2020 01:05:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,459,1574150400"; d="scan'208";a="382744769" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga004.jf.intel.com with ESMTP; 19 Feb 2020 01:05:48 -0800 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 19 Feb 2020 01:05:48 -0800 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by SHSMSX601.ccr.corp.intel.com (10.109.6.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 19 Feb 2020 17:05:45 +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; Wed, 19 Feb 2020 17:05:45 +0800 From: "Liming Gao" To: "devel@edk2.groups.io" , "gaurav.jain@nxp.com" CC: Leif Lindholm , Ard Biesheuvel , Pankaj Bansal Subject: Re: [edk2-devel] [PATCH v2 1/1] EmbeddedPkg: Fixed Asserts in SCT Runtime Services test. Thread-Topic: [edk2-devel] [PATCH v2 1/1] EmbeddedPkg: Fixed Asserts in SCT Runtime Services test. Thread-Index: AQHV5imnlBVdcfRqe0O6gDNvM5DiAKgiOdMA Date: Wed, 19 Feb 2020 09:05:45 +0000 Message-ID: <348c0fde5e8b4c0db25526eb69a27743@intel.com> References: <20200218122354.17591-1-gaurav.jain@nxp.com> In-Reply-To: <20200218122354.17591-1-gaurav.jain@nxp.com> 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: Does this patch catch to edk2 stable tag 202002?=20 Thanks Liming > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Gaurav Ja= in > 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 SCT R= untime Services test. >=20 > ASSERT in SetTime_Conf and SetWakeupTime_Conf Consistency Test. > SCT Test expect return as Invalid Parameter. > So removed ASSERT(). >=20 > Added Time Validity Checks in SetWakeupTime. >=20 > 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(-) >=20 > diff --git a/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c b/Embed= dedPkg/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); > } >=20 > -- > 2.17.1 >=20 >=20 >=20