From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (EUR01-HE1-obe.outbound.protection.outlook.com [40.107.13.40]) by mx.groups.io with SMTP id smtpd.web11.7096.1582720527956832792 for ; Wed, 26 Feb 2020 04:35:28 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nxp.com header.s=selector2 header.b=BOV9nnxQ; spf=pass (domain: nxp.com, ip: 40.107.13.40, mailfrom: gaurav.jain@nxp.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l3ojzmLS55bFF/f2IFMSxVELcBlpDGotKJ13gzdeF2ZMMzW/Vh7huaR6ygGI0J7L7NbpHL3u0YSBW/0OjNKhnjqBlOUgtEivng28sJBgVYi9heVv35cUzeEU60vzTv9UYgICHfizAHcQDYDdqMew2CraG8+tq6o+xQnEn25csj/MaH7bNG0QN0Mj7ihjWGyFHL1dIdLonPdby6Wds6ZX9UIURWnoYzFiAfrs2ox6/O1OmrDP/4nSE3AaUchf3fgNDT+L/gY+/mWjsw9yRQ24iKnMR6klJjQWPT25Lhh2txmwlfdfxk7iKx2KeKvHQRzGmNiYpv8u8NCu5NwzNIJXbg== 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=I4gsbfYCYOahmknvM9/KocE14vkbxS8w6dT1V/na5GA=; b=UaQT1s2HPYvidTY9i+CXJW8tI+C+yW4QhWrDJuMa4MOmJ8Sc1DmEbnPTT6zolkO2/eZuvDGDS8+qmlDt56GjsPhIUMNeBDLhnIGYmmexOYOLey/fB1uqv+Kz86HYxkDKyVPjIc3ZhDP17sBO8Ydyub+rAeT7dZt7bAFoTVBiRcDFB7G0UMSKM9ZMbzvfP2YSaoSO1wabRSWIX+vGCdhxD6nkLWpcbwk48KFsOXVkRa/9cEztFAcnF7qsc0w4TKzTnANdVZz/ak+2+Vgd/Lo4HymKRQzfKeDxZdIYeyKkHpPZtv72mbsosNm3AijV8sNECmMywn2aCeFv/2Ei0Ot0gw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=I4gsbfYCYOahmknvM9/KocE14vkbxS8w6dT1V/na5GA=; b=BOV9nnxQH1AB/BBW2g962dG6/esAOgSiYmbz3cNmJNA7u40pRCP/IYhp8B+8ymNTHFxPGpxx4/0izrTRljEL6GFZm85kv5qmfAycZRi3jMp28/hRU7VX0hAggca0HHlXY333VGmPAojX4Rari87R6YFDMv5Qv5XQGheBZdCijXE= Received: from DB7PR04MB4091.eurprd04.prod.outlook.com (52.134.110.144) by DB7PR04MB4587.eurprd04.prod.outlook.com (52.135.137.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.14; Wed, 26 Feb 2020 12:35:25 +0000 Received: from DB7PR04MB4091.eurprd04.prod.outlook.com ([fe80::183:969:2508:3c92]) by DB7PR04MB4091.eurprd04.prod.outlook.com ([fe80::183:969:2508:3c92%6]) with mapi id 15.20.2750.021; Wed, 26 Feb 2020 12:35:24 +0000 From: "Gaurav Jain" To: "devel@edk2.groups.io" CC: Leif Lindholm , Ard Biesheuvel , Pankaj Bansal Subject: Re: [PATCH v2 1/1] EmbeddedPkg: Fixed Asserts in SCT Runtime Services test. Thread-Topic: [PATCH v2 1/1] EmbeddedPkg: Fixed Asserts in SCT Runtime Services test. Thread-Index: AQHV5imfb/MMSG80ZE6cvqfTjP+XZagtddPQ Date: Wed, 26 Feb 2020 12:35:24 +0000 Message-ID: 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: authentication-results: spf=none (sender IP is ) smtp.mailfrom=gaurav.jain@nxp.com; x-originating-ip: [92.120.1.65] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 8a351dc2-5a56-4747-779e-08d7bab85a6a x-ms-traffictypediagnostic: DB7PR04MB4587:|DB7PR04MB4587: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2512; x-forefront-prvs: 0325F6C77B x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(39860400002)(136003)(376002)(396003)(346002)(366004)(189003)(199004)(44832011)(33656002)(81166006)(54906003)(81156014)(2906002)(6916009)(86362001)(186003)(66446008)(66476007)(66556008)(64756008)(9686003)(55016002)(66946007)(8676002)(76116006)(52536014)(8936002)(316002)(5660300002)(7696005)(53546011)(6506007)(478600001)(26005)(4326008)(71200400001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB7PR04MB4587;H:DB7PR04MB4091.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Qf1trLJlJZTmhjFqXlbijTyAX0Ze51Nv/Tj2fE9Mu9zWWDzj1uT/9uvEY1BAVrU7GSz/zHKbk3eRH+s6y/J8ThJGECLbE8+BLDU1Ed6LCTkRHW8RnG7PLP25zbmKSWxl3AGm1rossOu/JoUaiE/Wl0If5yOHBB8iR2npB5i2Tbx+1EqnVYH6B/mh5LzxBXperr9naBMsM4pb7NzveGhj8H0h6d0wkDVP54nvpzD0/JanxZUXbhvrXJ8f9/VYAl1gIf5JD7Ru2RlCDiwemxRRWFCwiOXyUro9XMQujA5mLhkuGp/857gvAoOGMjqKIXSImIOJDh85sdqbf+nBkGGv6/8Sr3bz6OtE4BYoxIh1xrXW7DQ2O+ka8scaJF/6lTnPTBnDnD5kXugFTxLGHSVlpwbzf1ZzQGLkpCGbAUN8dGUXy/W7JotTrFnulVqiWZw2 x-ms-exchange-antispam-messagedata: vJnUy59MhPZlfUMCN5yMj/M/FaSnQtM4XtkJwKwErPBILW2dAUV66/xJfhE6rI89HUxfyEKx6aObvqQlZjc+VbMSTMDVTq2/STXz2OrDhs8f8RPgjKddQHf6k0vJKU6qHFuYG+lTD21rcwO027fnzA== MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8a351dc2-5a56-4747-779e-08d7bab85a6a X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Feb 2020 12:35:24.9090 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: YVicTwRuRUOgz/+KsIulPm43NUfiM7bduN+auYE1L5CdJ8HVhUWQhI60+vBlKgZfbq8RBBga/XW1hbF36QTsGQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4587 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Gentle Reminder!! Please review.. Regards Gaurav Jain > -----Original Message----- > From: Gaurav Jain > Sent: Tuesday, February 18, 2020 5:54 PM > To: devel@edk2.groups.io > Cc: Leif Lindholm ; Ard Biesheuvel > ; Pankaj Bansal ; Gaura= v > Jain > Subject: [PATCH v2 1/1] EmbeddedPkg: Fixed Asserts in SCT Runtime Service= s > 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/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); } >=20 > -- > 2.17.1