From patchwork Tue Jun 1 10:52:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Hu X-Patchwork-Id: 1485950 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FvTXM6DVQz9sWD for ; Tue, 1 Jun 2021 20:53:06 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lo217-0007gh-6q; Tue, 01 Jun 2021 10:53:01 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lo216-0007gO-3D for fwts-devel@lists.ubuntu.com; Tue, 01 Jun 2021 10:53:00 +0000 Received: from [175.182.110.56] (helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lo215-0002lU-AZ for fwts-devel@lists.ubuntu.com; Tue, 01 Jun 2021 10:52:59 +0000 From: Ivan Hu To: fwts-devel@lists.ubuntu.com Subject: [PATCH] uefirttime: set test time for the settime and setwakeuptime tests(LP: #1929509) Date: Tue, 1 Jun 2021 18:52:53 +0800 Message-Id: <20210601105253.33960-1-ivan.hu@canonical.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" Set test time for settime and setwakeuptime unsupported tests, in case we won't get EFI_INVALID_PARAMETER returned instead. Signed-off-by: Ivan Hu --- src/uefi/uefirttime/uefirttime.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/uefi/uefirttime/uefirttime.c b/src/uefi/uefirttime/uefirttime.c index 41503843..2fa19040 100644 --- a/src/uefi/uefirttime/uefirttime.c +++ b/src/uefi/uefirttime/uefirttime.c @@ -1272,6 +1272,12 @@ static int uefirttime_test38(fwts_framework *fw) } else fwts_skipped(fw, "GetTime runtime service supported, skip test."); + /* set test time for settime and setwakeuptime tests */ + memset(&efi_time, 0, sizeof(EFI_TIME)); + efi_time.Year = 2000; + efi_time.Month = 1; + efi_time.Day = 1; + if (!(runtimeservicessupported & EFI_RT_SUPPORTED_SET_TIME)) { settime.Time = &efi_time; status = ~0ULL;