[PATCH] pci: aspm: test should skip if it can't read FACP or PCIe config (LP: #1201909)
Keng-Yu Lin
kengyu at canonical.com
Fri Jul 26 04:10:37 UTC 2013
On Wed, Jul 17, 2013 at 1:57 AM, Colin King <colin.king at canonical.com> wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> If we can't test ASPM then we should log the test as skipped.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/pci/aspm/aspm.c | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/src/pci/aspm/aspm.c b/src/pci/aspm/aspm.c
> index 035d1b0..be8ee5b 100644
> --- a/src/pci/aspm/aspm.c
> +++ b/src/pci/aspm/aspm.c
> @@ -331,17 +331,21 @@ static int aspm_check_configuration(fwts_framework *fw)
> int aspm_facp;
>
> ret = facp_get_aspm_control(fw, &aspm_facp);
> - if (ret == FWTS_ERROR) {
> - fwts_log_info(fw, "No valid FACP information present: cannot test ASPM.");
> - return FWTS_ERROR;
> - }
> + if (ret == FWTS_ERROR)
> + fwts_skipped(fw, "No valid FACP information present: cannot test ASPM.");
>
> return ret;
> }
>
> static int aspm_pcie_register_configuration(fwts_framework *fw)
> {
> - return pcie_check_aspm_registers(fw);
> + int ret;
> +
> + ret = pcie_check_aspm_registers(fw);
> + if (ret == FWTS_ERROR)
> + fwts_skipped(fw, "Cannot sanity check PCIe register configuration.");
> +
> + return ret;
> }
>
> static fwts_framework_minor_test aspm_tests[] = {
> --
> 1.8.1.2
>
Acked-by: Keng-Yu Lin <kengyu at canonical.com>
More information about the fwts-devel
mailing list