From: "Gaurav Jain" <gaurav.jain@nxp.com>
To: devel@edk2.groups.io
Cc: Leif Lindholm <leif@nuviainc.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Pankaj Bansal <pankaj.bansal@nxp.com>,
Gaurav Jain <gaurav.jain@nxp.com>
Subject: [PATCH v3 1/1] EmbeddedPkg: Fixed Asserts in SCT Runtime Services test.
Date: Wed, 18 Mar 2020 15:54:19 +0530 [thread overview]
Message-ID: <20200318102419.20007-1-gaurav.jain@nxp.com> (raw)
ASSERT in SetTime_Conf Consistency Test.
SCT Test expect return as Invalid Parameter.
So removed ASSERT().
Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
---
Notes:
v3
Removed Time Validity Checks in function SetWakeupTime.
v2
reverted changes related to valid range of years.
EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c b/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c
index 08fb9b0100b6..20f1fa640ecc 100644
--- a/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c
+++ b/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c
@@ -85,10 +85,6 @@ IsDayValid (
IN EFI_TIME *Time
)
{
- ASSERT (Time->Day >= 1);
- ASSERT (Time->Day <= mDayOfMonth[Time->Month - 1]);
- ASSERT (Time->Month != 2 || IsLeapYear (Time) || Time->Day <= 28);
-
if (Time->Day < 1 ||
Time->Day > mDayOfMonth[Time->Month - 1] ||
(Time->Month == 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;
--
2.17.1
next reply other threads:[~2020-03-17 10:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-18 10:24 Gaurav Jain [this message]
2020-03-26 18:40 ` [PATCH v3 1/1] EmbeddedPkg: Fixed Asserts in SCT Runtime Services test Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200318102419.20007-1-gaurav.jain@nxp.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox