[PATCH] UEFI: change the fwts_category Unsafe to UEFI (LP:#1207178)

IvanHu ivan.hu at canonical.com
Thu Aug 1 06:45:34 UTC 2013


On 08/01/2013 02:08 PM, Colin Ian King wrote:
> On 01/08/13 07:02, Ivan Hu wrote:
>> Modify the fwts category from Unsafe to UEFI, also change
>> FWTS_FLAG_UNSAFE
>> to FWTS_FLAG_UEFI, in order to make the category more specific and let
>> users
>> to be more aware of the tests.
>>
>> Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
>> ---
>>   src/lib/include/fwts_framework.h         |    2 +-
>>   src/lib/src/fwts_framework.c             |   14 +++++++-------
>>   src/uefi/uefirtmisc/uefirtmisc.c         |    2 +-
>>   src/uefi/uefirttime/uefirttime.c         |    2 +-
>>   src/uefi/uefirtvariable/uefirtvariable.c |    2 +-
>>   5 files changed, 11 insertions(+), 11 deletions(-)
>>
>> diff --git a/src/lib/include/fwts_framework.h
>> b/src/lib/include/fwts_framework.h
>> index f365d74..655f9fa 100644
>> --- a/src/lib/include/fwts_framework.h
>> +++ b/src/lib/include/fwts_framework.h
>> @@ -44,7 +44,7 @@ typedef enum {
>>       FWTS_FLAG_INTERACTIVE_EXPERIMENTAL    = 0x00008000,
>>       FWTS_FLAG_POWER_STATES            = 0x00010000,
>>       FWTS_FLAG_ROOT_PRIV            = 0x00020000,
>> -    FWTS_FLAG_UNSAFE            = 0x00040000,
>> +    FWTS_FLAG_UEFI                = 0x00040000,
>>       FWTS_FLAG_TEST_BIOS            = 0x01000000,
>>       FWTS_FLAG_TEST_UEFI            = 0x02000000,
>
> We already have a UEFI test category, namely FWTS_FLAG_TEST_UEFI.  The
> FWTS_FLAG_UNSAFE flag is to flag any test that can break your machine.
>
> So, changing the semantics of the FWTS_FLAG_UNSAFE to mean UEFI is
> something I disagree with.

Understood. Thanks!
Will move the UEFI tests to the FWTS_FLAG_TEST_UEFI category instead of 
changing the Unsafe flag.


Ivan


>
>
>
>>       FWTS_FLAG_TEST_ACPI            = 0x04000000,
>> diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c
>> index 1581681..3db5836 100644
>> --- a/src/lib/src/fwts_framework.c
>> +++ b/src/lib/src/fwts_framework.c
>> @@ -38,7 +38,7 @@
>>        FWTS_FLAG_INTERACTIVE_EXPERIMENTAL |    \
>>        FWTS_FLAG_POWER_STATES |        \
>>        FWTS_FLAG_UTILS |            \
>> -     FWTS_FLAG_UNSAFE)
>> +     FWTS_FLAG_UEFI)
>>
>>   static fwts_list tests_to_skip;
>>
>> @@ -76,7 +76,7 @@ static fwts_option fwts_framework_options[] = {
>>       { "lp-tags-log",     "",   0, "Output LaunchPad bug tags in
>> results log." },
>>       { "disassemble-aml",     "",   0, "Disassemble AML from DSDT and
>> SSDT tables." },
>>       { "log-type",        "",   1, "Specify log type (plaintext,
>> json, html or xml)." },
>> -    { "unsafe",        "U",  0, "Unsafe tests (tests that can
>> potentially cause kernel oopses." },
>> +    { "uefi",        "U",  0, "Run UEFI tests." },
>>       { "filter-error-discard", "", 1, "Discard errors that match any
>> of the specified labels." },
>>       { "filter-error-keep",    "",   1, "Keep errors that match any
>> of the specified labels." },
>>       { "acpica-debug",    "",   0, "Enable ACPICA debug/warning
>> messages." },
>> @@ -226,7 +226,7 @@ static void
>> fwts_framework_show_tests(fwts_framework *fw, const bool full)
>>           { "Interactive Experimental",
>> FWTS_FLAG_INTERACTIVE_EXPERIMENTAL },
>>           { "Power States",        FWTS_FLAG_POWER_STATES },
>>           { "Utilities",            FWTS_FLAG_UTILS },
>> -        { "Unsafe",            FWTS_FLAG_UNSAFE },
>> +        { "UEFI",            FWTS_FLAG_UEFI },
>>           { NULL,                0 },
>>       };
>>
>> @@ -1112,8 +1112,8 @@ int
>> fwts_framework_options_handler(fwts_framework *fw, int argc, char *
>> const ar
>>               if (fwts_framework_log_type_parse(fw, optarg) != FWTS_OK)
>>                   return FWTS_ERROR;
>>               break;
>> -        case 33: /* --unsafe */
>> -            fw->flags |= FWTS_FLAG_UNSAFE;
>> +        case 33: /* --uefi */
>> +            fw->flags |= FWTS_FLAG_UEFI;
>>               break;
>>           case 34: /* --filter-error-discard */
>>               if (fwts_framework_filter_error_parse(optarg,
>> &fw->errors_filter_discard) != FWTS_OK)
>> @@ -1197,8 +1197,8 @@ int
>> fwts_framework_options_handler(fwts_framework *fw, int argc, char *
>> const ar
>>       case 'u': /* --utils */
>>           fw->flags |= FWTS_FLAG_UTILS;
>>           break;
>> -    case 'U': /* --unsafe */
>> -        fw->flags |= FWTS_FLAG_UNSAFE;
>> +    case 'U': /* --uefi */
>> +        fw->flags |= FWTS_FLAG_UEFI;
>>           break;
>>       case 'v': /* --version */
>>           fwts_framework_show_version(stdout, argv[0]);
>> diff --git a/src/uefi/uefirtmisc/uefirtmisc.c
>> b/src/uefi/uefirtmisc/uefirtmisc.c
>> index 8fd4b4c..ccb0516 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_UEFI | FWTS_FLAG_ROOT_PRIV);
>> diff --git a/src/uefi/uefirttime/uefirttime.c
>> b/src/uefi/uefirttime/uefirttime.c
>> index 2094677..7007263 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_UEFI | FWTS_FLAG_ROOT_PRIV);
>> diff --git a/src/uefi/uefirtvariable/uefirtvariable.c
>> b/src/uefi/uefirtvariable/uefirtvariable.c
>> index e223f82..49a8c1f 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_UEFI | FWTS_FLAG_ROOT_PRIV);
>>
>
>




More information about the fwts-devel mailing list