diff mbox

lib: add PCIe ASPM configuration check in the batch test

Message ID 1326291825-25519-1-git-send-email-kengyu@canonical.com
State Accepted
Headers show

Commit Message

Keng-Yu Lin Jan. 11, 2012, 2:23 p.m. UTC
Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
---
 src/lib/src/fwts_aspm.c      |   14 +++++++++++++-
 src/lib/src/fwts_framework.c |    4 ----
 2 files changed, 13 insertions(+), 5 deletions(-)

Comments

Alex Hung Jan. 17, 2012, 7:41 a.m. UTC | #1
On 01/11/2012 10:23 PM, Keng-Yu Lin wrote:
> Signed-off-by: Keng-Yu Lin<kengyu@canonical.com>
> ---
>   src/lib/src/fwts_aspm.c      |   14 +++++++++++++-
>   src/lib/src/fwts_framework.c |    4 ----
>   2 files changed, 13 insertions(+), 5 deletions(-)
>
> diff --git a/src/lib/src/fwts_aspm.c b/src/lib/src/fwts_aspm.c
> index 3c3157a..8406f77 100644
> --- a/src/lib/src/fwts_aspm.c
> +++ b/src/lib/src/fwts_aspm.c
> @@ -51,7 +51,7 @@ int fwts_facp_get_aspm_control(fwts_framework *fw, int *aspm)
>   	return FWTS_OK;
>   }
>
> -int fwts_aspm_check_configuration(fwts_framework *fw)
> +int aspm_check_configuration(fwts_framework *fw)
>   {
>   	int ret;
>   	int aspm_facp;
> @@ -66,3 +66,15 @@ int fwts_aspm_check_configuration(fwts_framework *fw)
>   }
>
>
> +static fwts_framework_minor_test aspm_tests[] = {
> +	{ aspm_check_configuration, "PCIe ASPM configuration test." },
> +	{ NULL, NULL }
> +};
> +
> +static fwts_framework_ops aspm_ops = {
> +	.description = "PCIe ASPM check.",
> +	.minor_tests = aspm_tests
> +};
> +
> +FWTS_REGISTER(aspm,&aspm_ops, FWTS_TEST_ANYTIME, FWTS_BATCH);
> +
> diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c
> index 7064c44..9898537 100644
> --- a/src/lib/src/fwts_framework.c
> +++ b/src/lib/src/fwts_framework.c
> @@ -76,7 +76,6 @@ static fwts_option fwts_framework_options[] = {
>   	{ "json-data-path", 	"j:", 1, "Specify path to fwts json data files - default is /usr/share/fwts." },
>   	{ "lp-tags-log", 	"",   0, "Output LaunchPad bug tags in results log." },
>   	{ "disassemble-aml", 	"",   0, "Disassemble AML from DSDT and SSDT tables." },
> -	{ "aspm", 		"",   0, "Test ASPM configuration." },
>   	{ NULL, NULL, 0, NULL }
>   };
>
> @@ -968,9 +967,6 @@ int fwts_framework_options_handler(fwts_framework *fw, int argc, char * const ar
>   		case 31: /* --disassemble-aml */
>   			fwts_iasl_disassemble_all_to_file(fw);
>   			return FWTS_COMPLETE;
> -		case 32: /* --aspm */
> -			fwts_aspm_check_configuration(fw);
> -			return FWTS_COMPLETE;
>   		}
>   		break;
>   	case 'a': /* --all */
Acked-by: Alex Hung <alex.hung@canonical.com>
Colin Ian King Jan. 17, 2012, 2:26 p.m. UTC | #2
On 11/01/12 14:23, Keng-Yu Lin wrote:
> Signed-off-by: Keng-Yu Lin<kengyu@canonical.com>
> ---
>   src/lib/src/fwts_aspm.c      |   14 +++++++++++++-
>   src/lib/src/fwts_framework.c |    4 ----
>   2 files changed, 13 insertions(+), 5 deletions(-)
>
> diff --git a/src/lib/src/fwts_aspm.c b/src/lib/src/fwts_aspm.c
> index 3c3157a..8406f77 100644
> --- a/src/lib/src/fwts_aspm.c
> +++ b/src/lib/src/fwts_aspm.c
> @@ -51,7 +51,7 @@ int fwts_facp_get_aspm_control(fwts_framework *fw, int *aspm)
>   	return FWTS_OK;
>   }
>
> -int fwts_aspm_check_configuration(fwts_framework *fw)
> +int aspm_check_configuration(fwts_framework *fw)
>   {
>   	int ret;
>   	int aspm_facp;
> @@ -66,3 +66,15 @@ int fwts_aspm_check_configuration(fwts_framework *fw)
>   }
>
>
> +static fwts_framework_minor_test aspm_tests[] = {
> +	{ aspm_check_configuration, "PCIe ASPM configuration test." },
> +	{ NULL, NULL }
> +};
> +
> +static fwts_framework_ops aspm_ops = {
> +	.description = "PCIe ASPM check.",
> +	.minor_tests = aspm_tests
> +};
> +
> +FWTS_REGISTER(aspm,&aspm_ops, FWTS_TEST_ANYTIME, FWTS_BATCH);
> +
> diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c
> index 7064c44..9898537 100644
> --- a/src/lib/src/fwts_framework.c
> +++ b/src/lib/src/fwts_framework.c
> @@ -76,7 +76,6 @@ static fwts_option fwts_framework_options[] = {
>   	{ "json-data-path", 	"j:", 1, "Specify path to fwts json data files - default is /usr/share/fwts." },
>   	{ "lp-tags-log", 	"",   0, "Output LaunchPad bug tags in results log." },
>   	{ "disassemble-aml", 	"",   0, "Disassemble AML from DSDT and SSDT tables." },
> -	{ "aspm", 		"",   0, "Test ASPM configuration." },
>   	{ NULL, NULL, 0, NULL }
>   };
>
> @@ -968,9 +967,6 @@ int fwts_framework_options_handler(fwts_framework *fw, int argc, char * const ar
>   		case 31: /* --disassemble-aml */
>   			fwts_iasl_disassemble_all_to_file(fw);
>   			return FWTS_COMPLETE;
> -		case 32: /* --aspm */
> -			fwts_aspm_check_configuration(fw);
> -			return FWTS_COMPLETE;
>   		}
>   		break;
>   	case 'a': /* --all */
Acked-by: Colin King <colin.king@canonical.com>
Keng-Yu Lin Jan. 18, 2012, 8:12 a.m. UTC | #3
On Tue, Jan 17, 2012 at 10:26 PM, Colin Ian King
<colin.king@canonical.com> wrote:
> On 11/01/12 14:23, Keng-Yu Lin wrote:
>>
>> Signed-off-by: Keng-Yu Lin<kengyu@canonical.com>
>> ---
>>  src/lib/src/fwts_aspm.c      |   14 +++++++++++++-
>>  src/lib/src/fwts_framework.c |    4 ----
>>  2 files changed, 13 insertions(+), 5 deletions(-)
>>
>> diff --git a/src/lib/src/fwts_aspm.c b/src/lib/src/fwts_aspm.c
>> index 3c3157a..8406f77 100644
>> --- a/src/lib/src/fwts_aspm.c
>> +++ b/src/lib/src/fwts_aspm.c
>> @@ -51,7 +51,7 @@ int fwts_facp_get_aspm_control(fwts_framework *fw, int
>> *aspm)
>>        return FWTS_OK;
>>  }
>>
>> -int fwts_aspm_check_configuration(fwts_framework *fw)
>> +int aspm_check_configuration(fwts_framework *fw)
>>  {
>>        int ret;
>>        int aspm_facp;
>> @@ -66,3 +66,15 @@ int fwts_aspm_check_configuration(fwts_framework *fw)
>>  }
>>
>>
>> +static fwts_framework_minor_test aspm_tests[] = {
>> +       { aspm_check_configuration, "PCIe ASPM configuration test." },
>> +       { NULL, NULL }
>> +};
>> +
>> +static fwts_framework_ops aspm_ops = {
>> +       .description = "PCIe ASPM check.",
>> +       .minor_tests = aspm_tests
>> +};
>> +
>> +FWTS_REGISTER(aspm,&aspm_ops, FWTS_TEST_ANYTIME, FWTS_BATCH);
>>
>> +
>> diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c
>> index 7064c44..9898537 100644
>> --- a/src/lib/src/fwts_framework.c
>> +++ b/src/lib/src/fwts_framework.c
>> @@ -76,7 +76,6 @@ static fwts_option fwts_framework_options[] = {
>>        { "json-data-path",     "j:", 1, "Specify path to fwts json data
>> files - default is /usr/share/fwts." },
>>        { "lp-tags-log",        "",   0, "Output LaunchPad bug tags in
>> results log." },
>>        { "disassemble-aml",    "",   0, "Disassemble AML from DSDT and
>> SSDT tables." },
>> -       { "aspm",               "",   0, "Test ASPM configuration." },
>>        { NULL, NULL, 0, NULL }
>>  };
>>
>> @@ -968,9 +967,6 @@ int fwts_framework_options_handler(fwts_framework *fw,
>> int argc, char * const ar
>>                case 31: /* --disassemble-aml */
>>                        fwts_iasl_disassemble_all_to_file(fw);
>>                        return FWTS_COMPLETE;
>> -               case 32: /* --aspm */
>> -                       fwts_aspm_check_configuration(fw);
>> -                       return FWTS_COMPLETE;
>>                }
>>                break;
>>        case 'a': /* --all */
>
> Acked-by: Colin King <colin.king@canonical.com>
>

applied.
diff mbox

Patch

diff --git a/src/lib/src/fwts_aspm.c b/src/lib/src/fwts_aspm.c
index 3c3157a..8406f77 100644
--- a/src/lib/src/fwts_aspm.c
+++ b/src/lib/src/fwts_aspm.c
@@ -51,7 +51,7 @@  int fwts_facp_get_aspm_control(fwts_framework *fw, int *aspm)
 	return FWTS_OK;
 }
 
-int fwts_aspm_check_configuration(fwts_framework *fw)
+int aspm_check_configuration(fwts_framework *fw)
 {
 	int ret;
 	int aspm_facp;
@@ -66,3 +66,15 @@  int fwts_aspm_check_configuration(fwts_framework *fw)
 }
 
 
+static fwts_framework_minor_test aspm_tests[] = {
+	{ aspm_check_configuration, "PCIe ASPM configuration test." },
+	{ NULL, NULL }
+};
+
+static fwts_framework_ops aspm_ops = {
+	.description = "PCIe ASPM check.",
+	.minor_tests = aspm_tests
+};
+
+FWTS_REGISTER(aspm, &aspm_ops, FWTS_TEST_ANYTIME, FWTS_BATCH);
+
diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c
index 7064c44..9898537 100644
--- a/src/lib/src/fwts_framework.c
+++ b/src/lib/src/fwts_framework.c
@@ -76,7 +76,6 @@  static fwts_option fwts_framework_options[] = {
 	{ "json-data-path", 	"j:", 1, "Specify path to fwts json data files - default is /usr/share/fwts." },
 	{ "lp-tags-log", 	"",   0, "Output LaunchPad bug tags in results log." },
 	{ "disassemble-aml", 	"",   0, "Disassemble AML from DSDT and SSDT tables." },
-	{ "aspm", 		"",   0, "Test ASPM configuration." },
 	{ NULL, NULL, 0, NULL }
 };
 
@@ -968,9 +967,6 @@  int fwts_framework_options_handler(fwts_framework *fw, int argc, char * const ar
 		case 31: /* --disassemble-aml */
 			fwts_iasl_disassemble_all_to_file(fw);
 			return FWTS_COMPLETE;
-		case 32: /* --aspm */
-			fwts_aspm_check_configuration(fw);
-			return FWTS_COMPLETE;
 		}
 		break;
 	case 'a': /* --all */