From patchwork Fri Aug 2 04:41:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Hu X-Patchwork-Id: 264182 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id DD21E2C008C for ; Fri, 2 Aug 2013 14:41:41 +1000 (EST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1V57BL-00074w-MA; Fri, 02 Aug 2013 04:41:39 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1V57BG-00074m-Pt for fwts-devel@lists.ubuntu.com; Fri, 02 Aug 2013 04:41:34 +0000 Received: from [175.41.48.77] (helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1V57BF-00051G-TP; Fri, 02 Aug 2013 04:41:34 +0000 From: Ivan Hu To: fwts-devel@lists.ubuntu.com Subject: [PATCH][RESEND] UEFI: move the UEFI tests into the UEFI categroy (LP:#1207200) Date: Fri, 2 Aug 2013 12:41:29 +0800 Message-Id: <1375418489-18089-1-git-send-email-ivan.hu@canonical.com> X-Mailer: git-send-email 1.7.9.5 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: fwts-devel-bounces@lists.ubuntu.com From: IvanHu Moving the uefirtvariable, uefirttime and uefirtmisc UEFI runtime service tests in the the UEFI category instead of using unsafe category in order to make it more specific and let users to be more aware of the tests. Signed-off-by: Ivan Hu --- src/lib/src/fwts_framework.c | 10 ++++++++-- src/uefi/uefirtmisc/uefirtmisc.c | 2 +- src/uefi/uefirttime/uefirttime.c | 2 +- src/uefi/uefirtvariable/uefirtvariable.c | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c index 1581681..28c2ce8 100644 --- a/src/lib/src/fwts_framework.c +++ b/src/lib/src/fwts_framework.c @@ -38,7 +38,8 @@ FWTS_FLAG_INTERACTIVE_EXPERIMENTAL | \ FWTS_FLAG_POWER_STATES | \ FWTS_FLAG_UTILS | \ - FWTS_FLAG_UNSAFE) + FWTS_FLAG_UNSAFE | \ + FWTS_FLAG_TEST_UEFI) static fwts_list tests_to_skip; @@ -81,6 +82,7 @@ static fwts_option fwts_framework_options[] = { { "filter-error-keep", "", 1, "Keep errors that match any of the specified labels." }, { "acpica-debug", "", 0, "Enable ACPICA debug/warning messages." }, { "acpica", "", 1, "Enable ACPICA run time options." }, + { "uefi", "", 0, "Run UEFI tests." }, { NULL, NULL, 0, NULL } }; @@ -227,6 +229,7 @@ static void fwts_framework_show_tests(fwts_framework *fw, const bool full) { "Power States", FWTS_FLAG_POWER_STATES }, { "Utilities", FWTS_FLAG_UTILS }, { "Unsafe", FWTS_FLAG_UNSAFE }, + { "UEFI", FWTS_FLAG_TEST_UEFI }, { NULL, 0 }, }; @@ -241,7 +244,7 @@ static void fwts_framework_show_tests(fwts_framework *fw, const bool full) fwts_list_init(&sorted); fwts_list_foreach(item, &fwts_framework_test_list) { test = fwts_list_data(fwts_framework_test *, item); - if ((test->flags & FWTS_FLAG_RUN_ALL) == categories[i].flag) + if ((test->flags & FWTS_FLAG_RUN_ALL) & categories[i].flag) fwts_list_add_ordered(&sorted, test, fwts_framework_compare_test_name); } @@ -1130,6 +1133,9 @@ int fwts_framework_options_handler(fwts_framework *fw, int argc, char * const ar if (fwts_framework_acpica_parse(fw, optarg) != FWTS_OK) return FWTS_ERROR; break; + case 38: /* --uefi */ + fw->flags |= FWTS_FLAG_TEST_UEFI; + break; } break; case 'a': /* --all */ diff --git a/src/uefi/uefirtmisc/uefirtmisc.c b/src/uefi/uefirtmisc/uefirtmisc.c index 8fd4b4c..d94b885 100644 --- a/src/uefi/uefirtmisc/uefirtmisc.c +++ b/src/uefi/uefirtmisc/uefirtmisc.c @@ -224,4 +224,4 @@ static fwts_framework_ops uefirtmisc_ops = { .minor_tests = uefirtmisc_tests }; -FWTS_REGISTER("uefirtmisc", &uefirtmisc_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_UNSAFE | FWTS_FLAG_ROOT_PRIV); +FWTS_REGISTER("uefirtmisc", &uefirtmisc_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_TEST_UEFI | FWTS_FLAG_UNSAFE | FWTS_FLAG_ROOT_PRIV); diff --git a/src/uefi/uefirttime/uefirttime.c b/src/uefi/uefirttime/uefirttime.c index 2094677..c02a1aa 100644 --- a/src/uefi/uefirttime/uefirttime.c +++ b/src/uefi/uefirttime/uefirttime.c @@ -497,4 +497,4 @@ static fwts_framework_ops uefirttime_ops = { .minor_tests = uefirttime_tests }; -FWTS_REGISTER("uefirttime", &uefirttime_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_UNSAFE | FWTS_FLAG_ROOT_PRIV); +FWTS_REGISTER("uefirttime", &uefirttime_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_TEST_UEFI | FWTS_FLAG_UNSAFE | FWTS_FLAG_ROOT_PRIV); diff --git a/src/uefi/uefirtvariable/uefirtvariable.c b/src/uefi/uefirtvariable/uefirtvariable.c index e223f82..4425029 100644 --- a/src/uefi/uefirtvariable/uefirtvariable.c +++ b/src/uefi/uefirtvariable/uefirtvariable.c @@ -1654,4 +1654,4 @@ static fwts_framework_ops uefirtvariable_ops = { .options_check = options_check, }; -FWTS_REGISTER("uefirtvariable", &uefirtvariable_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_UNSAFE | FWTS_FLAG_ROOT_PRIV); +FWTS_REGISTER("uefirtvariable", &uefirtvariable_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_TEST_UEFI | FWTS_FLAG_UNSAFE | FWTS_FLAG_ROOT_PRIV);