From patchwork Thu Jun 17 20:11:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Hung X-Patchwork-Id: 1493926 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 4G5Y9v354qz9sRN for ; Fri, 18 Jun 2021 06:12:02 +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 1ltyMp-0005yu-9c; Thu, 17 Jun 2021 20:11:59 +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 1ltyMn-0005yo-GT for fwts-devel@lists.ubuntu.com; Thu, 17 Jun 2021 20:11:57 +0000 Received: from d75-158-101-9.abhsia.telus.net ([75.158.101.9] 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 1ltyMn-0002YE-1t; Thu, 17 Jun 2021 20:11:57 +0000 From: Alex Hung To: fwts-devel@lists.ubuntu.com Subject: [PATCH 1/4] tpmevlog: add to batch tests Date: Thu, 17 Jun 2021 14:11:50 -0600 Message-Id: <20210617201153.67045-1-alex.hung@canonical.com> X-Mailer: git-send-email 2.32.0 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" This also allows tpmevlog to be shown in fwts-live (fwts-frontend-text) Signed-off-by: Alex Hung Acked-by: Colin Ian King Acked-by: Ivan Hu --- src/tpm/tpmevlog/tpmevlog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tpm/tpmevlog/tpmevlog.c b/src/tpm/tpmevlog/tpmevlog.c index 85c4b907..95406663 100644 --- a/src/tpm/tpmevlog/tpmevlog.c +++ b/src/tpm/tpmevlog/tpmevlog.c @@ -497,4 +497,4 @@ static fwts_framework_ops tpmevlog_ops = { .minor_tests = tpmevlog_tests }; -FWTS_REGISTER("tpmevlog", &tpmevlog_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_ROOT_PRIV) +FWTS_REGISTER("tpmevlog", &tpmevlog_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_ROOT_PRIV) From patchwork Thu Jun 17 20:11:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Hung X-Patchwork-Id: 1493927 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 4G5Y9w11Fkz9sSn for ; Fri, 18 Jun 2021 06:12:04 +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 1ltyMr-0005zP-CC; Thu, 17 Jun 2021 20:12: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 1ltyMq-0005zG-17 for fwts-devel@lists.ubuntu.com; Thu, 17 Jun 2021 20:12:00 +0000 Received: from d75-158-101-9.abhsia.telus.net ([75.158.101.9] 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 1ltyMp-0002Yp-CP; Thu, 17 Jun 2021 20:11:59 +0000 From: Alex Hung To: fwts-devel@lists.ubuntu.com Subject: [PATCH 2/4] tpmevlog/tpmevlogdump: remove debug messages Date: Thu, 17 Jun 2021 14:11:51 -0600 Message-Id: <20210617201153.67045-2-alex.hung@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210617201153.67045-1-alex.hung@canonical.com> References: <20210617201153.67045-1-alex.hung@canonical.com> 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" Signed-off-by: Alex Hung Acked-by: Colin Ian King --- src/tpm/tpmevlog/tpmevlog.c | 3 --- src/tpm/tpmevlogdump/tpmevlogdump.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/src/tpm/tpmevlog/tpmevlog.c b/src/tpm/tpmevlog/tpmevlog.c index 95406663..00380638 100644 --- a/src/tpm/tpmevlog/tpmevlog.c +++ b/src/tpm/tpmevlog/tpmevlog.c @@ -446,9 +446,6 @@ static int tpmevlog_test1(fwts_framework *fw) int fd; size_t length; - fwts_log_nl(fw); - fwts_log_info_verbatim(fw, "%s", tpmdir->d_name); - snprintf(path, sizeof(path), FWTS_TPM_LOG_DIR_PATH "/%s/binary_bios_measurements", tpmdir->d_name); if ((fd = open(path, O_RDONLY)) >= 0) { diff --git a/src/tpm/tpmevlogdump/tpmevlogdump.c b/src/tpm/tpmevlogdump/tpmevlogdump.c index a569d29b..d6ade05e 100644 --- a/src/tpm/tpmevlogdump/tpmevlogdump.c +++ b/src/tpm/tpmevlogdump/tpmevlogdump.c @@ -485,9 +485,6 @@ static int tpmevlogdump_test1(fwts_framework *fw) int fd; size_t length; - fwts_log_nl(fw); - fwts_log_info_verbatim(fw, "%s", tpmdir->d_name); - snprintf(path, sizeof(path), FWTS_TPM_LOG_DIR_PATH "/%s/binary_bios_measurements", tpmdir->d_name); if ((fd = open(path, O_RDONLY)) >= 0) { From patchwork Thu Jun 17 20:11:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Hung X-Patchwork-Id: 1493928 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 4G5Y9y2MZ3z9sRN for ; Fri, 18 Jun 2021 06:12: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 1ltyMt-00060c-Eh; Thu, 17 Jun 2021 20:12:03 +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 1ltyMs-00060F-Bp for fwts-devel@lists.ubuntu.com; Thu, 17 Jun 2021 20:12:02 +0000 Received: from d75-158-101-9.abhsia.telus.net ([75.158.101.9] 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 1ltyMr-0002ZA-SB; Thu, 17 Jun 2021 20:12:02 +0000 From: Alex Hung To: fwts-devel@lists.ubuntu.com Subject: [PATCH 3/4] live-image: add utils tests to "Selected" menu Date: Thu, 17 Jun 2021 14:11:52 -0600 Message-Id: <20210617201153.67045-3-alex.hung@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210617201153.67045-1-alex.hung@canonical.com> References: <20210617201153.67045-1-alex.hung@canonical.com> 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" Signed-off-by: Alex Hung Acked-by: Colin Ian King Acked-by: Ivan Hu --- live-image/fwts-frontend-text | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/live-image/fwts-frontend-text b/live-image/fwts-frontend-text index 5ac327dd..815b09ee 100755 --- a/live-image/fwts-frontend-text +++ b/live-image/fwts-frontend-text @@ -99,7 +99,7 @@ select_tests() # # Discover available tests # - fwts --batch --batch-experimental --uefitests --unsafe --show-tests | grep "^ "| sort | uniq > $OPTIONS + fwts --batch --batch-experimental --uefitests --unsafe --utils --show-tests | grep "^ "| sort | uniq > $OPTIONS while read test text do ((x++)) From patchwork Thu Jun 17 20:11:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Hung X-Patchwork-Id: 1493929 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 4G5YB02Bhxz9sRN for ; Fri, 18 Jun 2021 06:12:08 +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 1ltyMv-00061k-Hm; Thu, 17 Jun 2021 20:12:05 +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 1ltyMu-00061M-CD for fwts-devel@lists.ubuntu.com; Thu, 17 Jun 2021 20:12:04 +0000 Received: from d75-158-101-9.abhsia.telus.net ([75.158.101.9] 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 1ltyMt-0002Zk-TZ; Thu, 17 Jun 2021 20:12:04 +0000 From: Alex Hung To: fwts-devel@lists.ubuntu.com Subject: [PATCH 4/4] live-image: add "TPM tests" to root menu Date: Thu, 17 Jun 2021 14:11:53 -0600 Message-Id: <20210617201153.67045-4-alex.hung@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210617201153.67045-1-alex.hung@canonical.com> References: <20210617201153.67045-1-alex.hung@canonical.com> 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" Signed-off-by: Alex Hung Acked-by: Colin Ian King Acked-by: Ivan Hu --- live-image/fwts-frontend-text | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/live-image/fwts-frontend-text b/live-image/fwts-frontend-text index 815b09ee..897a922f 100755 --- a/live-image/fwts-frontend-text +++ b/live-image/fwts-frontend-text @@ -380,6 +380,7 @@ do "All" "All Batch Tests" on \ "ACPI" "ACPI Tests" off \ "UEFI" "UEFI Tests" off \ + "TPM" "TPM Tests" off \ "EBBR" "ARM EBBR Tests" off \ "SBBR" "ARM SBBR Tests" off \ "Recommended" "Recommended Tests" off \ @@ -396,6 +397,7 @@ do "All" "All Batch Tests" on \ "ACPI" "ACPI Tests" off \ "UEFI" "UEFI Tests" off \ + "TPM" "TPM Tests" off \ "Recommended" "Recommended Tests" off \ "Recommended for IFV" "Recommended Tests for F/W Vendors" off \ "Selected" "Select Individual Tests" off \ @@ -430,6 +432,10 @@ do do_test "--uefitests" 'Running UEFI Tests' done_tests_finish ;; + 'TPM') + do_test "tpm2 tpmevlog tpmevlogdump" 'Running TPM Tests' + done_tests_finish + ;; 'EBBR') do_test "--ebbr" 'Embedded Base Boot Requirements (EBBR) Tests' done_tests_finish