public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
To: EDK II Development <devel@edk2.groups.io>
Cc: Eric Jin <eric.jin@intel.com>,
	G Edhaya Chandran <Edhaya.Chandran@arm.com>,
	Barton Gao <gaojie@byosoft.com.cn>,
	Arvin Chen <arvinx.chen@intel.com>,
	Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>,
	Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Subject: [PATCH edk2-test 1/1] uefi-sct/SctPkg: invalid values for SetWakeupTime()
Date: Thu, 11 Nov 2021 17:32:33 +0100	[thread overview]
Message-ID: <20211111163233.83714-1-heinrich.schuchardt@canonical.com> (raw)

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2529

According to the UEFI specification EFI_TIME.YEAR may take values in the
range 1900-9999. The specification does not forbid to set a wakeup time in
the past. We should not expect EFI_INVALID_PARAMETER to be returned by
SetWakeupTime() for the years 1997 and 2100.

Values 1899 and 10000 must lead to this error code.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
 .../BlackBoxTest/TimeServicesBBTestConformance.c          | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TimeServices/BlackBoxTest/TimeServicesBBTestConformance.c b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TimeServices/BlackBoxTest/TimeServicesBBTestConformance.c
index fcc79548c07d..bdb150d02ea3 100644
--- a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TimeServices/BlackBoxTest/TimeServicesBBTestConformance.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TimeServices/BlackBoxTest/TimeServicesBBTestConformance.c
@@ -817,7 +817,7 @@ BBTestSetWakeupTimeConsistencyTest (
                    );
   } else {
     Time = OldTime;
-    Time.Year = 1997;
+    Time.Year = 1899;
     Status = gtRT->SetWakeupTime (
                      TRUE,
                      &Time
@@ -844,7 +844,7 @@ BBTestSetWakeupTimeConsistencyTest (
                    StandardLib,
                    AssertionType,
                    gTimeServicesBBTestConformanceAssertionGuid026,
-                   L"RT.SetWakeupTime - Time.Year is 1997",
+                   L"RT.SetWakeupTime - Time.Year is 1899",
                    L"%a:%d:Status - %r",
                    __FILE__,
                    (UINTN)__LINE__,
@@ -852,7 +852,7 @@ BBTestSetWakeupTimeConsistencyTest (
                    );
 
     Time = OldTime;
-    Time.Year = 2100;
+    Time.Year = 10000;
     Status = gtRT->SetWakeupTime (
                      TRUE,
                      &Time
@@ -866,7 +866,7 @@ BBTestSetWakeupTimeConsistencyTest (
                    StandardLib,
                    AssertionType,
                    gTimeServicesBBTestConformanceAssertionGuid027,
-                   L"RT.SetWakeupTime - Time.Year is 2100",
+                   L"RT.SetWakeupTime - Time.Year is 10000",
                    L"%a:%d:Status - %r",
                    __FILE__,
                    (UINTN)__LINE__,
-- 
2.32.0


             reply	other threads:[~2021-11-11 16:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11 16:32 Heinrich Schuchardt [this message]
2021-12-02  5:49 ` [edk2-devel] [PATCH edk2-test 1/1] uefi-sct/SctPkg: invalid values for SetWakeupTime() G Edhaya Chandran
2022-01-13 13:10   ` G Edhaya Chandran

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=20211111163233.83714-1-heinrich.schuchardt@canonical.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